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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 bool IsAlwaysOnTop() const; | 347 bool IsAlwaysOnTop() const; |
348 | 348 |
349 // Retrieve the current state of the app window as a dictionary, to pass to | 349 // Retrieve the current state of the app window as a dictionary, to pass to |
350 // the renderer. | 350 // the renderer. |
351 void GetSerializedState(base::DictionaryValue* properties) const; | 351 void GetSerializedState(base::DictionaryValue* properties) const; |
352 | 352 |
353 // Called by the window API when events can be sent to the window for this | 353 // Called by the window API when events can be sent to the window for this |
354 // app. | 354 // app. |
355 void WindowEventsReady(); | 355 void WindowEventsReady(); |
356 | 356 |
357 // Whether the app window wants a transparent background. | 357 // Whether the app window wants to be alpha enabled. |
358 bool requested_transparent_background() const { | 358 bool requested_alpha_enabled() const { return requested_alpha_enabled_; } |
359 return requested_transparent_background_; | |
360 } | |
361 | 359 |
362 protected: | 360 protected: |
363 virtual ~AppWindow(); | 361 virtual ~AppWindow(); |
364 | 362 |
365 private: | 363 private: |
366 // PlatformAppBrowserTest needs access to web_contents() | 364 // PlatformAppBrowserTest needs access to web_contents() |
367 friend class extensions::PlatformAppBrowserTest; | 365 friend class extensions::PlatformAppBrowserTest; |
368 | 366 |
369 // content::WebContentsDelegate implementation. | 367 // content::WebContentsDelegate implementation. |
370 virtual void CloseContents(content::WebContents* contents) OVERRIDE; | 368 virtual void CloseContents(content::WebContents* contents) OVERRIDE; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 // Whether the delayed Show() call was for an active or inactive window. | 551 // Whether the delayed Show() call was for an active or inactive window. |
554 ShowType delayed_show_type_; | 552 ShowType delayed_show_type_; |
555 | 553 |
556 // Cache the desired value of the always-on-top property. When windows enter | 554 // Cache the desired value of the always-on-top property. When windows enter |
557 // fullscreen or overlap the Windows taskbar, this property will be | 555 // fullscreen or overlap the Windows taskbar, this property will be |
558 // automatically and silently switched off for security reasons. It is | 556 // automatically and silently switched off for security reasons. It is |
559 // reinstated when the window exits fullscreen and moves away from the | 557 // reinstated when the window exits fullscreen and moves away from the |
560 // taskbar. | 558 // taskbar. |
561 bool cached_always_on_top_; | 559 bool cached_always_on_top_; |
562 | 560 |
563 // Whether |transparent_background| was set in the CreateParams. | 561 // Whether |alpha_enabled| was set in the CreateParams. |
564 bool requested_transparent_background_; | 562 bool requested_alpha_enabled_; |
565 | 563 |
566 DISALLOW_COPY_AND_ASSIGN(AppWindow); | 564 DISALLOW_COPY_AND_ASSIGN(AppWindow); |
567 }; | 565 }; |
568 | 566 |
569 } // namespace apps | 567 } // namespace apps |
570 | 568 |
571 #endif // APPS_APP_WINDOW_H_ | 569 #endif // APPS_APP_WINDOW_H_ |
OLD | NEW |