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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 // If true, the window will be focused on creation. Defaults to true. | 177 // If true, the window will be focused on creation. Defaults to true. |
178 bool focused; | 178 bool focused; |
179 | 179 |
180 // If true, the window will stay on top of other windows that are not | 180 // If true, the window will stay on top of other windows that are not |
181 // configured to be always on top. Defaults to false. | 181 // configured to be always on top. Defaults to false. |
182 bool always_on_top; | 182 bool always_on_top; |
183 | 183 |
184 // If true, the window will be visible on all workspaces. Defaults to false. | 184 // If true, the window will be visible on all workspaces. Defaults to false. |
185 bool visible_on_all_workspaces; | 185 bool visible_on_all_workspaces; |
186 | 186 |
| 187 // Whether the app window should be shown on the lock screen. |
| 188 // Chrome OS only. |
| 189 bool show_on_lock_screen; |
| 190 |
187 // If true, the window will have its own shelf icon. Otherwise the window | 191 // If true, the window will have its own shelf icon. Otherwise the window |
188 // will be grouped in the shelf with other windows that are associated with | 192 // will be grouped in the shelf with other windows that are associated with |
189 // the app. Defaults to false. | 193 // the app. Defaults to false. |
190 bool show_in_shelf; | 194 bool show_in_shelf; |
191 | 195 |
192 // Icon URL to be used for setting the window icon. | 196 // Icon URL to be used for setting the window icon. |
193 GURL window_icon_url; | 197 GURL window_icon_url; |
194 | 198 |
195 // The API enables developers to specify content or window bounds. This | 199 // The API enables developers to specify content or window bounds. This |
196 // function combines them into a single, constrained window size. | 200 // function combines them into a single, constrained window size. |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 361 |
358 // Whether the app window wants to be alpha enabled. | 362 // Whether the app window wants to be alpha enabled. |
359 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } | 363 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } |
360 | 364 |
361 // Whether the app window is created by IME extensions. | 365 // Whether the app window is created by IME extensions. |
362 // TODO(bshe): rename to hide_app_window_in_launcher if it is not used | 366 // TODO(bshe): rename to hide_app_window_in_launcher if it is not used |
363 // anywhere other than app_window_launcher_controller after M45. Otherwise, | 367 // anywhere other than app_window_launcher_controller after M45. Otherwise, |
364 // remove this TODO. | 368 // remove this TODO. |
365 bool is_ime_window() const { return is_ime_window_; } | 369 bool is_ime_window() const { return is_ime_window_; } |
366 | 370 |
| 371 bool show_on_lock_screen() const { return show_on_lock_screen_; } |
| 372 |
367 bool show_in_shelf() const { return show_in_shelf_; } | 373 bool show_in_shelf() const { return show_in_shelf_; } |
368 | 374 |
369 AppDelegate* app_delegate() { return app_delegate_.get(); } | 375 AppDelegate* app_delegate() { return app_delegate_.get(); } |
370 | 376 |
371 void SetAppWindowContentsForTesting( | 377 void SetAppWindowContentsForTesting( |
372 std::unique_ptr<AppWindowContents> contents) { | 378 std::unique_ptr<AppWindowContents> contents) { |
373 app_window_contents_ = std::move(contents); | 379 app_window_contents_ = std::move(contents); |
374 } | 380 } |
375 | 381 |
376 protected: | 382 protected: |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 // reinstated when the window exits fullscreen and moves away from the | 546 // reinstated when the window exits fullscreen and moves away from the |
541 // taskbar. | 547 // taskbar. |
542 bool cached_always_on_top_; | 548 bool cached_always_on_top_; |
543 | 549 |
544 // Whether |alpha_enabled| was set in the CreateParams. | 550 // Whether |alpha_enabled| was set in the CreateParams. |
545 bool requested_alpha_enabled_; | 551 bool requested_alpha_enabled_; |
546 | 552 |
547 // Whether |is_ime_window| was set in the CreateParams. | 553 // Whether |is_ime_window| was set in the CreateParams. |
548 bool is_ime_window_; | 554 bool is_ime_window_; |
549 | 555 |
| 556 // Whether |show_on_lock_screen| was set in the CreateParams. |
| 557 bool show_on_lock_screen_; |
| 558 |
550 // Whether |show_in_shelf| was set in the CreateParams. | 559 // Whether |show_in_shelf| was set in the CreateParams. |
551 bool show_in_shelf_; | 560 bool show_in_shelf_; |
552 | 561 |
553 // PlzNavigate: this is called when the first navigation is ready to commit. | 562 // PlzNavigate: this is called when the first navigation is ready to commit. |
554 base::Closure on_first_commit_callback_; | 563 base::Closure on_first_commit_callback_; |
555 | 564 |
556 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; | 565 base::WeakPtrFactory<AppWindow> image_loader_ptr_factory_; |
557 | 566 |
558 DISALLOW_COPY_AND_ASSIGN(AppWindow); | 567 DISALLOW_COPY_AND_ASSIGN(AppWindow); |
559 }; | 568 }; |
560 | 569 |
561 } // namespace extensions | 570 } // namespace extensions |
562 | 571 |
563 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ | 572 #endif // EXTENSIONS_BROWSER_APP_WINDOW_APP_WINDOW_H_ |
OLD | NEW |