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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // File-level comment to appease parser. Eventually this will not be necessary. 5 // File-level comment to appease parser. Eventually this will not be necessary.
6 6
7 namespace app.window { 7 namespace app.window {
8 dictionary CreateWindowOptions { 8 dictionary CreateWindowOptions {
9 // Width of the window. 9 // Width of the window.
10 long? width; 10 long? width;
(...skipping 22 matching lines...) Expand all
33 // Window type: 'shell' (the default) is the only currently supported value. 33 // Window type: 'shell' (the default) is the only currently supported value.
34 DOMString? type; 34 DOMString? type;
35 35
36 // Frame type: 'none' or 'chrome' (defaults to 'chrome'). 36 // Frame type: 'none' or 'chrome' (defaults to 'chrome').
37 DOMString? frame; 37 DOMString? frame;
38 }; 38 };
39 39
40 callback CreateWindowCallback = 40 callback CreateWindowCallback =
41 void ([instanceOf=global] object created_window); 41 void ([instanceOf=global] object created_window);
42 42
43 dictionary AppWindow {
44 // Focus the window.
45 static void focus();
46
47 // Minimize the window.
48 static void minimize();
49
50 // Maximize the window.
51 static void maximize();
52
53 // Restore the window.
54 static void restore();
55
56 // Move the window to the position (|x|, |y|).
57 static void moveTo(long x, long y);
Mihai Parparita -not on Chrome 2012/08/24 01:05:07 moveTo does not seem to be implemented in the curr
jeremya 2012/08/24 02:10:08 Done.
58 };
59
43 interface Functions { 60 interface Functions {
44 static void create(DOMString url, 61 static void create(DOMString url,
45 optional CreateWindowOptions options, 62 optional CreateWindowOptions options,
46 optional CreateWindowCallback callback); 63 optional CreateWindowCallback callback);
47 64
48 static void focus(); 65 [nocompile] static AppWindow current();
49 static void maximize();
50 static void minimize();
51 static void restore();
52 [nocompile] static void moveTo(long x, long y);
53 [nocompile] static void resizeTo(long width, long height);
Mihai Parparita -not on Chrome 2012/08/24 01:05:07 Can we also bring over resizing?
jeremya 2012/08/24 02:10:08 Done.
54 }; 66 };
55 }; 67 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698