diff options
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/extensions/api/api.gyp | 1 | ||||
-rw-r--r-- | chrome/common/extensions/api/cloud_print_private.json | 48 | ||||
-rw-r--r-- | chrome/common/pref_names.cc | 1 | ||||
-rw-r--r-- | chrome/common/pref_names.h | 1 | ||||
-rw-r--r-- | chrome/common/service_messages.h | 9 |
5 files changed, 51 insertions, 9 deletions
diff --git a/chrome/common/extensions/api/api.gyp b/chrome/common/extensions/api/api.gyp index 59dc797..fed5d84 100644 --- a/chrome/common/extensions/api/api.gyp +++ b/chrome/common/extensions/api/api.gyp @@ -19,6 +19,7 @@ 'chromium_code': 1, 'json_schema_files': [ 'bookmarks.json', + 'cloud_print_private.json', 'content_settings.json', 'context_menus.json', 'cookies.json', diff --git a/chrome/common/extensions/api/cloud_print_private.json b/chrome/common/extensions/api/cloud_print_private.json index b208fc2..cf7714c 100644 --- a/chrome/common/extensions/api/cloud_print_private.json +++ b/chrome/common/extensions/api/cloud_print_private.json @@ -8,8 +8,8 @@ "nodoc": "true", "functions": [ { - "name": "setCredentials", - "description": "Sets the login credentials for Cloud Print.", + "name": "setupConnector", + "description": "Setup Cloud Print Connector.", "type": "function", "parameters": [ { @@ -28,16 +28,52 @@ "description": "The login credentials(OAuth2 Auth code)." }, { + "name": "connectNewPrinters", + "type": "boolean", + "description": "True if new printers should be connected." + }, + { + "name": "printerBlacklist", + "description": "Printers that should not be connected.", + "type": "array", + "items": {"type": "string"} + } + ] + }, + { + "name": "getHostName", + "description": "Returns local hostname.", + "type": "function", + "parameters": [ + { "name": "callback", "type": "function", - "description": "Called when a failure happens. Called upon success only in tests.", - "optional": "true", + "description": "Called to return host name.", "parameters": [ { "name": "result", "type": "string", - "description": "A string result code. The value is non-empty on success only in tests.", - "optional": "true" + "description": "Host name." + } + ] + } + ] + }, + { + "name": "getPrinters", + "description": "Returns local printers.", + "type": "function", + "parameters": [ + { + "name": "callback", + "type": "function", + "description": "Called to return printers.", + "parameters": [ + { + "name": "result", + "type": "array", + "items": {"type": "string"}, + "description": "List of printer names." } ] } diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 6f0d1d6..e335e1a 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -1907,6 +1907,7 @@ const char kFactoryResetRequested[] = "FactoryResetRequested"; // *************** SERVICE PREFS *************** // These are attached to the service process. +const char kCloudPrintRoot[] = "cloud_print"; const char kCloudPrintProxyEnabled[] = "cloud_print.enabled"; // The unique id for this instance of the cloud print proxy. const char kCloudPrintProxyId[] = "cloud_print.proxy_id"; diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 8966dea..aab4d19 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -626,6 +626,7 @@ extern const char kRemoteAccessHostTalkGadgetPrefix[]; extern const char kRemoteAccessHostRequireCurtain[]; extern const char kPrintPreviewStickySettings[]; +extern const char kCloudPrintRoot[]; extern const char kCloudPrintServiceURL[]; extern const char kCloudPrintSigninURL[]; extern const char kCloudPrintDialogWidth[]; diff --git a/chrome/common/service_messages.h b/chrome/common/service_messages.h index 68f208a..8dd3157 100644 --- a/chrome/common/service_messages.h +++ b/chrome/common/service_messages.h @@ -4,6 +4,7 @@ // Multiply-included message file, no traditional include guard. #include <string> +#include <vector> #include "chrome/common/cloud_print/cloud_print_proxy_info.h" #include "ipc/ipc_channel_handle.h" @@ -27,10 +28,12 @@ IPC_MESSAGE_CONTROL1(ServiceMsg_EnableCloudPrintProxy, // Tell the service process to enable the cloud proxy passing in the OAuth2 // auth code of a robot account. -IPC_MESSAGE_CONTROL3(ServiceMsg_EnableCloudPrintProxyWithRobot, +IPC_MESSAGE_CONTROL5(ServiceMsg_EnableCloudPrintProxyWithRobot, std::string /* robot_auth_code */, - std::string /* robot_email*/, - std::string /* user_email*/) + std::string /* robot_email */, + std::string /* user_email */, + bool /* connect_new_printers */, + std::vector<std::string> /* printer_blacklist */) // Tell the service process to disable the cloud proxy. IPC_MESSAGE_CONTROL0(ServiceMsg_DisableCloudPrintProxy) |