Chromium Code Reviews| Index: apps/app_window.cc |
| diff --git a/apps/app_window.cc b/apps/app_window.cc |
| index e2d837d4e3847cda39e2cf9954fccc150f5931b4..0f08bd9179f59a492d10138e82d51b74fc6d6139 100644 |
| --- a/apps/app_window.cc |
| +++ b/apps/app_window.cc |
| @@ -284,6 +284,8 @@ 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; |
| + |
| native_app_window_.reset(delegate_->CreateNativeAppWindow(this, new_params)); |
| // Prevent the browser process from shutting down while this window exists. |
| @@ -742,6 +744,10 @@ void AppWindow::WindowEventsReady() { |
| SendOnWindowShownIfShown(); |
| } |
| +bool AppWindow::RequestedTransparentBackground() const { |
| + return requested_transparent_background_; |
| +} |
| + |
| void AppWindow::GetSerializedState(base::DictionaryValue* properties) const { |
| DCHECK(properties); |
| @@ -752,6 +758,11 @@ void AppWindow::GetSerializedState(base::DictionaryValue* properties) const { |
| properties->SetBoolean("alwaysOnTop", IsAlwaysOnTop()); |
| properties->SetBoolean("hasFrameColor", native_app_window_->HasFrameColor()); |
| + if (requested_transparent_background_) { |
| + properties->SetBoolean("alphaEnabled", |
| + native_app_window_->CanHaveTransparentBackground()); |
|
Wez
2014/07/09 22:03:29
Why do we not want to have alphaEnabled=false for
jackhou1
2014/07/10 03:04:17
No particular reason. It just needs to be constant
|
| + } |
| + |
| // These properties are undocumented and are to enable testing. Alpha is |
| // removed to |
| // make the values easier to check. |