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/shelf/shelf_widget.h" | 5 #include "ash/shelf/shelf_widget.h" |
6 | 6 |
7 #include "ash/focus_cycler.h" | 7 #include "ash/focus_cycler.h" |
8 #include "ash/launcher/launcher_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
10 #include "ash/launcher/launcher_navigator.h" | 10 #include "ash/launcher/launcher_navigator.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 // views::WidgetDelegate overrides: | 65 // views::WidgetDelegate overrides: |
66 virtual views::Widget* GetWidget() OVERRIDE { | 66 virtual views::Widget* GetWidget() OVERRIDE { |
67 return View::GetWidget(); | 67 return View::GetWidget(); |
68 } | 68 } |
69 virtual const views::Widget* GetWidget() const OVERRIDE { | 69 virtual const views::Widget* GetWidget() const OVERRIDE { |
70 return View::GetWidget(); | 70 return View::GetWidget(); |
71 } | 71 } |
72 | 72 |
73 // ash::internal::BackgroundAnimatorDelegate overrides: | 73 // ash::internal::BackgroundAnimatorDelegate overrides: |
74 virtual void UpdateBackground(int alpha) { | 74 virtual void UpdateBackground(int alpha) OVERRIDE { |
75 alpha_ = alpha; | 75 alpha_ = alpha; |
76 SchedulePaint(); | 76 SchedulePaint(); |
77 } | 77 } |
78 | 78 |
79 // views::View overrides: | 79 // views::View overrides: |
80 void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; | 80 virtual void OnPaintBackground(gfx::Canvas* canvas) OVERRIDE; |
81 | 81 |
82 // A function to test the current alpha used. | 82 // A function to test the current alpha used. |
83 int get_dimming_alpha_for_test() { return alpha_; } | 83 int get_dimming_alpha_for_test() { return alpha_; } |
84 | 84 |
85 private: | 85 private: |
86 // This class monitors mouse events to see if it is on top of the launcher. | 86 // This class monitors mouse events to see if it is on top of the launcher. |
87 class DimmerEventFilter : public ui::EventHandler { | 87 class DimmerEventFilter : public ui::EventHandler { |
88 public: | 88 public: |
89 explicit DimmerEventFilter(DimmerView* owner); | 89 explicit DimmerEventFilter(DimmerView* owner); |
90 ~DimmerEventFilter(); | 90 virtual ~DimmerEventFilter(); |
91 | 91 |
92 // Overridden from ui::EventHandler: | 92 // Overridden from ui::EventHandler: |
93 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 93 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
94 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 94 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
95 | 95 |
96 private: | 96 private: |
97 // The owning class. | 97 // The owning class. |
98 DimmerView* owner_; | 98 DimmerView* owner_; |
99 | 99 |
100 // TRUE if the mouse is inside the shelf. | 100 // TRUE if the mouse is inside the shelf. |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 return gfx::Rect(); | 572 return gfx::Rect(); |
573 } | 573 } |
574 | 574 |
575 void ShelfWidget::DisableDimmingAnimationsForTest() { | 575 void ShelfWidget::DisableDimmingAnimationsForTest() { |
576 DCHECK(delegate_view_); | 576 DCHECK(delegate_view_); |
577 return delegate_view_->disable_dimming_animations_for_test(); | 577 return delegate_view_->disable_dimming_animations_for_test(); |
578 } | 578 } |
579 | 579 |
580 } // namespace ash | 580 } // namespace ash |
581 | 581 |
OLD | NEW |