| Index: ash/wm/system_modal_container_layout_manager.cc
|
| diff --git a/ash/wm/system_modal_container_layout_manager.cc b/ash/wm/system_modal_container_layout_manager.cc
|
| index 6d1a07576e075451afa35569ad0057b75e4a48f9..192d5ab726db1cea8d629612fa14bbd750cf9182 100644
|
| --- a/ash/wm/system_modal_container_layout_manager.cc
|
| +++ b/ash/wm/system_modal_container_layout_manager.cc
|
| @@ -4,7 +4,6 @@
|
|
|
| #include "ash/wm/system_modal_container_layout_manager.h"
|
|
|
| -#include "ash/ash_switches.h"
|
| #include "ash/shell.h"
|
| #include "ash/shell_delegate.h"
|
| #include "ash/shell_window_ids.h"
|
| @@ -19,10 +18,10 @@
|
| #include "ui/views/corewm/compound_event_filter.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/base/events/event.h"
|
| +#include "ui/base/ui_base_switches.h"
|
| #include "ui/compositor/layer.h"
|
| #include "ui/compositor/layer_animator.h"
|
| #include "ui/compositor/scoped_layer_animation_settings.h"
|
| -#include "ui/gfx/canvas.h"
|
| #include "ui/gfx/screen.h"
|
| #include "ui/views/view.h"
|
| #include "ui/views/widget/widget.h"
|
| @@ -30,32 +29,6 @@
|
| namespace ash {
|
| namespace internal {
|
|
|
| -namespace {
|
| -
|
| -class ModalBackgroundView : public views::View {
|
| - public:
|
| - ModalBackgroundView() {}
|
| - virtual ~ModalBackgroundView() {}
|
| -
|
| - // Overridden from views::View:
|
| - virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE {
|
| - canvas->FillRect(GetLocalBounds(), GetOverlayColor());
|
| - }
|
| -
|
| - private:
|
| - SkColor GetOverlayColor() {
|
| - if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| - switches::kAuraGoogleDialogFrames)) {
|
| - return SK_ColorWHITE;
|
| - }
|
| - return SK_ColorBLACK;
|
| - }
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(ModalBackgroundView);
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // SystemModalContainerLayoutManager, public:
|
|
|
| @@ -188,7 +161,11 @@ void SystemModalContainerLayoutManager::CreateModalBackground() {
|
| modal_background_->Init(params);
|
| modal_background_->GetNativeView()->SetName(
|
| "SystemModalContainerLayoutManager.ModalBackground");
|
| - modal_background_->SetContentsView(new ModalBackgroundView);
|
| + views::View* contents_view = new views::View();
|
| + contents_view->set_background(views::Background::CreateSolidBackground(
|
| + CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableNewDialogStyle) ? SK_ColorWHITE : SK_ColorBLACK));
|
| + modal_background_->SetContentsView(contents_view);
|
| modal_background_->GetNativeView()->layer()->SetOpacity(0.0f);
|
| }
|
|
|
|
|