Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3430)

Unified Diff: chrome/common/extensions/api/system_indicator.idl

Issue 11361189: Initial skeleton for System Indicator API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Final style fixes Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/system_indicator.idl
diff --git a/chrome/common/extensions/api/system_indicator.idl b/chrome/common/extensions/api/system_indicator.idl
new file mode 100644
index 0000000000000000000000000000000000000000..c24f8142efccd35cc051c99335244291b7c1878c
--- /dev/null
+++ b/chrome/common/extensions/api/system_indicator.idl
@@ -0,0 +1,36 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Manages an app's system indicator icon, an image displayed in the system's
+// menubar, system tray, or other visible area provided by the OS.
+// This is modelled after the other extension action APIs, such as
+// chrome.browserAction and chrome.pageAction.
+namespace systemIndicator {
+ dictionary SetIconDetails {
+ any? path;
+ any? imageData;
+ };
+
+ callback DoneCallback = void ();
+
+ interface Functions {
+ // Set the image to be used as an indicator icon, using a set of ImageData
+ // objects. These objects should have multiple resolutions so that an
+ // appropriate size can be selected for the given icon size and DPI scaling
+ // settings. Only square ImageData objects are accepted.
+ static void setIcon(SetIconDetails details, optional DoneCallback callback);
+
+ // Show the icon in the status tray.
+ static void enable();
+
+ // Hide the icon from the status tray.
+ static void disable();
+ };
+
+ interface Events {
+ // Fired only when a click on the icon does not result in a menu being
+ // shown.
+ static void onClicked();
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698