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

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

Issue 2883653002: Implement TouchSelectionEditing controls for OOPIF. (Closed)
Patch Set: Rebase to master@{#474649}. 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
(Empty)
1 // Copyright 2017 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_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_MA NAGER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT_MA NAGER_H_
7
8 #include "content/common/content_export.h"
9
10 namespace gfx {
11 class SelectionBound;
12 }
13
14 namespace ui {
15 class TouchSelectionController;
16 class TouchSelectionControllerClient;
17 class TouchSelectionMenuClient;
18 }
19
20 namespace content {
21
22 // This class defines an interface for a manager class that allows multiple
23 // TouchSelectionControllerClients to work together with a single
24 // TouchSelectionController.
25 class CONTENT_EXPORT TouchSelectionControllerClientManager {
26 public:
27 virtual ~TouchSelectionControllerClientManager() {}
28
29 // The manager uses this class' methods to notify observers about important
30 // events.
31 class CONTENT_EXPORT Observer {
32 public:
33 virtual ~Observer() {}
34
35 // Warns observers the manager is shutting down. The manager's view may not
36 // be rigidly defined with respect to the lifetime of the client's views.
37 virtual void OnManagerWillDestroy(
38 TouchSelectionControllerClientManager* manager) = 0;
39 };
40
41 // Clients call this method when their selection bounds change, so that the
42 // manager can determine which client should be considered the active client,
43 // i.e. receive the selection handles and (possibly) a quickmenu.
44 virtual void UpdateClientSelectionBounds(
45 const gfx::SelectionBound& start,
46 const gfx::SelectionBound& end,
47 ui::TouchSelectionControllerClient* client,
48 ui::TouchSelectionMenuClient* menu_client) = 0;
49 // Used by clients to inform the manager that the client no longer wants to
50 // participate in touch selection editing, usually because the client's view
51 // is being destroyed or detached.
52 virtual void InvalidateClient(ui::TouchSelectionControllerClient* client) = 0;
53 virtual ui::TouchSelectionController* GetTouchSelectionController() = 0;
54
55 virtual void AddObserver(Observer* observer) = 0;
56 virtual void RemoveObserver(Observer* observer) = 0;
57 };
58
59 } // namespace content
60
61 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_SELECTION_CONTROLLER_CLIENT _MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698