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

Side by Side Diff: chrome/common/extensions/api/notifications.idl

Issue 308053004: Add appIconMask to notification API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed bug caused by updated surrounding code Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Use the <code>chrome.notifications</code> API to create rich notifications 5 // Use the <code>chrome.notifications</code> API to create rich notifications
6 // using templates and show these notifications to users in the system tray. 6 // using templates and show these notifications to users in the system tray.
7 namespace notifications { 7 namespace notifications {
8 [noinline_doc] enum TemplateType { 8 [noinline_doc] enum TemplateType {
9 // icon, title, message, expandedMessage, up to two buttons 9 // icon, title, message, expandedMessage, up to two buttons
10 basic, 10 basic,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DOMString title; 46 DOMString title;
47 DOMString? iconUrl; 47 DOMString? iconUrl;
48 [nodoc] NotificationBitmap? iconBitmap; 48 [nodoc] NotificationBitmap? iconBitmap;
49 }; 49 };
50 50
51 dictionary NotificationOptions { 51 dictionary NotificationOptions {
52 // Which type of notification to display. 52 // Which type of notification to display.
53 // <em>Required for $(ref:notifications.create)</em> method. 53 // <em>Required for $(ref:notifications.create)</em> method.
54 TemplateType? type; 54 TemplateType? type;
55 55
56 // Sender's avatar, app icon, or a thumbnail for image notifications. 56 // A URL to the sender's avatar, app icon, or a thumbnail for image
57 // notifications.
not at google - send to devlin 2014/07/21 20:50:15 nit: separate these with a blank line so that they
liyanhou 2014/07/22 00:05:22 Done.
58 // URLs can be data URL, local URL, or blob URL.
not at google - send to devlin 2014/07/21 20:50:15 Let me rephrase this sentence to make sure I under
liyanhou 2014/07/22 00:05:22 Done.
57 // <em>Required for $(ref:notifications.create)</em> method. 59 // <em>Required for $(ref:notifications.create)</em> method.
58 DOMString? iconUrl; 60 DOMString? iconUrl;
59 [nodoc] NotificationBitmap? iconBitmap; 61 [nodoc] NotificationBitmap? iconBitmap;
60 62
63 // A URL to the app icon mask.
64 // URLs can be data URL, local URL, or blob URL.
65 // The app icon mask should be in alpha channel, as only the alpha channel
66 // of the image will be considered.
not at google - send to devlin 2014/07/21 20:50:15 you could say here, A URL to the app icon mask. U
liyanhou 2014/07/22 00:05:22 Done.
67 DOMString? appIconMaskUrl;
68 [nodoc] NotificationBitmap? appIconMaskBitmap;
69
61 // Title of the notification (e.g. sender name for email). 70 // Title of the notification (e.g. sender name for email).
62 // <em>Required for $(ref:notifications.create)</em> method. 71 // <em>Required for $(ref:notifications.create)</em> method.
63 DOMString? title; 72 DOMString? title;
64 73
65 // Main notification content. 74 // Main notification content.
66 // <em>Required for $(ref:notifications.create)</em> method. 75 // <em>Required for $(ref:notifications.create)</em> method.
67 DOMString? message; 76 DOMString? message;
68 77
69 // Alternate notification content with a lower-weight font. 78 // Alternate notification content with a lower-weight font.
70 DOMString? contextMessage; 79 DOMString? contextMessage;
71 80
72 // Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero 81 // Priority ranges from -2 to 2. -2 is lowest priority. 2 is highest. Zero
73 // is default. 82 // is default.
74 long? priority; 83 long? priority;
75 84
76 // A timestamp associated with the notification, in milliseconds past the 85 // A timestamp associated with the notification, in milliseconds past the
77 // epoch (e.g. <code>Date.now() + n</code>). 86 // epoch (e.g. <code>Date.now() + n</code>).
78 double? eventTime; 87 double? eventTime;
79 88
80 // Text and icons for up to two notification action buttons. 89 // Text and icons for up to two notification action buttons.
81 NotificationButton[]? buttons; 90 NotificationButton[]? buttons;
82 91
83 // Secondary notification content. 92 // Secondary notification content.
84 [nodoc] DOMString? expandedMessage; 93 [nodoc] DOMString? expandedMessage;
85 94
86 // Image thumbnail for image-type notifications. 95 // A URL to the image thumbnail for image-type notifications.
96 // URLs can be data URL, local URL, or blob URL.
not at google - send to devlin 2014/07/21 20:50:15 likewise
liyanhou 2014/07/22 00:05:22 Done.
87 DOMString? imageUrl; 97 DOMString? imageUrl;
88 [nodoc] NotificationBitmap? imageBitmap; 98 [nodoc] NotificationBitmap? imageBitmap;
89 99
90 // Items for multi-item notifications. 100 // Items for multi-item notifications.
91 NotificationItem[]? items; 101 NotificationItem[]? items;
92 102
93 // Current progress ranges from 0 to 100. 103 // Current progress ranges from 0 to 100.
94 long? progress; 104 long? progress;
95 105
96 // Whether to show UI indicating that the app will visibly respond to 106 // Whether to show UI indicating that the app will visibly respond to
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 static void onButtonClicked(DOMString notificationId, long buttonIndex); 167 static void onButtonClicked(DOMString notificationId, long buttonIndex);
158 168
159 // The user changes the permission level. 169 // The user changes the permission level.
160 static void onPermissionLevelChanged(PermissionLevel level); 170 static void onPermissionLevelChanged(PermissionLevel level);
161 171
162 // The user clicked on a link for the app's notification settings. 172 // The user clicked on a link for the app's notification settings.
163 static void onShowSettings(); 173 static void onShowSettings();
164 }; 174 };
165 175
166 }; 176 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698