How to show an tray icon with a Google Packaged App or extension

泄露秘密 提交于 2019-12-01 10:36:16

问题


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 !


回答1:


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.



来源:https://stackoverflow.com/questions/20336605/how-to-show-an-tray-icon-with-a-google-packaged-app-or-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!