Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Side by Side Diff: apps/app_window.h

Issue 190533006: Add support for transparent background API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename transparentBackground to alphaEnabled Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | apps/app_window.cc » ('j') | apps/app_window.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/extensions/extension_icon_image.h" 10 #include "chrome/browser/extensions/extension_icon_image.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 struct CreateParams { 137 struct CreateParams {
138 CreateParams(); 138 CreateParams();
139 ~CreateParams(); 139 ~CreateParams();
140 140
141 WindowType window_type; 141 WindowType window_type;
142 Frame frame; 142 Frame frame;
143 143
144 bool has_frame_color; 144 bool has_frame_color;
145 SkColor active_frame_color; 145 SkColor active_frame_color;
146 SkColor inactive_frame_color; 146 SkColor inactive_frame_color;
147 bool transparent_background; // Only supported on ash. 147 bool alpha_enabled; // Only supported on ash.
148 148
149 // The initial content/inner bounds specification (excluding any window 149 // The initial content/inner bounds specification (excluding any window
150 // decorations). 150 // decorations).
151 BoundsSpecification content_spec; 151 BoundsSpecification content_spec;
152 152
153 // The initial window/outer bounds specification (including window 153 // The initial window/outer bounds specification (including window
154 // decorations). 154 // decorations).
155 BoundsSpecification window_spec; 155 BoundsSpecification window_spec;
156 156
157 std::string window_key; 157 std::string window_key;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 343
344 // Whether the always-on-top property has been set by the chrome.app.window 344 // Whether the always-on-top property has been set by the chrome.app.window
345 // API. Note that the actual value of this property in the native app window 345 // API. Note that the actual value of this property in the native app window
346 // may be false if the bit is silently switched off for security reasons. 346 // may be false if the bit is silently switched off for security reasons.
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 // Whether this window allows a transparent background image.
354 // Currently, only Ash (ChromeOS/Windows) support transparent windows.
355 // This will always return false on platforms that don't support transparent
356 // windows.
357 bool AlphaEnabled() const;
358
353 protected: 359 protected:
354 virtual ~AppWindow(); 360 virtual ~AppWindow();
355 361
356 private: 362 private:
357 // PlatformAppBrowserTest needs access to web_contents() 363 // PlatformAppBrowserTest needs access to web_contents()
358 friend class extensions::PlatformAppBrowserTest; 364 friend class extensions::PlatformAppBrowserTest;
359 365
360 // content::WebContentsDelegate implementation. 366 // content::WebContentsDelegate implementation.
361 virtual void CloseContents(content::WebContents* contents) OVERRIDE; 367 virtual void CloseContents(content::WebContents* contents) OVERRIDE;
362 virtual bool ShouldSuppressDialogs() OVERRIDE; 368 virtual bool ShouldSuppressDialogs() OVERRIDE;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // Whether the delayed Show() call was for an active or inactive window. 527 // Whether the delayed Show() call was for an active or inactive window.
522 ShowType delayed_show_type_; 528 ShowType delayed_show_type_;
523 529
524 // Cache the desired value of the always-on-top property. When windows enter 530 // Cache the desired value of the always-on-top property. When windows enter
525 // fullscreen or overlap the Windows taskbar, this property will be 531 // fullscreen or overlap the Windows taskbar, this property will be
526 // automatically and silently switched off for security reasons. It is 532 // automatically and silently switched off for security reasons. It is
527 // reinstated when the window exits fullscreen and moves away from the 533 // reinstated when the window exits fullscreen and moves away from the
528 // taskbar. 534 // taskbar.
529 bool cached_always_on_top_; 535 bool cached_always_on_top_;
530 536
537 // Cache the alpha_enabled attribute from the window creation.
538 bool cached_alpha_enabled_;
539
531 DISALLOW_COPY_AND_ASSIGN(AppWindow); 540 DISALLOW_COPY_AND_ASSIGN(AppWindow);
532 }; 541 };
533 542
534 } // namespace apps 543 } // namespace apps
535 544
536 #endif // APPS_APP_WINDOW_H_ 545 #endif // APPS_APP_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | apps/app_window.cc » ('j') | apps/app_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698