| Index: apps/ui/views/native_app_window_views.cc
|
| ===================================================================
|
| --- apps/ui/views/native_app_window_views.cc (revision 285043)
|
| +++ apps/ui/views/native_app_window_views.cc (working copy)
|
| @@ -27,14 +27,12 @@
|
| 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()));
|
| @@ -53,6 +51,10 @@
|
| web_view_->SetWebContents(NULL);
|
| }
|
|
|
| +void NativeAppWindowViews::OnCanHaveAlphaEnabledChanged() {
|
| + app_window_->OnNativeWindowChanged();
|
| +}
|
| +
|
| void NativeAppWindowViews::InitializeWindow(
|
| AppWindow* app_window,
|
| const AppWindow::CreateParams& create_params) {
|
| @@ -260,7 +262,8 @@
|
|
|
| void NativeAppWindowViews::RenderViewCreated(
|
| content::RenderViewHost* render_view_host) {
|
| - if (transparent_background_) {
|
| + if (app_window_->requested_transparent_background() &&
|
| + CanHaveAlphaEnabled()) {
|
| content::RenderWidgetHostView* view = render_view_host->GetView();
|
| DCHECK(view);
|
| view->SetBackgroundOpaque(false);
|
| @@ -398,4 +401,8 @@
|
| size_constraints_.set_maximum_size(max_size);
|
| }
|
|
|
| +bool NativeAppWindowViews::CanHaveAlphaEnabled() const {
|
| + return widget_->IsTranslucentWindowOpacitySupported();
|
| +}
|
| +
|
| } // namespace apps
|
|
|