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

Side by Side Diff: chrome/common/extensions/api/app_window.idl

Issue 10871086: First part of remembering platform app window geometry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mihai's comments Created 8 years, 3 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 // Id to identify the window.
jeremya 2012/08/30 04:49:33 Perhaps this comment should be expanded a little?
Marijn Kruisselbrink 2012/08/30 17:15:05 Yeah, I tried to add the comment below for the cre
10 DOMString? id;
11
12 // Default width of the window.
13 long? defaultWidth;
14
15 // Default height of the window.
16 long? defaultHeight;
17
18 // Default X coordinate of the window.
19 long? defaultLeft;
20
21 // Default Y coordinate of the window.
22 long? defaultTop;
23
9 // Width of the window. 24 // Width of the window.
10 long? width; 25 long? width;
11 26
12 // Height of the window. 27 // Height of the window.
13 long? height; 28 long? height;
14 29
15 // X coordinate of the window. 30 // X coordinate of the window.
16 long? left; 31 long? left;
17 32
18 // Y coordinate of the window. 33 // Y coordinate of the window.
(...skipping 15 matching lines...) Expand all
34 DOMString? type; 49 DOMString? type;
35 50
36 // Frame type: 'none' or 'chrome' (defaults to 'chrome'). 51 // Frame type: 'none' or 'chrome' (defaults to 'chrome').
37 DOMString? frame; 52 DOMString? frame;
38 }; 53 };
39 54
40 callback CreateWindowCallback = 55 callback CreateWindowCallback =
41 void ([instanceOf=global] object created_window); 56 void ([instanceOf=global] object created_window);
42 57
43 interface Functions { 58 interface Functions {
59 // The size and position of a window can be specified in a number of
60 // different ways. The most simple option is not specifying anything at
61 // all, in which case a default size and platform dependent position will
62 // be used.
63 //
64 // Another option is to use the top/left and width/height properties,
65 // which will always put the window at the specified coordinates with the
66 // specified size.
67 //
68 // Yet another option is to give the window a (unique) id. This id is then
69 // used to remember the size and position of the window whenever it is
70 // moved or resized. This size and position is then used on subsequent
71 // opening of a window with the same id. The defaultLeft/defaultTop and
72 // defaultWidth/defaultHeight properties can be used to specify a position
73 // and size when no geometry has been stored for the window yet.
74 //
75 // You can also combine these various options, explicitly specifying for
76 // example the size while having the position be remembered or other
77 // combinations like that. Size and position are dealt with seperately,
78 // but individual coordinates are not. So if you specify a top (or left)
79 // coordinate, you should also specify a left (or top) coordinate, and
80 // similar for size.
81 //
82 // If you specify both a regular and a default value for the same option
83 // the regular value is the only one that takes effect.
44 static void create(DOMString url, 84 static void create(DOMString url,
45 optional CreateWindowOptions options, 85 optional CreateWindowOptions options,
46 optional CreateWindowCallback callback); 86 optional CreateWindowCallback callback);
47 87
48 static void focus(); 88 static void focus();
49 static void maximize(); 89 static void maximize();
50 static void minimize(); 90 static void minimize();
51 static void restore(); 91 static void restore();
52 [nocompile] static void moveTo(long x, long y); 92 [nocompile] static void moveTo(long x, long y);
53 [nocompile] static void resizeTo(long width, long height); 93 [nocompile] static void resizeTo(long width, long height);
54 }; 94 };
55 }; 95 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698