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
3 // found in the LICENSE file.
8 "description": "Use <code>chrome.gcm</code> to enable apps and extensions to send and receive messages through <a href='http://developer.android.com/google/gcm/index.html'>Google Cloud Messaging for Android</a>.",
12 "description": "The maximum size (in bytes) of all key/value pairs in a message."
19 "description": "Registers the application with GCM. The registration ID will be returned by the <code>callback</code>. If <code>register</code> is called again with the same list of <code>senderIds</code>, the same registration ID will be returned.",
30 "description": "A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs."
35 "description": "Function called when registration completes. It should check $ref:runtime.lastError for error when <code>registrationId</code> is empty.",
38 "name": "registrationId",
40 "description": "A registration ID assigned to the application by the GCM."
49 "description": "Sends a message according to its contents.",
54 "description": "A message to send to the other party via GCM.",
59 "description": "The ID of the server to send the message to as assigned by <a href='https://code.google.com/apis/console'>Google API Console</a>."
64 "description": "The ID of the message. It must be unique for each message."
71 "description": "Time-to-live of the message in seconds. If it is not possible to send the message wihtin that time an error will be raised. A time-to-live of 0 indicates that the message should be sent immediately or fail if it's not possible. The maximum and a default value of time-to-live is 2419200 seconds (4 weeks)."
76 "additionalProperties": {
80 "description": "Message data to send to the server. <code>goog.</code> and <code>google</code> are disallowed as key prefixes. Sum of all key/value pairs should not exceed $ref:MAX_MESSAGE_SIZE."
87 "description": "A function called after the message is successfully queued for sending. $ref:runtime.lastError should be checked, to ensure a message was sent without problems.",
92 "description": "The ID of the message that the callback was issued for."
103 "description": "Fired when a message is received through GCM.",
108 "description": "A message received from another party via GCM.",
113 "additionalProperties": {
116 "description": "The message data."
123 "name": "onMessagesDeleted",
125 "description": "Fired when a GCM server had to delete messages to the application from its queue in order to manage its size. The app is expected to handle that case gracefully, e.g. by running a full sync with its server."
128 "name": "onSendError",
130 "description": "Fired when it was not possible to send a message to the GCM server.",
135 "description": "An error related to sending a message raised by GCM.",
139 "description": "The error message describing the problem."
144 "description": "The ID of the message with this error, if error is related to a specific message."
149 "additionalProperties": {
152 "description": "Additional details related to the error, when available."
155 "description": "An error that occured while trying to send the message either in Chrome or on the GCM server. Application can retry sending the message with a reasonable backoff and possibly longer time-to-live."