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

Unified Diff: ui/aura/window.cc

Issue 9169050: aura: No shadow for transparent window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments in #2 Created 8 years, 11 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 | « ui/aura/window.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index f5f64626d6ab507022150dca7094d221ae149c59..59914298dc31b3a2446e4fd12bada78fa8d83fc3 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -41,6 +41,7 @@ Window::Window(WindowDelegate* delegate)
parent_(NULL),
transient_parent_(NULL),
id_(-1),
+ transparent_(false),
user_data_(NULL),
stops_event_propagation_(false),
ignore_events_(false) {
@@ -100,6 +101,7 @@ void Window::Init(ui::Layer::LayerType layer_type) {
layer_->SetVisible(false);
layer_->set_delegate(this);
UpdateLayerName(name_);
+ layer_->SetFillsBoundsOpaquely(!transparent_);
RootWindow::GetInstance()->WindowInitialized(this);
}
@@ -117,6 +119,12 @@ void Window::SetName(const std::string& name) {
UpdateLayerName(name_);
}
+void Window::SetTransparent(bool transparent) {
+ // Cannot change transparent flag after the window is initialized.
+ DCHECK(!layer());
+ transparent_ = transparent;
+}
+
ui::Layer* Window::AcquireLayer() {
return layer_.release();
}
« no previous file with comments | « ui/aura/window.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698