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

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: Fixed overrides in TouchHandleDrawableAura Created 5 years, 11 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 2014 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 // ...
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 // ...
34 class UI_TOUCH_SELECTION_EXPORT TouchSelectionMenuRunner {
35 public:
36 virtual ~TouchSelectionMenuRunner();
37
38 static TouchSelectionMenuRunner* GetInstance();
39
40 virtual void RunMenu(TouchSelectionMenuClient* client,
41 const gfx::Rect& anchor_rect,
42 const gfx::Size& handle_image_size,
43 aura::Window* context) = 0;
44 virtual void CloseMenu() = 0;
45 virtual bool IsRunning() const = 0;
46
47 protected:
48 TouchSelectionMenuRunner();
49
50 static void SetInstance(TouchSelectionMenuRunner* instance);
51
52 private:
53 DISALLOW_COPY_AND_ASSIGN(TouchSelectionMenuRunner);
54 };
55
56 } // namespace ui
57
58 #endif // UI_TOUCH_SELECTION_TOUCH_SELECTION_MENU_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698