Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3115)

Unified Diff: chrome/common/extensions/api/app_window.idl

Issue 11193049: Add the app.windows.getBounds method (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased against head Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/app_window.idl
diff --git a/chrome/common/extensions/api/app_window.idl b/chrome/common/extensions/api/app_window.idl
index dd576d5eb0b1a11f779ccffa1122a1d802ca5fd1..2d3037b967d4b9990c32ec243693aff8974e09b5 100644
--- a/chrome/common/extensions/api/app_window.idl
+++ b/chrome/common/extensions/api/app_window.idl
@@ -59,6 +59,13 @@ namespace app.window {
callback CreateWindowCallback =
void ([instanceOf=AppWindow] object created_window);
+ dictionary Bounds {
+ long? left;
+ long? top;
+ long? width;
+ long? height;
+ };
+
dictionary AppWindow {
// Focus the window.
static void focus();
@@ -72,8 +79,8 @@ namespace app.window {
// Restore the window.
static void restore();
- // Move the window to the position (|x|, |y|).
- static void moveTo(long x, long y);
+ // Move the window to the position (|left|, |top|).
+ static void moveTo(long left, long top);
// Resize the window to |width|x|height| pixels in size.
static void resizeTo(long width, long height);
@@ -127,6 +134,10 @@ namespace app.window {
optional CreateWindowOptions options,
optional CreateWindowCallback callback);
+ // Returns an <a href="#type-AppWindow">AppWindow</a> object for the
+ // current script context (ie JavaScript 'window' object). This can also be
+ // called on a handle to a script context for another page, for example:
+ // otherWindow.chrome.app.window.current().
[nocompile] static AppWindow current();
[nocompile, nodoc] static void initializeAppWindow(object state);
};

Powered by Google App Engine
This is Rietveld 408576698