Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: ui/chromeos/touch_exploration_controller.cc

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/chromeos/touch_exploration_controller.h" 5 #include "ui/chromeos/touch_exploration_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/time/default_tick_clock.h" 9 #include "base/time/default_tick_clock.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 // This is a short-term workaround for the limitation that we're using 979 // This is a short-term workaround for the limitation that we're using
980 // the ChromeVox content script to process touch exploration events, but 980 // the ChromeVox content script to process touch exploration events, but
981 // ChromeVox needs a way to distinguish between a real mouse move and a 981 // ChromeVox needs a way to distinguish between a real mouse move and a
982 // mouse move generated from touch exploration, so we have touch exploration 982 // mouse move generated from touch exploration, so we have touch exploration
983 // pretend that the command key was down (which becomes the "meta" key in 983 // pretend that the command key was down (which becomes the "meta" key in
984 // JavaScript). We can remove this hack when the ChromeVox content script 984 // JavaScript). We can remove this hack when the ChromeVox content script
985 // goes away and native accessibility code sends a touch exploration 985 // goes away and native accessibility code sends a touch exploration
986 // event to the new ChromeVox background page via the automation api. 986 // event to the new ChromeVox background page via the automation api.
987 flags |= ui::EF_COMMAND_DOWN; 987 flags |= ui::EF_COMMAND_DOWN;
988 988
989 return scoped_ptr<ui::Event>(new ui::MouseEvent( 989 return make_scoped_ptr(new ui::MouseEvent(
990 ui::ET_MOUSE_MOVED, location, location, ui::EventTimeForNow(), flags, 0)); 990 ui::ET_MOUSE_MOVED, location, location, ui::EventTimeForNow(), flags, 0));
991 } 991 }
992 992
993 void TouchExplorationController::EnterTouchToMouseMode() { 993 void TouchExplorationController::EnterTouchToMouseMode() {
994 aura::client::CursorClient* cursor_client = 994 aura::client::CursorClient* cursor_client =
995 aura::client::GetCursorClient(root_window_); 995 aura::client::GetCursorClient(root_window_);
996 if (cursor_client && !cursor_client->IsMouseEventsEnabled()) 996 if (cursor_client && !cursor_client->IsMouseEventsEnabled())
997 cursor_client->EnableMouseEvents(); 997 cursor_client->EnableMouseEvents();
998 if (cursor_client && cursor_client->IsCursorVisible()) 998 if (cursor_client && cursor_client->IsCursorVisible())
999 cursor_client->HideCursor(); 999 cursor_client->HideCursor();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 up_swipe_gestures_[4] = BindKeyEventWithFlags(VKEY_BROWSER_HOME, ui::EF_NONE); 1150 up_swipe_gestures_[4] = BindKeyEventWithFlags(VKEY_BROWSER_HOME, ui::EF_NONE);
1151 down_swipe_gestures_[4] = 1151 down_swipe_gestures_[4] =
1152 BindKeyEventWithFlags(VKEY_BROWSER_REFRESH, ui::EF_NONE); 1152 BindKeyEventWithFlags(VKEY_BROWSER_REFRESH, ui::EF_NONE);
1153 } 1153 }
1154 1154
1155 float TouchExplorationController::GetSplitTapTouchSlop() { 1155 float TouchExplorationController::GetSplitTapTouchSlop() {
1156 return gesture_detector_config_.touch_slop * 3; 1156 return gesture_detector_config_.touch_slop * 3;
1157 } 1157 }
1158 1158
1159 } // namespace ui 1159 } // namespace ui
OLDNEW
« no previous file with comments | « ui/app_list/search/mixer_unittest.cc ('k') | ui/display/chromeos/x11/display_configurator_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698