diff options
author | zork <zork@chromium.org> | 2014-10-31 15:33:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-31 22:33:43 +0000 |
commit | a713479270ad0ed2b4827eda0268eb9d265a85de (patch) | |
tree | 5d1d94d775bc9d0ee342c8a4836d665407fe2d1b /extensions/shell/common | |
parent | 639bf9ee3ad459bd0a6623edb1f816eaebf4d120 (diff) | |
download | chromium_src-a713479270ad0ed2b4827eda0268eb9d265a85de.zip chromium_src-a713479270ad0ed2b4827eda0268eb9d265a85de.tar.gz chromium_src-a713479270ad0ed2b4827eda0268eb9d265a85de.tar.bz2 |
Add idl for managing window visibility in app_shell
BUG=424650
Review URL: https://codereview.chromium.org/686983002
Cr-Commit-Position: refs/heads/master@{#302338}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r-- | extensions/shell/common/api/_api_features.json | 5 | ||||
-rw-r--r-- | extensions/shell/common/api/schemas.gypi | 1 | ||||
-rw-r--r-- | extensions/shell/common/api/shell_window.idl | 50 |
3 files changed, 56 insertions, 0 deletions
diff --git a/extensions/shell/common/api/_api_features.json b/extensions/shell/common/api/_api_features.json index 779e197..a0578b6 100644 --- a/extensions/shell/common/api/_api_features.json +++ b/extensions/shell/common/api/_api_features.json @@ -12,5 +12,10 @@ "channel": "dev", "contexts": ["blessed_extension"], "extension_types": ["platform_app"] + }, + "shell.window": { + "channel": "dev", + "contexts": ["blessed_extension"], + "extension_types": ["platform_app"] } } diff --git a/extensions/shell/common/api/schemas.gypi b/extensions/shell/common/api/schemas.gypi index 0af258d..09c4bfc 100644 --- a/extensions/shell/common/api/schemas.gypi +++ b/extensions/shell/common/api/schemas.gypi @@ -12,6 +12,7 @@ ], 'schema_files': [ 'identity.idl', + 'shell_window.idl', ], 'cc_dir': 'extensions/shell/common/api', 'root_namespace': 'extensions::shell::api::%(namespace)s', diff --git a/extensions/shell/common/api/shell_window.idl b/extensions/shell/common/api/shell_window.idl new file mode 100644 index 0000000..9a6ef09 --- /dev/null +++ b/extensions/shell/common/api/shell_window.idl @@ -0,0 +1,50 @@ +// 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. + +// Allows control of focused window in app_shell +namespace shell.window { + + dictionary RequestInfo { + // The id of the app making the request. + DOMString appId; + }; + + dictionary ShowInfo { + // The id of the app to show. + DOMString? appId; + + // The name of the app to show. + DOMString? appName; + }; + + interface Functions { + // Bring the specified app to the foreground. Can only be called by the + // master app. In showInfo, one of appId or appName must be provided. + static void showApp(ShowInfo showInfo); + + // Request the current app be brought to the foreground. The request will + // be forwarded to the master app. + static void requestShow(); + + // Request the current app be hidden. The request will be forwarded to the + // master app. + static void requestHide(); + }; + + interface Events { + // Fired when an app requests to be shown. Only the master app can receive + // this. + static void onShowRequest(RequestInfo info); + + // Fired when an app requests to be hidden. Only the master app can receive + // this. + static void onHideRequest(RequestInfo info); + + // Fired when this app is shown. + static void onShow(); + + // Fired when this app is hidden. + static void onHide(); + }; +}; |