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

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

Issue 10878040: Move context-sensitive app.window.* functions to app.window.current().* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 4 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 545b3659186e4f9df006d56360efd68f1473404f..5b00d78f119fbdf758798c1fb51e181fea231b60 100644
--- a/chrome/common/extensions/api/app_window.idl
+++ b/chrome/common/extensions/api/app_window.idl
@@ -55,7 +55,29 @@ namespace app.window {
};
callback CreateWindowCallback =
- void ([instanceOf=global] object created_window);
+ void ([instanceOf=AppWindow] object created_window);
+
+ dictionary AppWindow {
+ // Focus the window.
+ static void focus();
+
+ // Minimize the window.
+ static void minimize();
+
+ // Maximize the window.
+ static void maximize();
+
+ // 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 (|x|, |y|).
+ static void resizeTo(long x, long y);
+
+ [instanceOf=global] object dom;
+ };
interface Functions {
// The size and position of a window can be specified in a number of
@@ -87,11 +109,6 @@ namespace app.window {
optional CreateWindowOptions options,
optional CreateWindowCallback callback);
- static void focus();
- static void maximize();
- static void minimize();
- static void restore();
- [nocompile] static void moveTo(long x, long y);
- [nocompile] static void resizeTo(long width, long height);
+ [nocompile] static AppWindow current();
};
};

Powered by Google App Engine
This is Rietveld 408576698