diff options
author | amineer@chromium.org <amineer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-23 21:24:00 +0000 |
---|---|---|
committer | amineer@chromium.org <amineer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-23 21:24:00 +0000 |
commit | e95d17c08a2ebd04d6348abd33147d48e4b2a36f (patch) | |
tree | 82d9deca307150499ae45f7fc576129e9d89f1cd /apps/app_window.cc | |
parent | 9cdf03c946d934f12070c4272c87f902ae844d86 (diff) | |
download | chromium_src-e95d17c08a2ebd04d6348abd33147d48e4b2a36f.zip chromium_src-e95d17c08a2ebd04d6348abd33147d48e4b2a36f.tar.gz chromium_src-e95d17c08a2ebd04d6348abd33147d48e4b2a36f.tar.bz2 |
Merge 284026 "Add app.window.alphaEnabled() and onAlphaEnabledCh..."
> Add app.window.alphaEnabled() and onAlphaEnabledChanged.
>
> This allows an app to determine whether a window created with
> "transparent_background" will work as expected.
>
> This also allows the app to detect when "transparent_background" might
> stop working, e.g. when Windows changes from Aero to Classic.
>
> This also fixes the bug where "transparent_background" windows
> created in Classic render as black rectangles.
>
> BUG=260810
>
> Review URL: https://codereview.chromium.org/375183002
TBR=jackhou@chromium.org
Review URL: https://codereview.chromium.org/412033002
git-svn-id: svn://svn.chromium.org/chrome/branches/2062/src@285044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_window.cc')
-rw-r--r-- | apps/app_window.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/app_window.cc b/apps/app_window.cc index 814d2e0..427cdc6 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. @@ -751,6 +754,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 |