Chromium Code Reviews| 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 "content/browser/renderer_host/tap_suppression_controller.h" | 5 #include "content/browser/renderer_host/tap_suppression_controller.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/browser/renderer_host/tap_suppression_controller_client.h" | 9 #include "content/browser/renderer_host/tap_suppression_controller_client.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 state_ = GFC_IN_PROGRESS; | 26 state_ = GFC_IN_PROGRESS; |
| 27 break; | 27 break; |
| 28 case TAP_DOWN_STASHED: | 28 case TAP_DOWN_STASHED: |
| 29 break; | 29 break; |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 void TapSuppressionController::GestureFlingCancelAck(bool processed) { | 33 void TapSuppressionController::GestureFlingCancelAck(bool processed) { |
| 34 base::TimeTicks event_time = Now(); | 34 base::TimeTicks event_time = Now(); |
| 35 switch (state_) { | 35 switch (state_) { |
| 36 case NOTHING: | 36 case NOTHING: |
|
mohsen
2013/03/21 14:49:32
Here, I am allowing GFC Ack to arrive when we are
rjkroege
2013/03/21 17:17:01
I'm find with this but per the discussion about an
| |
| 37 NOTREACHED() << "GFC_ACK without a GFC"; | |
| 38 break; | 37 break; |
| 39 case GFC_IN_PROGRESS: | 38 case GFC_IN_PROGRESS: |
| 40 if (processed) | 39 if (processed) |
| 41 fling_cancel_time_ = event_time; | 40 fling_cancel_time_ = event_time; |
| 42 state_ = LAST_CANCEL_STOPPED_FLING; | 41 state_ = LAST_CANCEL_STOPPED_FLING; |
| 43 break; | 42 break; |
| 44 case TAP_DOWN_STASHED: | 43 case TAP_DOWN_STASHED: |
| 45 if (!processed) { | 44 if (!processed) { |
| 46 TRACE_EVENT0("browser", | 45 TRACE_EVENT0("browser", |
| 47 "TapSuppressionController::GestureFlingCancelAck"); | 46 "TapSuppressionController::GestureFlingCancelAck"); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 case TAP_DOWN_STASHED: | 140 case TAP_DOWN_STASHED: |
| 142 TRACE_EVENT0("browser", | 141 TRACE_EVENT0("browser", |
| 143 "TapSuppressionController::TapDownTimerExpired"); | 142 "TapSuppressionController::TapDownTimerExpired"); |
| 144 client_->ForwardStashedTapDownSkipDeferral(); | 143 client_->ForwardStashedTapDownSkipDeferral(); |
| 145 state_ = NOTHING; | 144 state_ = NOTHING; |
| 146 break; | 145 break; |
| 147 } | 146 } |
| 148 } | 147 } |
| 149 | 148 |
| 150 } // namespace content | 149 } // namespace content |
| OLD | NEW |