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

Side by Side Diff: ui/touch_selection/touch_selection_menu_runner.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: Rebased after addition of touch_handle_orientation file Created 5 years, 9 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 UI_TOUCH_SELECTION_TOUCH_SELECTION_MENU_RUNNER_H_
6 #define UI_TOUCH_SELECTION_TOUCH_SELECTION_MENU_RUNNER_H_
7
8 #include "base/logging.h"
9 #include "base/macros.h"
10 #include "ui/touch_selection/ui_touch_selection_export.h"
11
12 namespace aura {
13 class Window;
14 }
15
16 namespace gfx {
17 class Rect;
18 class Size;
19 }
20
21 namespace ui {
22
23 // Client interface for TouchSelectionMenuRunner.
24 class UI_TOUCH_SELECTION_EXPORT TouchSelectionMenuClient {
25 public:
26 virtual ~TouchSelectionMenuClient() {}
27
28 virtual bool IsCommandIdEnabled(int command_id) const = 0;
29 virtual void ExecuteCommand(int command_id, int event_flags) = 0;
30 virtual void OpenContextMenu() = 0;
31 };
32
33 // An interface for the singleton object responsible for running touch selection
34 // quick menu.
35 class UI_TOUCH_SELECTION_EXPORT TouchSelectionMenuRunner {
36 public:
37 virtual ~TouchSelectionMenuRunner();
38
39 static TouchSelectionMenuRunner* GetInstance();
40
41 virtual void RunMenu(TouchSelectionMenuClient* client,
42 const gfx::Rect& anchor_rect,
43 const gfx::Size& handle_image_size,
44 aura::Window* context) = 0;
45 virtual void CloseMenu() = 0;
46 virtual bool IsRunning() const = 0;
47
48 protected:
49 TouchSelectionMenuRunner();
50
51 private:
52 DISALLOW_COPY_AND_ASSIGN(TouchSelectionMenuRunner);
53 };
54
55 } // namespace ui
56
57 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_MENU_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698