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

Unified Diff: apps/app_window.cc

Issue 190533006: Add support for transparent background API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « apps/app_window.h ('k') | apps/ui/views/native_app_window_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_window.cc
diff --git a/apps/app_window.cc b/apps/app_window.cc
index e13e1b01f777e4ddf076324f9d741fca6153c1aa..8daff4316cd5a7ec88d5accdaf97dad9deb12f1e 100644
--- a/apps/app_window.cc
+++ b/apps/app_window.cc
@@ -160,13 +160,14 @@ AppWindow::CreateParams::CreateParams()
has_frame_color(false),
active_frame_color(SK_ColorBLACK),
inactive_frame_color(SK_ColorBLACK),
- transparent_background(false),
+ alpha_enabled(false),
creator_process_id(0),
state(ui::SHOW_STATE_DEFAULT),
hidden(false),
resizable(true),
focused(true),
- always_on_top(false) {}
+ always_on_top(false) {
+}
AppWindow::CreateParams::~CreateParams() {}
@@ -243,7 +244,7 @@ AppWindow::AppWindow(BrowserContext* context,
can_send_events_(false),
is_hidden_(false),
cached_always_on_top_(false),
- requested_transparent_background_(false) {
+ requested_alpha_enabled_(false) {
extensions::ExtensionsBrowserClient* client =
extensions::ExtensionsBrowserClient::Get();
CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord())
@@ -283,7 +284,7 @@ void AppWindow::Init(const GURL& url,
if (new_params.state == ui::SHOW_STATE_FULLSCREEN)
new_params.always_on_top = false;
- requested_transparent_background_ = new_params.transparent_background;
+ requested_alpha_enabled_ = new_params.alpha_enabled;
AppsClient* apps_client = AppsClient::Get();
native_app_window_.reset(
@@ -731,9 +732,9 @@ void AppWindow::GetSerializedState(base::DictionaryValue* properties) const {
properties->SetBoolean("maximized", native_app_window_->IsMaximized());
properties->SetBoolean("alwaysOnTop", IsAlwaysOnTop());
properties->SetBoolean("hasFrameColor", native_app_window_->HasFrameColor());
- properties->SetBoolean("alphaEnabled",
- requested_transparent_background_ &&
- native_app_window_->CanHaveAlphaEnabled());
+ properties->SetBoolean(
+ "alphaEnabled",
+ requested_alpha_enabled_ && native_app_window_->CanHaveAlphaEnabled());
// These properties are undocumented and are to enable testing. Alpha is
// removed to
« no previous file with comments | « apps/app_window.h ('k') | apps/ui/views/native_app_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698