| Index: ui/chromeos/touch_exploration_controller.cc
|
| diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc
|
| index 74dfa5cb7b6e7dd96a36191d034f6518ca08efcb..1a77b971aa9b0c7ad59f56d2004267541b4592dc 100644
|
| --- a/ui/chromeos/touch_exploration_controller.cc
|
| +++ b/ui/chromeos/touch_exploration_controller.cc
|
| @@ -23,8 +23,7 @@
|
| : root_window_(root_window),
|
| state_(NO_FINGERS_DOWN),
|
| event_handler_for_testing_(NULL),
|
| - prev_state_(NO_FINGERS_DOWN),
|
| - VLOG_on_(true) {
|
| + prev_state_(NO_FINGERS_DOWN) {
|
| CHECK(root_window);
|
| root_window->GetHost()->GetEventSource()->AddEventRewriter(this);
|
| }
|
| @@ -40,13 +39,6 @@
|
| OnTapTimerFired();
|
| }
|
|
|
| -void TouchExplorationController::CallTapTimerNowIfRunningForTesting() {
|
| - if (tap_timer_.IsRunning()) {
|
| - tap_timer_.Stop();
|
| - OnTapTimerFired();
|
| - }
|
| -}
|
| -
|
| void TouchExplorationController::SetEventHandlerForTesting(
|
| ui::EventHandler* event_handler_for_testing) {
|
| event_handler_for_testing_ = event_handler_for_testing;
|
| @@ -56,18 +48,14 @@
|
| return state_ == NO_FINGERS_DOWN;
|
| }
|
|
|
| -void TouchExplorationController::SuppressVLOGsForTesting(bool suppress) {
|
| - VLOG_on_ = !suppress;
|
| -}
|
| -
|
| ui::EventRewriteStatus TouchExplorationController::RewriteEvent(
|
| const ui::Event& event,
|
| scoped_ptr<ui::Event>* rewritten_event) {
|
| if (!event.IsTouchEvent()) {
|
| if (event.IsKeyEvent()) {
|
| const ui::KeyEvent& key_event = static_cast<const ui::KeyEvent&>(event);
|
| - VLOG(0) << "\nKeyboard event: " << key_event.name()
|
| - << "\n Key code: " << key_event.key_code()
|
| + VLOG(0) << "\nKeyboard event: " << key_event.name() << "\n"
|
| + << " Key code: " << key_event.key_code()
|
| << ", Flags: " << key_event.flags()
|
| << ", Is char: " << key_event.is_char();
|
| }
|
| @@ -168,7 +156,7 @@
|
| VLOG_STATE();
|
| return ui::EVENT_REWRITE_DISCARD;
|
| }
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();;
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -208,7 +196,7 @@
|
| }
|
| return EVENT_REWRITE_DISCARD;
|
| }
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();;
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -240,10 +228,8 @@
|
| ResetToNoFingersDown();
|
| }
|
| return ui::EVENT_REWRITE_DISCARD;
|
| - } else if (type == ui::ET_TOUCH_MOVED){
|
| - return ui::EVENT_REWRITE_DISCARD;
|
| - }
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + }
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -269,7 +255,7 @@
|
| } else if (type == ui::ET_TOUCH_MOVED) {
|
| return ui::EVENT_REWRITE_DISCARD;
|
| }
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -300,7 +286,7 @@
|
| state_ = TOUCH_EXPLORE_RELEASED;
|
| VLOG_STATE();
|
| } else if (type != ui::ET_TOUCH_MOVED) {
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -309,6 +295,7 @@
|
| last_touch_exploration_.reset(new TouchEvent(event));
|
| return ui::EVENT_REWRITE_REWRITTEN;
|
| }
|
| +
|
|
|
| ui::EventRewriteStatus TouchExplorationController::InTwoToOneFinger(
|
| const ui::TouchEvent& event,
|
| @@ -368,7 +355,7 @@
|
| return ui::EVENT_REWRITE_REWRITTEN;
|
| }
|
| }
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + NOTREACHED() << "Unexpected event type received";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -379,7 +366,7 @@
|
|
|
| if (!(type == ui::ET_TOUCH_RELEASED || type == ui::ET_TOUCH_CANCELLED ||
|
| type == ui::ET_TOUCH_MOVED || type == ui::ET_TOUCH_PRESSED)) {
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -431,7 +418,7 @@
|
| VLOG_STATE();
|
| return ui::EVENT_REWRITE_REWRITTEN;
|
| }
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
|
|
| @@ -441,7 +428,7 @@
|
| ui::EventType type = event.type();
|
| if (!(type == ui::ET_TOUCH_PRESSED || type == ui::ET_TOUCH_MOVED ||
|
| type == ui::ET_TOUCH_RELEASED || type == ui::ET_TOUCH_CANCELLED)) {
|
| - NOTREACHED() << "Unexpected event type received: " << event.name();
|
| + NOTREACHED() << "Unexpected event type received.";
|
| return ui::EVENT_REWRITE_CONTINUE;
|
| }
|
| if (current_touch_ids_.size() == 0) {
|
| @@ -513,8 +500,6 @@
|
| }
|
|
|
| void TouchExplorationController::VlogState(const char* function_name) {
|
| - if (!VLOG_on_)
|
| - return;
|
| if (prev_state_ == state_)
|
| return;
|
| prev_state_ = state_;
|
| @@ -525,9 +510,6 @@
|
|
|
| void TouchExplorationController::VlogEvent(const ui::TouchEvent& touch_event,
|
| const char* function_name) {
|
| - if (!VLOG_on_)
|
| - return;
|
| -
|
| CHECK(touch_event.IsTouchEvent());
|
| if (prev_event_ != NULL &&
|
| prev_event_->type() == touch_event.type() &&
|
|
|