Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 5 #ifndef EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
| 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 6 #define EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 | 329 |
| 330 // Set whether the window should stay above other windows which are not | 330 // Set whether the window should stay above other windows which are not |
| 331 // configured to be always-on-top. | 331 // configured to be always-on-top. |
| 332 void SetAlwaysOnTop(bool always_on_top); | 332 void SetAlwaysOnTop(bool always_on_top); |
| 333 | 333 |
| 334 // Whether the always-on-top property has been set by the chrome.app.window | 334 // Whether the always-on-top property has been set by the chrome.app.window |
| 335 // API. Note that the actual value of this property in the native app window | 335 // API. Note that the actual value of this property in the native app window |
| 336 // may be false if the bit is silently switched off for security reasons. | 336 // may be false if the bit is silently switched off for security reasons. |
| 337 bool IsAlwaysOnTop() const; | 337 bool IsAlwaysOnTop() const; |
| 338 | 338 |
| 339 // Set whether the window should get even reserved keys (modulo platform | |
| 340 // restrictions). | |
| 341 void SetInterceptAllKeys(bool want_all_keys); | |
| 342 | |
| 339 // Retrieve the current state of the app window as a dictionary, to pass to | 343 // Retrieve the current state of the app window as a dictionary, to pass to |
| 340 // the renderer. | 344 // the renderer. |
| 341 void GetSerializedState(base::DictionaryValue* properties) const; | 345 void GetSerializedState(base::DictionaryValue* properties) const; |
| 342 | 346 |
| 343 // Called by the window API when events can be sent to the window for this | 347 // Called by the window API when events can be sent to the window for this |
| 344 // app. | 348 // app. |
| 345 void WindowEventsReady(); | 349 void WindowEventsReady(); |
| 346 | 350 |
| 347 // Whether the app window wants to be alpha enabled. | 351 // Whether the app window wants to be alpha enabled. |
| 348 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } | 352 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 541 // Cache the desired value of the always-on-top property. When windows enter | 545 // Cache the desired value of the always-on-top property. When windows enter |
| 542 // fullscreen or overlap the Windows taskbar, this property will be | 546 // fullscreen or overlap the Windows taskbar, this property will be |
| 543 // automatically and silently switched off for security reasons. It is | 547 // automatically and silently switched off for security reasons. It is |
| 544 // reinstated when the window exits fullscreen and moves away from the | 548 // reinstated when the window exits fullscreen and moves away from the |
| 545 // taskbar. | 549 // taskbar. |
| 546 bool cached_always_on_top_; | 550 bool cached_always_on_top_; |
| 547 | 551 |
| 548 // Whether |alpha_enabled| was set in the CreateParams. | 552 // Whether |alpha_enabled| was set in the CreateParams. |
| 549 bool requested_alpha_enabled_; | 553 bool requested_alpha_enabled_; |
| 550 | 554 |
| 555 // Cached value of InterceptAllKeys property that is used to save/restore | |
| 556 // state as the window is active/loses focus. | |
| 557 bool cached_want_all_keys_; | |
|
sadrul
2014/11/18 22:21:46
Is this cache useful?
Sriram
2014/11/18 22:45:43
It is used to unregister from destructor if hooks
| |
| 558 | |
| 551 DISALLOW_COPY_AND_ASSIGN(AppWindow); | 559 DISALLOW_COPY_AND_ASSIGN(AppWindow); |
| 552 }; | 560 }; |
| 553 | 561 |
| 554 } // namespace extensions | 562 } // namespace extensions |
| 555 | 563 |
| 556 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 564 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
| OLD | NEW |