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