summaryrefslogtreecommitdiffstats
path: root/extensions/shell/common
diff options
context:
space:
mode:
authorjamescook <jamescook@chromium.org>2014-11-03 14:45:08 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-03 22:45:41 +0000
commit914043ab83536a2340fbfb3e66298d43d008a0db (patch)
treef5937c96cb174c8dfb1fdb166501794d2bc356cb /extensions/shell/common
parentbd709ad9b0e1f2d7124eb4d91ad9cde24245a7e6 (diff)
downloadchromium_src-914043ab83536a2340fbfb3e66298d43d008a0db.zip
chromium_src-914043ab83536a2340fbfb3e66298d43d008a0db.tar.gz
chromium_src-914043ab83536a2340fbfb3e66298d43d008a0db.tar.bz2
app_shell: Initial skeleton of a GCD target device setup API
This initial implementation does nothing. Eventually it will talk to privet and buffet to determine setup state and show progress. BUG=428853 TEST=app_shell_unittests Review URL: https://codereview.chromium.org/690093002 Cr-Commit-Position: refs/heads/master@{#302507}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r--extensions/shell/common/api/_api_features.json6
-rw-r--r--extensions/shell/common/api/schemas.gypi1
-rw-r--r--extensions/shell/common/api/shell_gcd.idl43
3 files changed, 50 insertions, 0 deletions
diff --git a/extensions/shell/common/api/_api_features.json b/extensions/shell/common/api/_api_features.json
index a0578b6..4f2fa7c 100644
--- a/extensions/shell/common/api/_api_features.json
+++ b/extensions/shell/common/api/_api_features.json
@@ -13,6 +13,12 @@
"contexts": ["blessed_extension"],
"extension_types": ["platform_app"]
},
+ // Setup related functions for a Google Cloud Devices (GCD) target device.
+ "shell.gcd": {
+ "channel": "dev",
+ "contexts": ["blessed_extension"],
+ "extension_types": ["platform_app"]
+ },
"shell.window": {
"channel": "dev",
"contexts": ["blessed_extension"],
diff --git a/extensions/shell/common/api/schemas.gypi b/extensions/shell/common/api/schemas.gypi
index 09c4bfc..d2b0da8 100644
--- a/extensions/shell/common/api/schemas.gypi
+++ b/extensions/shell/common/api/schemas.gypi
@@ -12,6 +12,7 @@
],
'schema_files': [
'identity.idl',
+ 'shell_gcd.idl',
'shell_window.idl',
],
'cc_dir': 'extensions/shell/common/api',
diff --git a/extensions/shell/common/api/shell_gcd.idl b/extensions/shell/common/api/shell_gcd.idl
new file mode 100644
index 0000000..c55aad6
--- /dev/null
+++ b/extensions/shell/common/api/shell_gcd.idl
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Setup related functions for a Google Cloud Devices (GCD) target device
+// running on Chrome OS Core. The actual bootstrapping and GCD registration is
+// handled by the privetd and buffet system daemons.
+namespace shell.gcd {
+
+ enum SetupStatus {
+ // Not yet configured. Waiting for a connection from the phone or laptop
+ // setup app.
+ unconfigured,
+
+ // Displaying code for user to verify they wish to set up this device.
+ confirmingSetup,
+
+ // Establishing a secure connection to the setup device and exchanging the
+ // Wi-Fi credentials.
+ exchangingCredentials,
+
+ // Connecting to the local network.
+ connectingToNetwork,
+
+ // Registering with the GCD backend.
+ registering,
+
+ // Setup completed.
+ completed
+ };
+
+ callback SetupStatusCallback = void(SetupStatus status);
+
+ interface Functions {
+ // Returns the current setup status via |callback|.
+ static void getSetupStatus(SetupStatusCallback callback);
+ };
+
+ interface Events {
+ // Notifies that setup has transitioned to a new |status|.
+ static void onSetupStatusChanged(SetupStatus status);
+ };
+};