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

Side by Side Diff: content/browser/renderer_host/input/stylus_text_selector.h

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix rebase Created 3 years, 6 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 #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 13 matching lines...) Expand all
24 // Interface with which the StylusTextSelector conveys drag and tap gestures 24 // Interface with which the StylusTextSelector conveys drag and tap gestures
25 // when the activating button is pressed. 25 // when the activating button is pressed.
26 // selection handles, or long press. 26 // selection handles, or long press.
27 class CONTENT_EXPORT StylusTextSelectorClient { 27 class CONTENT_EXPORT StylusTextSelectorClient {
28 public: 28 public:
29 virtual ~StylusTextSelectorClient() {} 29 virtual ~StylusTextSelectorClient() {}
30 30
31 // (x0, y0) and (x1, y1) indicate the bounds of the initial selection. 31 // (x0, y0) and (x1, y1) indicate the bounds of the initial selection.
32 virtual void OnStylusSelectBegin(float x0, float y0, float x1, float y1) = 0; 32 virtual void OnStylusSelectBegin(float x0, float y0, float x1, float y1) = 0;
33 virtual void OnStylusSelectUpdate(float x, float y) = 0; 33 virtual void OnStylusSelectUpdate(float x, float y) = 0;
34 virtual void OnStylusSelectEnd() = 0; 34 virtual void OnStylusSelectEnd(float x, float y) = 0;
35 virtual void OnStylusSelectTap(base::TimeTicks time, float x, float y) = 0; 35 virtual void OnStylusSelectTap(base::TimeTicks time, float x, float y) = 0;
36 }; 36 };
37 37
38 // Provides stylus-based text selection and interaction, including: 38 // Provides stylus-based text selection and interaction, including:
39 // * Selection manipulation when an activating stylus button is pressed and 39 // * Selection manipulation when an activating stylus button is pressed and
40 // the stylus is dragged. 40 // the stylus is dragged.
41 // * Word selection and context menu activation when the when an activating 41 // * Word selection and context menu activation when the when an activating
42 // stylus button is pressed and the stylus is tapped. 42 // stylus button is pressed and the stylus is tapped.
43 class CONTENT_EXPORT StylusTextSelector : public ui::SimpleGestureListener { 43 class CONTENT_EXPORT StylusTextSelector : public ui::SimpleGestureListener {
44 public: 44 public:
(...skipping 30 matching lines...) Expand all
75 float anchor_x_; 75 float anchor_x_;
76 float anchor_y_; 76 float anchor_y_;
77 std::unique_ptr<ui::GestureDetector> gesture_detector_; 77 std::unique_ptr<ui::GestureDetector> gesture_detector_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(StylusTextSelector); 79 DISALLOW_COPY_AND_ASSIGN(StylusTextSelector);
80 }; 80 };
81 81
82 } // namespace content 82 } // namespace content
83 83
84 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_ 84 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_STYLUS_TEXT_SELECTOR_H_
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/input/stylus_text_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698