| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 [ | 5 [ |
| 6 { | 6 { |
| 7 "namespace": "gcm", | 7 "namespace": "gcm", |
| 8 "description": "Use <code>chrome.gcm</code> to enable apps and extensions to
send and receive messages through the <a href='http://developer.android.com/goo
gle/gcm/'>Google Cloud Messaging Service</a>.", | 8 "description": "Use <code>chrome.gcm</code> to enable apps and extensions to
send and receive messages through the <a href='http://developer.android.com/goo
gle/gcm/'>Google Cloud Messaging Service</a>.", |
| 9 "properties": { | 9 "properties": { |
| 10 "MAX_MESSAGE_SIZE": { | 10 "MAX_MESSAGE_SIZE": { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 "description": "A message to send to the other party via GCM.", | 67 "description": "A message to send to the other party via GCM.", |
| 68 "properties": { | 68 "properties": { |
| 69 "destinationId": { | 69 "destinationId": { |
| 70 "type": "string", | 70 "type": "string", |
| 71 "minLength": 1, | 71 "minLength": 1, |
| 72 "description": "The ID of the server to send the message to as a
ssigned by <a href='https://code.google.com/apis/console'>Google API Console</a>
." | 72 "description": "The ID of the server to send the message to as a
ssigned by <a href='https://code.google.com/apis/console'>Google API Console</a>
." |
| 73 }, | 73 }, |
| 74 "messageId": { | 74 "messageId": { |
| 75 "type": "string", | 75 "type": "string", |
| 76 "minLength": 1, | 76 "minLength": 1, |
| 77 "description": "The ID of the message. It must be unique for eac
h message in scope of the applications. See the <a href='cloudMessagingV2#send_m
essages'>Cloud Messaging documentation</a> for advice for picking and handling a
n ID." | 77 "description": "The ID of the message. It must be unique for eac
h message in scope of the applications. See the <a href='cloudMessaging#send_mes
sages'>Cloud Messaging documentation</a> for advice for picking and handling an
ID." |
| 78 }, | 78 }, |
| 79 "timeToLive": { | 79 "timeToLive": { |
| 80 "type": "integer", | 80 "type": "integer", |
| 81 "minimum": 0, | 81 "minimum": 0, |
| 82 "maximum": 2419200, | 82 "maximum": 2419200, |
| 83 "optional": true, | 83 "optional": true, |
| 84 "description": "Time-to-live of the message in seconds. If it is
not possible to send the message within that time, an onSendError event will be
raised. A time-to-live of 0 indicates that the message should be sent immediate
ly or fail if it's not possible. The maximum and a default value of time-to-live
is 2419200 seconds (4 weeks)." | 84 "description": "Time-to-live of the message in seconds. If it is
not possible to send the message within that time, an onSendError event will be
raised. A time-to-live of 0 indicates that the message should be sent immediate
ly or fail if it's not possible. The maximum and a default value of time-to-live
is 2419200 seconds (4 weeks)." |
| 85 }, | 85 }, |
| 86 "data": { | 86 "data": { |
| 87 "type": "object", | 87 "type": "object", |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 "type": "object", | 124 "type": "object", |
| 125 "properties": {}, | 125 "properties": {}, |
| 126 "additionalProperties": { | 126 "additionalProperties": { |
| 127 "type": "string" | 127 "type": "string" |
| 128 }, | 128 }, |
| 129 "description": "The message data." | 129 "description": "The message data." |
| 130 }, | 130 }, |
| 131 "collapseKey": { | 131 "collapseKey": { |
| 132 "type": "string", | 132 "type": "string", |
| 133 "optional": true, | 133 "optional": true, |
| 134 "desctription": "The collapse key of a message. See <a href='clo
udMessagingV2#collapsible_messages'>Collapsible Messages</a> section of Cloud Me
ssaging documentation for details." | 134 "desctription": "The collapse key of a message. See <a href='clo
udMessaging#collapsible_messages'>Collapsible Messages</a> section of Cloud Mess
aging documentation for details." |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 ] | 138 ] |
| 139 }, | 139 }, |
| 140 { | 140 { |
| 141 "name": "onMessagesDeleted", | 141 "name": "onMessagesDeleted", |
| 142 "type": "function", | 142 "type": "function", |
| 143 "description": "Fired when a GCM server had to delete messages sent by a
n app server to the application. See <a href='cloudMessagingV2#messages_deleted_
event'>Messages deleted event</a> section of Cloud Messaging documentation for d
etails on handling this event." | 143 "description": "Fired when a GCM server had to delete messages sent by a
n app server to the application. See <a href='cloudMessaging#messages_deleted_ev
ent'>Messages deleted event</a> section of Cloud Messaging documentation for det
ails on handling this event." |
| 144 }, | 144 }, |
| 145 { | 145 { |
| 146 "name": "onSendError", | 146 "name": "onSendError", |
| 147 "type": "function", | 147 "type": "function", |
| 148 "description": "Fired when it was not possible to send a message to the
GCM server.", | 148 "description": "Fired when it was not possible to send a message to the
GCM server.", |
| 149 "parameters": [ | 149 "parameters": [ |
| 150 { | 150 { |
| 151 "name": "error", | 151 "name": "error", |
| 152 "type": "object", | 152 "type": "object", |
| 153 "description": "An error related to sending a message raised by GCM.
", | 153 "description": "An error related to sending a message raised by GCM.
", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 170 "description": "Additional details related to the error, when av
ailable." | 170 "description": "Additional details related to the error, when av
ailable." |
| 171 } | 171 } |
| 172 }, | 172 }, |
| 173 "description": "An error that occured while trying to send the messa
ge either in Chrome or on the GCM server. Application can retry sending the mess
age with a reasonable backoff and possibly longer time-to-live." | 173 "description": "An error that occured while trying to send the messa
ge either in Chrome or on the GCM server. Application can retry sending the mess
age with a reasonable backoff and possibly longer time-to-live." |
| 174 } | 174 } |
| 175 ] | 175 ] |
| 176 } | 176 } |
| 177 ] | 177 ] |
| 178 } | 178 } |
| 179 ] | 179 ] |
| OLD | NEW |