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

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: avoid unnecessary writes to disk 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 fe8fa9c628532aba4c10bc0855f691c8871b0a60..bae471874f59616a6dd479bc5aee8177e638a73a 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 left;
+ long top;
+ long width;
+ long height;
jeremya 2012/10/31 03:12:21 These should be optional. I think it makes sense t
asargent_no_longer_on_chrome 2012/10/31 05:37:35 Done.
+ };
+
dictionary AppWindow {
// Focus the window.
static void focus();
@@ -68,8 +75,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);
@@ -83,6 +90,10 @@ namespace app.window {
// Close the window.
static void close();
+ // 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;
};
@@ -117,6 +128,7 @@ namespace app.window {
optional CreateWindowOptions options,
optional CreateWindowCallback callback);
+ // Returns the current <a href="#type-AppWindow">AppWindow</a>.
jeremya 2012/10/31 00:32:46 I don't think this really makes clear the behaviou
asargent_no_longer_on_chrome 2012/10/31 05:37:35 I tried rewording it to use similar language to th
[nocompile] static AppWindow current();
[nocompile, nodoc] static void initializeAppWindow(object state);
};

Powered by Google App Engine
This is Rietveld 408576698