Chromium Code Reviews| Index: apps/ui/views/native_app_window_views.cc |
| diff --git a/apps/ui/views/native_app_window_views.cc b/apps/ui/views/native_app_window_views.cc |
| index 62b941d9e58db4628f080934c6bf49b1660b76a8..5fdbc4e839d66be40fdb860803477cc4d0ef58bb 100644 |
| --- a/apps/ui/views/native_app_window_views.cc |
| +++ b/apps/ui/views/native_app_window_views.cc |
| @@ -27,14 +27,12 @@ NativeAppWindowViews::NativeAppWindowViews() |
| web_view_(NULL), |
| widget_(NULL), |
| frameless_(false), |
| - transparent_background_(false), |
| resizable_(false) {} |
| void NativeAppWindowViews::Init(AppWindow* app_window, |
| const AppWindow::CreateParams& create_params) { |
| app_window_ = app_window; |
| frameless_ = create_params.frame == AppWindow::FRAME_NONE; |
| - transparent_background_ = create_params.transparent_background; |
| resizable_ = create_params.resizable; |
| size_constraints_.set_minimum_size( |
| create_params.GetContentMinimumSize(gfx::Insets())); |
| @@ -260,7 +258,8 @@ void NativeAppWindowViews::OnWidgetActivationChanged(views::Widget* widget, |
| void NativeAppWindowViews::RenderViewCreated( |
| content::RenderViewHost* render_view_host) { |
| - if (transparent_background_) { |
| + if (app_window_->RequestedTransparentBackground() && |
| + CanHaveTransparentBackground()) { |
| content::RenderWidgetHostView* view = render_view_host->GetView(); |
| DCHECK(view); |
| view->SetBackgroundOpaque(false); |
| @@ -398,4 +397,12 @@ void NativeAppWindowViews::SetContentSizeConstraints( |
| size_constraints_.set_maximum_size(max_size); |
| } |
| +bool NativeAppWindowViews::CanHaveTransparentBackground() const { |
| + return true; |
|
Wez
2014/07/09 22:03:30
So by default we're assuming that Views can always
jackhou1
2014/07/10 03:04:18
It looks like we use ChromeNativeAppWindowViews on
Wez
2014/07/11 17:14:10
Looks plausible, but I'm no expect on views/Aura.
jackhou1
2014/07/14 03:08:12
benwells, any advice on this?
|
| +} |
| + |
| +void NativeAppWindowViews::CanHaveTransparentBackgroundChanged() { |
| + app_window_->OnNativeWindowChanged(); |
|
Wez
2014/07/09 22:03:30
Does this fix the Classic->Aero transitions?
jackhou1
2014/07/10 03:04:18
This just updates alphaEnabled in the javascript c
Wez
2014/07/11 17:14:10
Acknowledged.
|
| +} |
| + |
| } // namespace apps |