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

Side by Side Diff: content/browser/web_contents/aura/touch_selection_controller_client_aura.h

Issue 698253004: Reland: Implement Aura side of unified touch text selection for contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test failures on Mac Created 5 years, 7 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_AURA_TOUCH_SELECTION_CONTROLLER_CLIENT_AURA _H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_AURA_TOUCH_SELECTION_CONTROLLER_CLIENT_AURA _H_
7
8 #include "base/timer/timer.h"
9 #include "content/common/content_export.h"
10 #include "ui/touch_selection/touch_selection_controller.h"
11 #include "ui/touch_selection/touch_selection_menu_runner.h"
12
13 namespace content {
14 class RenderWidgetHostViewAura;
15
16 // An implementation of |TouchSelectionControllerClient| to be used in Aura's
17 // implementation of touch selection for contents.
18 class CONTENT_EXPORT TouchSelectionControllerClientAura
19 : public ui::TouchSelectionControllerClient,
20 public ui::TouchSelectionMenuClient {
21 public:
22 explicit TouchSelectionControllerClientAura(RenderWidgetHostViewAura* rwhva);
23 ~TouchSelectionControllerClientAura() override;
24
25 private:
26 class EnvPreTargetHandler;
27
28 // ui::TouchSelectionControllerClient:
29 bool SupportsAnimation() const override;
30 void SetNeedsAnimate() override;
31 void MoveCaret(const gfx::PointF& position) override;
32 void MoveRangeSelectionExtent(const gfx::PointF& extent) override;
33 void SelectBetweenCoordinates(const gfx::PointF& base,
34 const gfx::PointF& extent) override;
35 void OnSelectionEvent(ui::SelectionEventType event) override;
36 scoped_ptr<ui::TouchHandleDrawable> CreateDrawable() override;
37 void OnScrollStarted() override;
38 void OnScrollCompleted() override;
39
40 // ui::TouchSelectionMenuClient:
41 bool IsCommandIdEnabled(int command_id) const override;
42 void ExecuteCommand(int command_id, int event_flags) override;
43 void OpenContextMenu() override;
44
45 bool IsQuickMenuAllowed() const;
46 void ShowQuickMenu();
47 void UpdateQuickMenu();
sadrul 2015/04/29 19:55:03 non-overrides before overrides
mohsen 2015/04/30 18:29:34 Done.
48
49 // Not owned, non-null for the lifetime of this object.
50 RenderWidgetHostViewAura* rwhva_;
51
52 base::Timer quick_menu_timer_;
53 bool scroll_in_progress_;
54 bool handle_drag_in_progress_;
55 scoped_ptr<EnvPreTargetHandler> env_pre_target_handler_;
56
57 DISALLOW_COPY_AND_ASSIGN(TouchSelectionControllerClientAura);
58 };
59
60 } // namespace content
61
62 #endif // CONTENT_BROWSER_WEB_CONTENTS_AURA_TOUCH_SELECTION_CONTROLLER_CLIENT_A URA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698