Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 bool OnTouchEvent(const ui::MotionEvent& event); | 50 bool OnTouchEvent(const ui::MotionEvent& event); |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 friend class StylusTextSelectorTest; | 53 friend class StylusTextSelectorTest; |
| 54 FRIEND_TEST_ALL_PREFIXES(StylusTextSelectorTest, ShouldStartTextSelection); | 54 FRIEND_TEST_ALL_PREFIXES(StylusTextSelectorTest, ShouldStartTextSelection); |
| 55 | 55 |
| 56 // SimpleGestureListener implementation. | 56 // SimpleGestureListener implementation. |
| 57 bool OnSingleTapUp(const ui::MotionEvent& e, int tap_count) override; | 57 bool OnSingleTapUp(const ui::MotionEvent& e, int tap_count) override; |
| 58 bool OnScroll(const ui::MotionEvent& e1, | 58 bool OnScroll(const ui::MotionEvent& e1, |
| 59 const ui::MotionEvent& e2, | 59 const ui::MotionEvent& e2, |
| 60 const ui::MotionEvent& secondary_pointer_down_event, | |
|
tdresser
2016/06/28 15:24:18
I'd remove _event from the parameter name.
sahel
2016/06/29 16:26:18
Done.
| |
| 60 float distance_x, | 61 float distance_x, |
| 61 float distance_y) override; | 62 float distance_y) override; |
| 62 | 63 |
| 63 static bool ShouldStartTextSelection(const ui::MotionEvent& event); | 64 static bool ShouldStartTextSelection(const ui::MotionEvent& event); |
| 64 | 65 |
| 65 StylusTextSelectorClient* client_; | 66 StylusTextSelectorClient* client_; |
| 66 bool text_selection_triggered_; | 67 bool text_selection_triggered_; |
| 67 bool secondary_button_pressed_; | 68 bool secondary_button_pressed_; |
| 68 bool dragging_; | 69 bool dragging_; |
| 69 bool dragged_; | 70 bool dragged_; |
| 70 float anchor_x_; | 71 float anchor_x_; |
| 71 float anchor_y_; | 72 float anchor_y_; |
| 72 std::unique_ptr<ui::GestureDetector> gesture_detector_; | 73 std::unique_ptr<ui::GestureDetector> gesture_detector_; |
| 73 | 74 |
| 74 DISALLOW_COPY_AND_ASSIGN(StylusTextSelector); | 75 DISALLOW_COPY_AND_ASSIGN(StylusTextSelector); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace content | 78 } // namespace content |
| 78 | 79 |
| 79 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ | 80 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ |
| OLD | NEW |