Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Manages an app's system indicator icon, an image displayed in the system's | |
| 6 // menubar, system tray, or other visible area provided by the OS. | |
|
not at google - send to devlin
2012/11/21 23:39:23
could you add note like "this is modelled as an ex
dewittj
2012/11/26 18:32:58
Done.
| |
| 7 namespace systemIndicator { | |
| 8 dictionary SetIconDetails { | |
| 9 any? path; | |
| 10 any? imageData; | |
| 11 }; | |
| 12 | |
| 13 callback DoneCallback = void (); | |
| 14 | |
| 15 interface Functions { | |
| 16 // Set the image to be used as an indicator icon, using a set of ImageData | |
| 17 // objects. These objects should have multiple resolutions so that an | |
| 18 // appropriate size can be selected for the given icon size and DPI scaling | |
| 19 // settings. Only square ImageData objects are accepted. | |
| 20 static void setIcon(SetIconDetails details, optional DoneCallback callback); | |
| 21 | |
| 22 // Show the icon in the status tray. | |
| 23 static void enable(optional DoneCallback callback); | |
| 24 | |
| 25 // Hide the icon from the status tray. | |
| 26 static void disable(optional DoneCallback callback); | |
| 27 }; | |
| 28 | |
| 29 interface Events { | |
| 30 // Fired only when a click on the icon does not result in a menu being | |
| 31 // shown. | |
| 32 static void onClicked(); | |
| 33 }; | |
| 34 }; | |
| OLD | NEW |