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

Side by Side Diff: sync/protocol/synced_notification_render.proto

Issue 12717010: Widen Data Pipes and newer protobufs (Closed) Base URL: http://git.chromium.org/chromium/src.git@newProtobufs
Patch Set: Synced Notifications newer protobufs - improve unit test robustness Created 7 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 5
6 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change 6 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change
7 // any fields in this file. 7 // any fields in this file.
8 8
9 syntax = "proto2"; 9 syntax = "proto2";
10 10
11 option optimize_for = LITE_RUNTIME; 11 option optimize_for = LITE_RUNTIME;
12 option retain_unknown_fields = true; 12 option retain_unknown_fields = true;
13 13
14 package sync_pb; 14 package sync_pb;
15 15
16 // Data that is used directly by endpoints to render notifications in the case 16 // Data that is used directly by endpoints to render notifications in the case
17 // where no "native" app can handle the notification. 17 // where no "native" app can handle the notification.
18 message SyncedNotificationRenderInfo { 18 message SyncedNotificationRenderInfo {
19
20 // Render information for the collapsed (summary) view of a coalesced
21 // notification.
22 message CollapsedInfo {
23 message SimpleCollapsedLayout {
24 // Application icon.
25 optional SyncedNotificationImage app_icon = 1;
26
27 // Profile image(s) of the notification creator(s) to show in the
28 // collapsed UI.
29 repeated SyncedNotificationProfileImage profile_image = 2;
30
31 // Heading - often the name(s) of the notification creator(s).
32 optional string heading = 3;
33
34 // Description - often the action that generated the notification.
35 optional string description = 4;
36 }
37 optional SimpleCollapsedLayout simple_collapsed_layout = 1;
38
39 // The creation time of the notification in microseconds since the UNIX
40 // epoch.
41 optional uint64 creation_timestamp_usec = 2;
42
43 // The default destination target.
44 optional SyncedNotificationDestination default_destination = 3;
45
46 // Secondary destinations and actions grouped into a message to account for
47 // ordering.
48 message Target {
49 optional SyncedNotificationDestination destination = 1;
50 optional SyncedNotificationAction action = 2;
51 }
52 repeated Target target = 4;
53 }
54 optional CollapsedInfo collapsed_info = 1; 19 optional CollapsedInfo collapsed_info = 1;
Nicolas Zea 2013/03/28 17:43:41 Comment about what these fields are
Pete Williamson 2013/03/28 19:59:00 Done.
55 20
56 // Render information for the expanded (detail) view of a coalesced 21 optional ExpandedInfo expanded_info = 2;
57 // notification. 22 }
58 message ExpandedInfo {
59 message SimpleExpandedLayout {
60 // Title - often the title of the underlying entity referred to by the
61 // notification(s).
62 optional string title = 1;
63 23
64 // Text content - often a snippet of text from the underlying entity 24 // Render information for the collapsed (summary) view of a coalesced
65 // reference or the notification. 25 // notification.
66 optional string text = 2; 26 message CollapsedInfo {
Nicolas Zea 2013/03/28 17:43:41 nit: could you define this (and Expanded info) abo
Pete Williamson 2013/03/28 19:59:00 As we discussed over chat, I re-ordered the file s
27 optional SimpleCollapsedLayout simple_collapsed_layout = 1;
67 28
68 // Media. 29 // The creation time of the notification in microseconds since the UNIX
69 message Media { 30 // epoch.
70 // TOOD(jro): Do we need other media types? 31 optional uint64 creation_timestamp_usec = 2;
71 optional SyncedNotificationImage image = 1;
72 }
73 repeated Media media = 3;
74 }
75 optional SimpleExpandedLayout simple_expanded_layout = 1;
76 32
77 // Collapsed information for each notification in the coalesced group. 33 // The default destination target.
78 repeated CollapsedInfo collapsed_info = 2; 34 optional SyncedNotificationDestination default_destination = 3;
79 } 35
80 optional ExpandedInfo expanded_info = 2; 36 repeated Target target = 4;
37 }
38
39 message SimpleCollapsedLayout {
40 // Application icon.
41 optional SyncedNotificationImage app_icon = 1;
42
43 // Profile image(s) of the notification creator(s) to show in the
44 // collapsed UI.
45 repeated SyncedNotificationProfileImage profile_image = 2;
46
47 // Heading - often the name(s) of the notification creator(s).
48 optional string heading = 3;
49
50 // Description - often the action that generated the notification.
51 optional string description = 4;
52 }
53
54 message SimpleExpandedLayout {
55 // Title - often the title of the underlying entity referred to by the
56 // notification(s).
57 optional string title = 1;
58
59 // Text content - often a snippet of text from the underlying entity
60 // reference or the notification.
61 optional string text = 2;
62
63 repeated Media media = 3;
64
65 // Profile image, usually this is the creator of the referenced entity.
66 optional SyncedNotificationProfileImage profile_image = 4;
67
68 // A set of targets for actions the user can take, or destinations the
69 // viewer can be taken to. Usually these relate to the referenced entity.
70 repeated Target target = 5;
71 }
72
73 // Media.
74 message Media {
75 // TOOD(jro): Do we need other media types?
76 optional SyncedNotificationImage image = 1;
77 }
78
79 // Render information for the expanded (detail) view of a coalesced
80 // notification.
81 message ExpandedInfo {
82 optional SimpleExpandedLayout simple_expanded_layout = 1;
83
84 // Collapsed information for each notification in the coalesced group.
85 repeated CollapsedInfo collapsed_info = 2;
81 } 86 }
82 87
83 // A Destination is a target URL that the user can be taken to by clicking on or 88 // A Destination is a target URL that the user can be taken to by clicking on or
84 // selecting the notification or part thereof. 89 // selecting the notification or part thereof.
85 message SyncedNotificationDestination { 90 message SyncedNotificationDestination {
86 // The description for the link to the destination. 91 // The description for the link to the destination.
87 optional string text = 1; 92 optional string text = 1;
88 93
89 // The icon to use for the link to the destination. 94 // The icon to use for the link to the destination.
90 optional SyncedNotificationImage icon = 2; 95 optional SyncedNotificationImage icon = 2;
91 96
92 // The destination URL. 97 // The destination URL.
93 optional string url = 3; 98 optional string url = 3;
94 99
95 // Optional label to aid accessibility. 100 // Optional label to aid accessibility.
96 optional string accessibility_label = 4; 101 optional string accessibility_label = 4;
97 } 102 }
98 103
99 // An Action encapsulates an UI component that trigger certain programmable 104 // An Action encapsulates an UI component that trigger certain programmable
100 // actions. Depending on the endpoint, this may show up as a HTML button, an 105 // actions. Depending on the endpoint, this may show up as a HTML button, an
101 // action button associated with the notification on native mobile, a link, or 106 // action button associated with the notification on native mobile, a link, or
102 // even the notification card itself. 107 // even the notification card itself.
103 message SyncedNotificationAction { 108 message SyncedNotificationAction {
104 // The description for the Action. 109 // The description for the Action.
105 optional string text = 1; 110 optional string text = 1;
106 111
107 // The icon to use for the Action. 112 // The icon to use for the Action.
108 optional SyncedNotificationImage icon = 2; 113 optional SyncedNotificationImage icon = 2;
109 114
110 // The URL that performs the action. 115 // The URL that performs the action.
111 optional string url = 3; 116 optional string url = 3;
112 117
113 // Additional request data. 118 // Additional request data.
114 optional string request_data = 4; 119 optional string request_data = 4;
115 120
(...skipping 10 matching lines...) Expand all
126 optional int32 preferred_height = 4; 131 optional int32 preferred_height = 4;
127 } 132 }
128 133
129 message SyncedNotificationProfileImage { 134 message SyncedNotificationProfileImage {
130 // Url for the image. 135 // Url for the image.
131 optional string image_url = 1; 136 optional string image_url = 1;
132 // Object id for the image. 137 // Object id for the image.
133 optional string oid = 2; 138 optional string oid = 2;
134 // Name to display for this image. 139 // Name to display for this image.
135 optional string display_name = 3; 140 optional string display_name = 3;
136 } 141 }
142
143 // Secondary destinations and actions grouped into a message to account for
144 // ordering.
145 message Target {
146 optional SyncedNotificationDestination destination = 1;
Nicolas Zea 2013/03/28 17:43:41 Comments about fields
Pete Williamson 2013/03/28 19:59:00 Done.
147 optional SyncedNotificationAction action = 2;
148
149 // A key to identify this target within a group of targets.
150 optional string target_key = 3;
151 }
OLDNEW
« sync/protocol/synced_notification_data.proto ('K') | « sync/protocol/synced_notification_data.proto ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698