OLD | NEW |
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 // Sync protocol datatype extension for app notifications. | 5 // Sync protocol datatype extension for app notifications. |
6 | 6 |
7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change | 7 // Update proto_value_conversions{.h,.cc,_unittest.cc} if you change |
8 // any fields in this file. | 8 // any fields in this file. |
9 | 9 |
10 syntax = "proto2"; | 10 syntax = "proto2"; |
11 | 11 |
12 option optimize_for = LITE_RUNTIME; | 12 option optimize_for = LITE_RUNTIME; |
13 option retain_unknown_fields = true; | 13 option retain_unknown_fields = true; |
14 | 14 |
15 package sync_pb; | 15 package sync_pb; |
16 | 16 |
17 import "sync.proto"; | |
18 | |
19 // Properties of an app notification. | 17 // Properties of an app notification. |
20 | 18 |
21 // An App Notification, to be delivered from Chrome Apps to the | 19 // An App Notification, to be delivered from Chrome Apps to the |
22 // Chrome browser through the Notification API. | 20 // Chrome browser through the Notification API. |
23 message AppNotification { | 21 message AppNotification { |
24 // Globally unique id. This is more robust for uniquely identifying each | 22 // Globally unique id. This is more robust for uniquely identifying each |
25 // notification and hence gives us flexibility in the future. In absence | 23 // notification and hence gives us flexibility in the future. In absence |
26 // of this, unique id would be (app_id, creation_timestamp_ms). But that | 24 // of this, unique id would be (app_id, creation_timestamp_ms). But that |
27 // relies on creation_timestamp_ms being high resolution and is not | 25 // relies on creation_timestamp_ms being high resolution and is not |
28 // globally unique - only unique for a given user. | 26 // globally unique - only unique for a given user. |
29 optional string guid = 1; | 27 optional string guid = 1; |
30 // Metadata, not shown directly to the user. | 28 // Metadata, not shown directly to the user. |
31 // The unique App Id, as created by the webstore and used to | 29 // The unique App Id, as created by the webstore and used to |
32 // delegate messages to the applications. This is defined as 32 characters | 30 // delegate messages to the applications. This is defined as 32 characters |
33 optional string app_id = 2; | 31 optional string app_id = 2; |
34 // Timestamp when the message was created in milliseconds. | 32 // Timestamp when the message was created in milliseconds. |
35 // This is seperate from ctime as this is only set by the application. | 33 // This is seperate from ctime as this is only set by the application. |
36 optional int64 creation_timestamp_ms = 3; | 34 optional int64 creation_timestamp_ms = 3; |
37 | 35 |
38 // Payload - these fields are visible to the user content is defined by the | 36 // Payload - these fields are visible to the user content is defined by the |
39 // app. The fields are described in: | 37 // app. The fields are described in: |
40 // chrome/browser/extensions/app_notification.h | 38 // chrome/browser/extensions/app_notification.h |
41 optional string title = 4; | 39 optional string title = 4; |
42 optional string body_text = 5; | 40 optional string body_text = 5; |
43 optional string link_url = 6; | 41 optional string link_url = 6; |
44 optional string link_text = 7; | 42 optional string link_text = 7; |
45 } | 43 } |
46 | 44 |
47 extend EntitySpecifics { | |
48 optional AppNotification app_notification = 45184; | |
49 } | |
OLD | NEW |