OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/touch/touch_hud_projection.h" | 5 #include "ash/touch/touch_hud_projection.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "third_party/skia/include/effects/SkGradientShader.h" | 9 #include "third_party/skia/include/effects/SkGradientShader.h" |
10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
11 #include "ui/gfx/animation/animation_delegate.h" | 11 #include "ui/gfx/animation/animation_delegate.h" |
12 #include "ui/gfx/animation/linear_animation.h" | 12 #include "ui/gfx/animation/linear_animation.h" |
13 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
15 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
16 | 16 |
17 namespace ash { | 17 namespace ash { |
18 namespace internal { | |
19 | 18 |
20 const int kPointRadius = 20; | 19 const int kPointRadius = 20; |
21 const SkColor kProjectionFillColor = SkColorSetRGB(0xF5, 0xF5, 0xDC); | 20 const SkColor kProjectionFillColor = SkColorSetRGB(0xF5, 0xF5, 0xDC); |
22 const SkColor kProjectionStrokeColor = SK_ColorGRAY; | 21 const SkColor kProjectionStrokeColor = SK_ColorGRAY; |
23 const int kProjectionAlpha = 0xB0; | 22 const int kProjectionAlpha = 0xB0; |
24 const int kFadeoutDurationInMs = 250; | 23 const int kFadeoutDurationInMs = 250; |
25 const int kFadeoutFrameRate = 60; | 24 const int kFadeoutFrameRate = 60; |
26 | 25 |
27 // TouchPointView draws a single touch point. This object manages its own | 26 // TouchPointView draws a single touch point. This object manages its own |
28 // lifetime and deletes itself upon fade-out completion or whenever |Remove()| | 27 // lifetime and deletes itself upon fade-out completion or whenever |Remove()| |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 void TouchHudProjection::SetHudForRootWindowController( | 177 void TouchHudProjection::SetHudForRootWindowController( |
179 RootWindowController* controller) { | 178 RootWindowController* controller) { |
180 controller->set_touch_hud_projection(this); | 179 controller->set_touch_hud_projection(this); |
181 } | 180 } |
182 | 181 |
183 void TouchHudProjection::UnsetHudForRootWindowController( | 182 void TouchHudProjection::UnsetHudForRootWindowController( |
184 RootWindowController* controller) { | 183 RootWindowController* controller) { |
185 controller->set_touch_hud_projection(NULL); | 184 controller->set_touch_hud_projection(NULL); |
186 } | 185 } |
187 | 186 |
188 } // namespace internal | |
189 } // namespace ash | 187 } // namespace ash |
OLD | NEW |