OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ash/wm/system_modal_container_layout_manager.h" | 5 #include "ash/wm/system_modal_container_layout_manager.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "ash/wm/system_modal_container_event_filter.h" | 10 #include "ash/wm/system_modal_container_event_filter.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 class ScreenView : public views::View { | 31 class ScreenView : public views::View { |
32 public: | 32 public: |
33 ScreenView() {} | 33 ScreenView() {} |
34 virtual ~ScreenView() {} | 34 virtual ~ScreenView() {} |
35 | 35 |
36 // Overridden from views::View: | 36 // Overridden from views::View: |
37 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { | 37 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { |
38 canvas->FillRect(GetOverlayColor(), GetLocalBounds()); | 38 canvas->FillRect(GetLocalBounds(), GetOverlayColor()); |
39 } | 39 } |
40 | 40 |
41 private: | 41 private: |
42 SkColor GetOverlayColor() { | 42 SkColor GetOverlayColor() { |
43 if (CommandLine::ForCurrentProcess()->HasSwitch( | 43 if (CommandLine::ForCurrentProcess()->HasSwitch( |
44 switches::kAuraGoogleDialogFrames)) { | 44 switches::kAuraGoogleDialogFrames)) { |
45 return SK_ColorWHITE; | 45 return SK_ColorWHITE; |
46 } | 46 } |
47 return SK_ColorBLACK; | 47 return SK_ColorBLACK; |
48 } | 48 } |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 void SystemModalContainerLayoutManager::HideModalScreen() { | 206 void SystemModalContainerLayoutManager::HideModalScreen() { |
207 Shell::GetInstance()->RemoveRootWindowEventFilter(modality_filter_.get()); | 207 Shell::GetInstance()->RemoveRootWindowEventFilter(modality_filter_.get()); |
208 ui::ScopedLayerAnimationSettings settings( | 208 ui::ScopedLayerAnimationSettings settings( |
209 modal_screen_->GetNativeView()->layer()->GetAnimator()); | 209 modal_screen_->GetNativeView()->layer()->GetAnimator()); |
210 modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f); | 210 modal_screen_->GetNativeView()->layer()->SetOpacity(0.0f); |
211 } | 211 } |
212 | 212 |
213 } // namespace internal | 213 } // namespace internal |
214 } // namespace ash | 214 } // namespace ash |
OLD | NEW |