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

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: Created 8 years, 2 months 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 04deba99f972cfac1088a5074c66f39e39796afc..a0e7793801ce886d3f44549145a76bd39ba6879e 100644
--- a/chrome/common/extensions/api/app_window.idl
+++ b/chrome/common/extensions/api/app_window.idl
@@ -55,6 +55,13 @@ namespace app.window {
callback CreateWindowCallback =
void ([instanceOf=AppWindow] object created_window);
+ dictionary Bounds {
+ long x;
jeremya 2012/10/19 00:26:45 as discussed in chat, left/top probably makes more
+ long y;
+ long width;
+ long height;
+ };
+
dictionary AppWindow {
// Focus the window.
static void focus();
@@ -80,6 +87,10 @@ namespace app.window {
// Clear attention to the window.
static void clearAttention();
+ // Return a <a href="#type-Bounds">Bounds</a> with the position and size of
+ // the window.
+ static Bounds getBounds();
+
// The JavaScript 'window' object for the created child.
[instanceOf=global] object contentWindow;
};
@@ -114,6 +125,7 @@ namespace app.window {
optional CreateWindowOptions options,
optional CreateWindowCallback callback);
+ // Returns the current <a href="#type-AppWindow">AppWindow</a>.
[nocompile] static AppWindow current();
[nocompile, nodoc] static void initializeAppWindow(object state);
};

Powered by Google App Engine
This is Rietveld 408576698