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

Side by Side Diff: content/browser/renderer_host/input/gesture_text_selector.cc

Issue 401863003: Merge 279991 "[Android] Select text when stylus first button is ..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1985_122/src/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 "content/browser/renderer_host/input/gesture_text_selector.h" 5 #include "content/browser/renderer_host/input/gesture_text_selector.h"
6 6
7 #include "ui/events/event_constants.h" 7 #include "ui/events/event_constants.h"
8 #include "ui/events/gesture_detection/gesture_event_data.h" 8 #include "ui/events/gesture_detection/gesture_event_data.h"
9 #include "ui/events/gesture_detection/motion_event.h" 9 #include "ui/events/gesture_detection/motion_event.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 DCHECK_GT(event.GetPointerCount(), 0u); 65 DCHECK_GT(event.GetPointerCount(), 0u);
66 // Currently we are supporting stylus-only cases. 66 // Currently we are supporting stylus-only cases.
67 const bool is_stylus = 67 const bool is_stylus =
68 event.GetToolType(0) == ui::MotionEvent::TOOL_TYPE_STYLUS; 68 event.GetToolType(0) == ui::MotionEvent::TOOL_TYPE_STYLUS;
69 const bool is_only_secondary_button_pressed = 69 const bool is_only_secondary_button_pressed =
70 event.GetButtonState() == ui::MotionEvent::BUTTON_SECONDARY; 70 event.GetButtonState() == ui::MotionEvent::BUTTON_SECONDARY;
71 return is_stylus && is_only_secondary_button_pressed; 71 return is_stylus && is_only_secondary_button_pressed;
72 } 72 }
73 73
74 } // namespace content 74 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698