| 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 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 double current_scale_; | 233 double current_scale_; |
| 234 | 234 |
| 235 DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceView); | 235 DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceView); |
| 236 }; | 236 }; |
| 237 | 237 |
| 238 //////////////////////////////////////////////////////////////////////////////// | 238 //////////////////////////////////////////////////////////////////////////////// |
| 239 // LongPressAffordanceHandler, public | 239 // LongPressAffordanceHandler, public |
| 240 | 240 |
| 241 LongPressAffordanceHandler::LongPressAffordanceHandler() | 241 LongPressAffordanceHandler::LongPressAffordanceHandler() |
| 242 : ui::LinearAnimation(kAffordanceFrameRateHz, this), | 242 : ui::LinearAnimation(kAffordanceFrameRateHz, this), |
| 243 view_(NULL), | |
| 244 tap_down_touch_id_(-1), | 243 tap_down_touch_id_(-1), |
| 245 tap_down_display_id_(0), | 244 tap_down_display_id_(0), |
| 246 current_animation_type_(NONE) { | 245 current_animation_type_(NONE) {} |
| 247 } | |
| 248 | 246 |
| 249 LongPressAffordanceHandler::~LongPressAffordanceHandler() {} | 247 LongPressAffordanceHandler::~LongPressAffordanceHandler() {} |
| 250 | 248 |
| 251 void LongPressAffordanceHandler::ProcessEvent(aura::Window* target, | 249 void LongPressAffordanceHandler::ProcessEvent(aura::Window* target, |
| 252 ui::LocatedEvent* event, | 250 ui::LocatedEvent* event, |
| 253 int touch_id) { | 251 int touch_id) { |
| 254 // Once we have a touch id, we are only interested in event of that touch id. | 252 // Once we have a touch id, we are only interested in event of that touch id. |
| 255 if (tap_down_touch_id_ != -1 && tap_down_touch_id_ != touch_id) | 253 if (tap_down_touch_id_ != -1 && tap_down_touch_id_ != touch_id) |
| 256 return; | 254 return; |
| 257 int64 timer_start_time_ms = | 255 int64 timer_start_time_ms = |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 default: | 368 default: |
| 371 view_.reset(); | 369 view_.reset(); |
| 372 tap_down_touch_id_ = -1; | 370 tap_down_touch_id_ = -1; |
| 373 tap_down_display_id_ = 0; | 371 tap_down_display_id_ = 0; |
| 374 break; | 372 break; |
| 375 } | 373 } |
| 376 } | 374 } |
| 377 | 375 |
| 378 } // namespace internal | 376 } // namespace internal |
| 379 } // namespace ash | 377 } // namespace ash |
| OLD | NEW |