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

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 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/docs/apps/app.window.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. This will be used to remember the size
10 // and position of the window and restore that geometry when a window
11 // with the same id (and no explicit size or position) is later opened.
12 DOMString? id;
13
14 // Default width of the window.
15 long? defaultWidth;
16
17 // Default height of the window.
18 long? defaultHeight;
19
20 // Default X coordinate of the window.
21 long? defaultLeft;
22
23 // Default Y coordinate of the window.
24 long? defaultTop;
25
9 // Width of the window. 26 // Width of the window.
10 long? width; 27 long? width;
11 28
12 // Height of the window. 29 // Height of the window.
13 long? height; 30 long? height;
14 31
15 // X coordinate of the window. 32 // X coordinate of the window.
16 long? left; 33 long? left;
17 34
18 // Y coordinate of the window. 35 // Y coordinate of the window.
(...skipping 15 matching lines...) Expand all
34 DOMString? type; 51 DOMString? type;
35 52
36 // Frame type: 'none' or 'chrome' (defaults to 'chrome'). 53 // Frame type: 'none' or 'chrome' (defaults to 'chrome').
37 DOMString? frame; 54 DOMString? frame;
38 }; 55 };
39 56
40 callback CreateWindowCallback = 57 callback CreateWindowCallback =
41 void ([instanceOf=global] object created_window); 58 void ([instanceOf=global] object created_window);
42 59
43 interface Functions { 60 interface Functions {
61 // The size and position of a window can be specified in a number of
62 // different ways. The most simple option is not specifying anything at
63 // all, in which case a default size and platform dependent position will
64 // be used.
65 //
66 // Another option is to use the top/left and width/height properties,
67 // which will always put the window at the specified coordinates with the
68 // specified size.
69 //
70 // Yet another option is to give the window a (unique) id. This id is then
71 // used to remember the size and position of the window whenever it is
72 // moved or resized. This size and position is then used on subsequent
73 // opening of a window with the same id. The defaultLeft/defaultTop and
74 // defaultWidth/defaultHeight properties can be used to specify a position
75 // and size when no geometry has been stored for the window yet.
76 //
77 // You can also combine these various options, explicitly specifying for
78 // example the size while having the position be remembered or other
79 // combinations like that. Size and position are dealt with seperately,
80 // but individual coordinates are not. So if you specify a top (or left)
81 // coordinate, you should also specify a left (or top) coordinate, and
82 // similar for size.
83 //
84 // If you specify both a regular and a default value for the same option
85 // the regular value is the only one that takes effect.
44 static void create(DOMString url, 86 static void create(DOMString url,
45 optional CreateWindowOptions options, 87 optional CreateWindowOptions options,
46 optional CreateWindowCallback callback); 88 optional CreateWindowCallback callback);
47 89
48 static void focus(); 90 static void focus();
49 static void maximize(); 91 static void maximize();
50 static void minimize(); 92 static void minimize();
51 static void restore(); 93 static void restore();
52 [nocompile] static void moveTo(long x, long y); 94 [nocompile] static void moveTo(long x, long y);
53 [nocompile] static void resizeTo(long width, long height); 95 [nocompile] static void resizeTo(long width, long height);
54 }; 96 };
55 }; 97 };
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/extensions/docs/apps/app.window.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698