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

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

Issue 2269403004: arc: Defer notification surface creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix compile Created 4 years, 3 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 // Next MinVersion: 7 5 // Next MinVersion: 8
6 6
7 module arc.mojom; 7 module arc.mojom;
8 8
9 import "bitmap.mojom"; 9 import "bitmap.mojom";
10 10
11 // These values must be matched with the NOTIFICATION_EVENT_* constants in 11 // These values must be matched with the NOTIFICATION_EVENT_* constants in
12 // com.android.server.ArcNotificationListenerService. 12 // com.android.server.ArcNotificationListenerService.
13 enum ArcNotificationEvent { 13 enum ArcNotificationEvent {
14 BODY_CLICKED = 0, 14 BODY_CLICKED = 0,
15 CLOSED = 1, 15 CLOSED = 1,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Image for image notifications. 70 // Image for image notifications.
71 [MinVersion=3] 71 [MinVersion=3]
72 ArcBitmap? big_picture; 72 ArcBitmap? big_picture;
73 // Flag if a notification is a custom notification backed by a notification 73 // Flag if a notification is a custom notification backed by a notification
74 // surface. Note the flag is only used on creation. Change of the flag 74 // surface. Note the flag is only used on creation. Change of the flag
75 // on notification update is ignored. 75 // on notification update is ignored.
76 [MinVersion=5] 76 [MinVersion=5]
77 bool use_custom_notification; 77 bool use_custom_notification;
78 [MinVersion=6] 78 [MinVersion=6]
79 ArcBitmap? small_icon; 79 ArcBitmap? small_icon;
80 // A snapshot image to show before the notification window is created.
81 [MinVersion=7]
82 ArcBitmap? snapshot_image;
83 [MinVersion=7]
84 float snapshot_image_scale;
80 }; 85 };
81 86
82 [MinVersion=2] 87 [MinVersion=2]
83 struct ArcToastData { 88 struct ArcToastData {
84 // Unique identifier 89 // Unique identifier
85 string id; 90 string id;
86 // Toast text. 91 // Toast text.
87 string? text; 92 string? text;
88 // Toast duration in milliseconds. If -1, the toast will be displayed until 93 // Toast duration in milliseconds. If -1, the toast will be displayed until
89 // the dismiss button is clicked. 94 // the dismiss button is clicked.
(...skipping 24 matching lines...) Expand all
114 }; 119 };
115 120
116 // TODO(lhchavez): Migrate all request/response messages to Mojo. 121 // TODO(lhchavez): Migrate all request/response messages to Mojo.
117 interface NotificationsInstance { 122 interface NotificationsInstance {
118 // Establishes full-duplex communication with the host. 123 // Establishes full-duplex communication with the host.
119 Init@0(NotificationsHost host_ptr); 124 Init@0(NotificationsHost host_ptr);
120 125
121 // Sends an event from Chrome notification UI to Android. 126 // Sends an event from Chrome notification UI to Android.
122 // |event| is a type of occured event. 127 // |event| is a type of occured event.
123 SendNotificationEventToAndroid@1(string key, ArcNotificationEvent event); 128 SendNotificationEventToAndroid@1(string key, ArcNotificationEvent event);
129
130 // Requests to Android side to create the notification window.
131 [MinVersion=7]
132 CreateNotificationWindow@2(string key);
133
134 // Requests to Android side to close the notification window.
135 [MinVersion=7]
136 CloseNotificationWindow@3(string key);
124 }; 137 };
OLDNEW
« no previous file with comments | « no previous file | components/arc/test/fake_notifications_instance.h » ('j') | ui/arc/notification/arc_custom_notification_item.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698