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

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: Address comments 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
Index: apps/app_window.cc
diff --git a/apps/app_window.cc b/apps/app_window.cc
index e2d837d4e3847cda39e2cf9954fccc150f5931b4..d452c65a3501bb3fb782b663179dd2e322a120d1 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);
@@ -751,6 +757,10 @@ 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()
+ : false);
Wez 2014/07/11 17:14:10 nit: Or simply |requested_transparent_background_
jackhou1 2014/07/14 03:05:24 Done.
// These properties are undocumented and are to enable testing. Alpha is
// removed to

Powered by Google App Engine
This is Rietveld 408576698