| 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 APPS_APP_WINDOW_H_ | 5 #ifndef APPS_APP_WINDOW_H_ |
| 6 #define APPS_APP_WINDOW_H_ | 6 #define APPS_APP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 struct CreateParams { | 145 struct CreateParams { |
| 146 CreateParams(); | 146 CreateParams(); |
| 147 ~CreateParams(); | 147 ~CreateParams(); |
| 148 | 148 |
| 149 WindowType window_type; | 149 WindowType window_type; |
| 150 Frame frame; | 150 Frame frame; |
| 151 | 151 |
| 152 bool has_frame_color; | 152 bool has_frame_color; |
| 153 SkColor active_frame_color; | 153 SkColor active_frame_color; |
| 154 SkColor inactive_frame_color; | 154 SkColor inactive_frame_color; |
| 155 bool transparent_background; // Only supported on ash. | 155 bool alpha_enabled; |
| 156 | 156 |
| 157 // The initial content/inner bounds specification (excluding any window | 157 // The initial content/inner bounds specification (excluding any window |
| 158 // decorations). | 158 // decorations). |
| 159 BoundsSpecification content_spec; | 159 BoundsSpecification content_spec; |
| 160 | 160 |
| 161 // The initial window/outer bounds specification (including window | 161 // The initial window/outer bounds specification (including window |
| 162 // decorations). | 162 // decorations). |
| 163 BoundsSpecification window_spec; | 163 BoundsSpecification window_spec; |
| 164 | 164 |
| 165 std::string window_key; | 165 std::string window_key; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 bool IsAlwaysOnTop() const; | 337 bool IsAlwaysOnTop() const; |
| 338 | 338 |
| 339 // Retrieve the current state of the app window as a dictionary, to pass to | 339 // Retrieve the current state of the app window as a dictionary, to pass to |
| 340 // the renderer. | 340 // the renderer. |
| 341 void GetSerializedState(base::DictionaryValue* properties) const; | 341 void GetSerializedState(base::DictionaryValue* properties) const; |
| 342 | 342 |
| 343 // Called by the window API when events can be sent to the window for this | 343 // Called by the window API when events can be sent to the window for this |
| 344 // app. | 344 // app. |
| 345 void WindowEventsReady(); | 345 void WindowEventsReady(); |
| 346 | 346 |
| 347 // Whether the app window wants a transparent background. | 347 // Whether the app window wants to be alpha enabled. |
| 348 bool requested_transparent_background() const { | 348 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } |
| 349 return requested_transparent_background_; | |
| 350 } | |
| 351 | 349 |
| 352 protected: | 350 protected: |
| 353 virtual ~AppWindow(); | 351 virtual ~AppWindow(); |
| 354 | 352 |
| 355 private: | 353 private: |
| 356 // PlatformAppBrowserTest needs access to web_contents() | 354 // PlatformAppBrowserTest needs access to web_contents() |
| 357 friend class extensions::PlatformAppBrowserTest; | 355 friend class extensions::PlatformAppBrowserTest; |
| 358 | 356 |
| 359 // content::WebContentsDelegate implementation. | 357 // content::WebContentsDelegate implementation. |
| 360 virtual void CloseContents(content::WebContents* contents) OVERRIDE; | 358 virtual void CloseContents(content::WebContents* contents) OVERRIDE; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 // Whether the delayed Show() call was for an active or inactive window. | 537 // Whether the delayed Show() call was for an active or inactive window. |
| 540 ShowType delayed_show_type_; | 538 ShowType delayed_show_type_; |
| 541 | 539 |
| 542 // Cache the desired value of the always-on-top property. When windows enter | 540 // Cache the desired value of the always-on-top property. When windows enter |
| 543 // fullscreen or overlap the Windows taskbar, this property will be | 541 // fullscreen or overlap the Windows taskbar, this property will be |
| 544 // automatically and silently switched off for security reasons. It is | 542 // automatically and silently switched off for security reasons. It is |
| 545 // reinstated when the window exits fullscreen and moves away from the | 543 // reinstated when the window exits fullscreen and moves away from the |
| 546 // taskbar. | 544 // taskbar. |
| 547 bool cached_always_on_top_; | 545 bool cached_always_on_top_; |
| 548 | 546 |
| 549 // Whether |transparent_background| was set in the CreateParams. | 547 // Whether |alpha_enabled| was set in the CreateParams. |
| 550 bool requested_transparent_background_; | 548 bool requested_alpha_enabled_; |
| 551 | 549 |
| 552 DISALLOW_COPY_AND_ASSIGN(AppWindow); | 550 DISALLOW_COPY_AND_ASSIGN(AppWindow); |
| 553 }; | 551 }; |
| 554 | 552 |
| 555 } // namespace apps | 553 } // namespace apps |
| 556 | 554 |
| 557 #endif // APPS_APP_WINDOW_H_ | 555 #endif // APPS_APP_WINDOW_H_ |
| OLD | NEW |