OLD | NEW |
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 // Use the <code>chrome.app.window</code> API to create windows. Windows | 5 // Use the <code>chrome.app.window</code> API to create windows. Windows |
6 // have an optional frame with title bar and size controls. They are not | 6 // have an optional frame with title bar and size controls. They are not |
7 // associated with any Chrome browser windows. | 7 // associated with any Chrome browser windows. |
8 namespace app.window { | 8 namespace app.window { |
9 dictionary Bounds { | 9 dictionary Bounds { |
10 long? left; | 10 long? left; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // function () { }; };</code> | 128 // function () { }; };</code> |
129 // <br>window.js:<br> | 129 // <br>window.js:<br> |
130 // <code>window.onload = function () { foo(); }</code> | 130 // <code>window.onload = function () { foo(); }</code> |
131 callback CreateWindowCallback = | 131 callback CreateWindowCallback = |
132 void ([instanceOf=AppWindow] object createdWindow); | 132 void ([instanceOf=AppWindow] object createdWindow); |
133 | 133 |
134 [noinline_doc] dictionary AppWindow { | 134 [noinline_doc] dictionary AppWindow { |
135 // Focus the window. | 135 // Focus the window. |
136 static void focus(); | 136 static void focus(); |
137 | 137 |
138 // Fullscreens the window. | 138 // Fullscreens the window.<br> |
| 139 // The user will be able to restore the window by pressing ESC. An |
| 140 // application can prevent the fullscreen state to be left when ESC is |
| 141 // pressed by requesting the <b>overrideEscFullscreen</b> permission and |
| 142 // canceling the event by calling .preventDefault(), like this:<br> |
| 143 // <code>window.onKeyDown = function(e) { if (e.keyCode == 27 /* ESC */) { |
| 144 // e.preventDefault(); } };</code> |
139 static void fullscreen(); | 145 static void fullscreen(); |
140 | 146 |
141 // Is the window fullscreen? | 147 // Is the window fullscreen? |
142 static boolean isFullscreen(); | 148 static boolean isFullscreen(); |
143 | 149 |
144 // Minimize the window. | 150 // Minimize the window. |
145 static void minimize(); | 151 static void minimize(); |
146 | 152 |
147 // Is the window minimized? | 153 // Is the window minimized? |
148 static boolean isMinimized(); | 154 static boolean isMinimized(); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // Fired when the window is maximized. | 294 // Fired when the window is maximized. |
289 [nocompile] static void onMaximized(); | 295 [nocompile] static void onMaximized(); |
290 | 296 |
291 // Fired when the window is minimized. | 297 // Fired when the window is minimized. |
292 [nocompile] static void onMinimized(); | 298 [nocompile] static void onMinimized(); |
293 | 299 |
294 // Fired when the window is restored from being minimized or maximized. | 300 // Fired when the window is restored from being minimized or maximized. |
295 [nocompile] static void onRestored(); | 301 [nocompile] static void onRestored(); |
296 }; | 302 }; |
297 }; | 303 }; |
OLD | NEW |