summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 00:36:23 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 00:36:23 +0000
commit5719891db284b3463975d703523127b44ae4fced (patch)
treeac527963a87c22979c3027bce3fff351a2926b42 /views
parent05c8dfc0afe5df8135acaed115f7b86d3ceda2b9 (diff)
downloadchromium_src-5719891db284b3463975d703523127b44ae4fced.zip
chromium_src-5719891db284b3463975d703523127b44ae4fced.tar.gz
chromium_src-5719891db284b3463975d703523127b44ae4fced.tar.bz2
Aura: Widgets obey transparency flag, default to opaque
NativeWidgetAura now respects the Widget::InitParams flag for transparency with respect to setting its layer opaque. This means that Aura widgets are now opaque by default, including the main Chrome browser window. BUG=none TEST=none Review URL: http://codereview.chromium.org/8510023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/native_widget_aura.cc3
-rw-r--r--views/widget/widget.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc
index 98e6126..7326fe4 100644
--- a/views/widget/native_widget_aura.cc
+++ b/views/widget/native_widget_aura.cc
@@ -131,8 +131,7 @@ void NativeWidgetAura::InitNativeWidget(const Widget::InitParams& params) {
if (window_type == Widget::InitParams::TYPE_CONTROL)
window_->Show();
- // TODO(beng): respect |params| authoritah wrt transparency.
- window_->layer()->SetFillsBoundsOpaquely(false);
+ window_->layer()->SetFillsBoundsOpaquely(!params.transparent);
delegate_->OnNativeWidgetCreated();
window_->set_minimum_size(delegate_->GetMinimumSize());
window_->SetBounds(params.bounds);
diff --git a/views/widget/widget.h b/views/widget/widget.h
index 0a4d59e..c3fc022 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -143,6 +143,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
WidgetDelegate* delegate;
bool child;
bool transient;
+ // If true, the widget may be fully or partially transparent. If false,
+ // we can perform optimizations based on the widget being fully opaque.
+ // Defaults to false.
bool transparent;
bool accept_events;
bool can_activate;