如何使用Google Packaged应用程序或扩展程序显示托盘图标 [英] How to show an tray icon with a Google Packaged App or extension

查看:126
本文介绍了如何使用Google Packaged应用程序或扩展程序显示托盘图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Chrome套件应用程序(系统状态栏中的图标)创建一个托盘图标。与Google Hangout扩展程序一样,我希望应用程序在用户点击图标时做出一些操作(打开菜单)。



经过一些搜索后,我发现了这一点: https://docs.google.com/document/d/1QhhfR33Y28Yqnnoa_Sl3fnZK_mKtwt4dZe6kNyJ_MjU/edit
这似乎是一个来自实验性API的铬团队的旧项目,正在做我正在寻找的东西。但它不适合我。 (它真的用于打包应用程序吗?)



如果打包应用程序无法完成,这对我来说不是问题,我可以切换到Chrome延期。但我无法找到扩展程序。



我认为,如果环聊扩展可以做到这一点,我也可以做到这一点,但我没有发现任何东西



感谢您的帮助! 解释方案

这里,有一个解决方案(目前只有chrome dev-channel)。



它适用于应用程序和扩展。



请参阅此处的Chrome错误: https://代码。 google.com/p/chromium/issues/detail?id=142450
以下是两个示例: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/test/data/ extensions / api_test / system_indicator /



感谢 @Sergey Shevchenko 为他提供帮助。

I'm trying to create a tray icon for my Chrome Packaged App (an icon in the system status bar). Like the Google Hangout extension do, I want the app to make something (open a menu) when the user click the icon.

After some search, I've found this : https://docs.google.com/document/d/1QhhfR33Y28Yqnnoa_Sl3fnZK_mKtwt4dZe6kNyJ_MjU/edit It seems to be an old project from the chromium team of an experimental API that is doing what I'm searching. But it's not working for me. (Is it really for Packaged App ?)

If it's can't be done for an Packaged App, it's not really a problem for me, I can switch to a Chrome Extension. But I can't find do for extension either.

I think that if the Hangout extension can do this, I can do this too but I don't find anything on it.

Thank you for your help !

解决方案

As explain here, there is a solution (chrome dev-channel only for now).

It works for both apps and extensions.

See the Chrome bug here : https://code.google.com/p/chromium/issues/detail?id=142450 And two example here : https://code.google.com/p/chromium/codesearch#chromium/src/chrome/test/data/extensions/api_test/system_indicator/

Thanks @Sergey Shevchenko for his help.

这篇关于如何使用Google Packaged应用程序或扩展程序显示托盘图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆