Index: apps/app_window.cc |
diff --git a/apps/app_window.cc b/apps/app_window.cc |
index e2d837d4e3847cda39e2cf9954fccc150f5931b4..d619540ada0af325d4f79ef331b94a44f4b7c44f 100644 |
--- a/apps/app_window.cc |
+++ b/apps/app_window.cc |
@@ -245,7 +245,8 @@ AppWindow::AppWindow(BrowserContext* context, |
has_been_shown_(false), |
can_send_events_(false), |
is_hidden_(false), |
- cached_always_on_top_(false) { |
+ cached_always_on_top_(false), |
+ requested_transparent_background_(false) { |
extensions::ExtensionsBrowserClient* client = |
extensions::ExtensionsBrowserClient::Get(); |
CHECK(!client->IsGuestSession(context) || context->IsOffTheRecord()) |
@@ -284,6 +285,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 +745,10 @@ void AppWindow::WindowEventsReady() { |
SendOnWindowShownIfShown(); |
} |
+bool AppWindow::requested_transparent_background() const { |
+ return requested_transparent_background_; |
tapted
2014/07/16 03:01:01
nit: inline this in the header? (ignoring names, t
jackhou1
2014/07/16 05:54:04
Done.
|
+} |
+ |
void AppWindow::GetSerializedState(base::DictionaryValue* properties) const { |
DCHECK(properties); |
@@ -751,6 +758,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()); |
// These properties are undocumented and are to enable testing. Alpha is |
// removed to |