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

Unified Diff: apps/app_window.cc

Issue 375183002: Add app.window.alphaEnabled() and onAlphaEnabledChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 5 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/native_app_window.h » ('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 db1f54399664886a0bbc753be79565fe9b04cfbc..340d54c299f05cdaee47a0d215b6cd26ec1de379 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())
@@ -285,6 +286,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));
popup_manager_.reset(
@@ -756,6 +759,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
« no previous file with comments | « apps/app_window.h ('k') | apps/ui/native_app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698