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

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

Issue 12313115: Take notification API out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict. Created 7 years, 9 months 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
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/api/notifications.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/experimental_notification.idl
diff --git a/chrome/common/extensions/api/experimental_notification.idl b/chrome/common/extensions/api/experimental_notification.idl
deleted file mode 100644
index e2e6867b7997dfceeef8396cbde65ab5f4521493..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/api/experimental_notification.idl
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2013 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.
-
-namespace experimental.notification {
- enum TemplateType {
- // icon, title, message
- simple,
-
- // icon, title, message, expandedMessage, up to two buttons
- basic,
-
- // icon, title, message, expandedMessage, image, up to two buttons
- image,
-
- // icon, title, message, items, up to two buttons
- list
- };
-
- dictionary NotificationItem {
- // Title of one item of a list notification.
- DOMString title;
-
- // Additional details about this item.
- DOMString message;
- };
-
- dictionary NotificationButton {
- DOMString title;
- DOMString? iconUrl;
- };
-
- dictionary NotificationOptions {
- // Which type of notification to display.
- TemplateType templateType;
-
- // Sender's avatar, app icon, or a thumbnail for image notifications.
- DOMString iconUrl;
-
- // Title of the notification (e.g. sender name for email).
- DOMString title;
-
- // Main notification content.
- DOMString message;
-
- // Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero
- // is default.
- long? priority;
-
- // A timestamp associated with the notification, in milliseconds past the
- // epoch (e.g. <code>Date.now() + n</code>).
- double? eventTime;
-
- // Smaller version of the icon.
- DOMString? secondIconUrl;
-
- // Text and icons of notification action buttons.
- NotificationButton[]? buttons;
-
- // Secondary notification content.
- DOMString? expandedMessage;
-
- // Image thumbnail for image-type notifications.
- DOMString? imageUrl;
-
- // Items for multi-item notifications.
- NotificationItem[]? items;
- };
-
- callback CreateCallback = void (DOMString notificationId);
-
- callback UpdateCallback = void (boolean wasUpdated);
-
- callback ClearCallback = void (boolean wasCleared);
-
- interface Functions {
- // Creates and displays a notification having the contents in |options|,
- // identified by the id |notificationId|. If |notificationId| is empty,
- // |create| generates an id. If |notificationId| matches an existing
- // notification, |create| first clears that notification before proceeding
- // with the create operation. |callback| returns the notification id
- // (either supplied or generated) that represents the created notification.
- static void create(DOMString notificationId,
- NotificationOptions options,
- CreateCallback callback);
-
- // Updates an existing notification having the id |notificationId| and the
- // options |options|. |callback| indicates whether a matching notification
- // existed.
- static void update(DOMString notificationId,
- NotificationOptions options,
- UpdateCallback callback);
-
- // Given a |notificationId| returned by the |create| method, clears the
- // corresponding notification. |callback| indicates whether a matching
- // notification existed.
- static void clear(DOMString notificationId, ClearCallback callback);
- };
-
- interface Events {
- // The system displayed the notification. Not all created notifications are
- // displayed; for example, a low-priority notification might simply appear
- // in the message center without interrupting the user.
- static void onDisplayed(DOMString notificationId);
-
- // The notification closed, either by the system or by user action.
- static void onClosed(DOMString notificationId, boolean byUser);
-
- // The user clicked in a non-button area of the notification.
- static void onClicked(DOMString notificationId);
-
- // The user pressed a button in the notification.
- static void onButtonClicked(DOMString notificationId, long buttonIndex);
- };
-
-};
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/api/notifications.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698