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

Side by Side Diff: components/arc/common/notifications.mojom

Issue 1477733002: Add ArcNotificationManager for new ARC notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 12 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 module arc; 5 module arc;
6 6
7 // These values must be matched with the NOTIFICATION_EVENT_* constants in 7 // These values must be matched with the NOTIFICATION_EVENT_* constants in
8 // com.android.server.ArcNotificationListenerService. 8 // com.android.server.ArcNotificationListenerService.
9 enum ArcNotificationEvent { 9 enum ArcNotificationEvent {
10 BODY_CLICKED = 0, 10 BODY_CLICKED = 0,
11 CLOSED = 1, 11 CLOSED = 1,
12 // Five buttons at maximum (message_center::kNotificationMaximumItems = 5). 12 // Five buttons at maximum (message_center::kNotificationMaximumItems = 5).
13 BUTTON1_CLICKED = 2, 13 BUTTON1_CLICKED = 2,
14 BUTTON2_CLICKED = 3, 14 BUTTON2_CLICKED = 3,
15 BUTTON3_CLICKED = 4, 15 BUTTON3_CLICKED = 4,
16 BUTTON4_CLICKED = 5, 16 BUTTON4_CLICKED = 5,
17 BUTTON5_CLICKED = 6, 17 BUTTON5_CLICKED = 6,
18 MAX = BUTTON5_CLICKED
18 }; 19 };
19 20
20 // These values must be matched with the NOTIFICATION_TYPE_* constants in 21 // These values must be matched with the NOTIFICATION_TYPE_* constants in
21 // com.android.server.ArcNotificationListenerService. 22 // com.android.server.ArcNotificationListenerService.
22 enum ArcNotificationType { 23 enum ArcNotificationType {
23 BASIC = 0, 24 BASIC = 0,
24 IMAGE = 1, 25 IMAGE = 1,
25 PROGRESS = 2, 26 PROGRESS = 2,
27 MAX = PROGRESS
26 }; 28 };
27 29
28 struct ArcNotificationData { 30 struct ArcNotificationData {
29 // Identifier of notification 31 // Identifier of notification
30 string key; 32 string key;
31 // Type of notification 33 // Type of notification
32 ArcNotificationType type; 34 ArcNotificationType type;
33 // Body message of notification 35 // Body message of notification
34 string message; 36 string message;
35 // Title of notification 37 // Title of notification
(...skipping 25 matching lines...) Expand all
61 63
62 // TODO(lhchavez): Migrate all request/response messages to Mojo. 64 // TODO(lhchavez): Migrate all request/response messages to Mojo.
63 interface NotificationsInstance { 65 interface NotificationsInstance {
64 // Establishes full-duplex communication with the host. 66 // Establishes full-duplex communication with the host.
65 Init(NotificationsHost host_ptr); 67 Init(NotificationsHost host_ptr);
66 68
67 // Sends an event from Chrome notification UI to Android. 69 // Sends an event from Chrome notification UI to Android.
68 // |event| is a type of occured event. 70 // |event| is a type of occured event.
69 SendNotificationEventToAndroid(string key, ArcNotificationEvent event); 71 SendNotificationEventToAndroid(string key, ArcNotificationEvent event);
70 }; 72 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698