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/gestures/long_press_affordance_handler.h" | 5 #include "ash/wm/gestures/long_press_affordance_handler.h" |
6 | 6 |
oshima
2016/04/08 07:09:42
include?
| |
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 "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
11 #include "third_party/skia/include/core/SkPaint.h" | 11 #include "third_party/skia/include/core/SkPaint.h" |
12 #include "third_party/skia/include/core/SkPath.h" | 12 #include "third_party/skia/include/core/SkPath.h" |
13 #include "third_party/skia/include/core/SkRect.h" | 13 #include "third_party/skia/include/core/SkRect.h" |
14 #include "third_party/skia/include/effects/SkGradientShader.h" | 14 #include "third_party/skia/include/effects/SkGradientShader.h" |
15 #include "ui/aura/client/screen_position_client.h" | 15 #include "ui/aura/client/screen_position_client.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 // Paint inner circle. | 206 // Paint inner circle. |
207 PaintAffordanceArc(canvas, center, kAffordanceInnerRadius, | 207 PaintAffordanceArc(canvas, center, kAffordanceInnerRadius, |
208 kAffordanceInnerStartAngle, -current_angle_); | 208 kAffordanceInnerStartAngle, -current_angle_); |
209 // Paint outer circle. | 209 // Paint outer circle. |
210 PaintAffordanceArc(canvas, center, kAffordanceOuterRadius, | 210 PaintAffordanceArc(canvas, center, kAffordanceOuterRadius, |
211 kAffordanceOuterStartAngle, current_angle_); | 211 kAffordanceOuterStartAngle, current_angle_); |
212 | 212 |
213 canvas->Restore(); | 213 canvas->Restore(); |
214 } | 214 } |
215 | 215 |
216 scoped_ptr<views::Widget> widget_; | 216 std::unique_ptr<views::Widget> widget_; |
217 int current_angle_; | 217 int current_angle_; |
218 double current_scale_; | 218 double current_scale_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceView); | 220 DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceView); |
221 }; | 221 }; |
222 | 222 |
223 //////////////////////////////////////////////////////////////////////////////// | 223 //////////////////////////////////////////////////////////////////////////////// |
224 // LongPressAffordanceHandler, public | 224 // LongPressAffordanceHandler, public |
225 | 225 |
226 LongPressAffordanceHandler::LongPressAffordanceHandler() | 226 LongPressAffordanceHandler::LongPressAffordanceHandler() |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 break; | 348 break; |
349 } | 349 } |
350 } | 350 } |
351 | 351 |
352 void LongPressAffordanceHandler::OnWindowDestroying(aura::Window* window) { | 352 void LongPressAffordanceHandler::OnWindowDestroying(aura::Window* window) { |
353 DCHECK_EQ(tap_down_target_, window); | 353 DCHECK_EQ(tap_down_target_, window); |
354 StopAffordance(); | 354 StopAffordance(); |
355 } | 355 } |
356 | 356 |
357 } // namespace ash | 357 } // namespace ash |
OLD | NEW |