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

Side by Side Diff: components/mus/ws/event_dispatcher_delegate.h

Issue 1677513002: mus Window Server: implement event capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « components/mus/ws/event_dispatcher.cc ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_ 5 #ifndef COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_
6 #define COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_ 6 #define COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "components/mus/public/interfaces/input_events.mojom.h" 10 #include "components/mus/public/interfaces/input_events.mojom.h"
11 11
12 namespace mus { 12 namespace mus {
13 namespace ws { 13 namespace ws {
14 14
15 class ServerWindow; 15 class ServerWindow;
16 16
17 // Used by EventDispatcher for mocking in tests. 17 // Used by EventDispatcher for mocking in tests.
18 class EventDispatcherDelegate { 18 class EventDispatcherDelegate {
19 public: 19 public:
20 virtual void OnAccelerator(uint32_t accelerator, mojom::EventPtr event) = 0; 20 virtual void OnAccelerator(uint32_t accelerator, mojom::EventPtr event) = 0;
21 21
22 virtual void SetFocusedWindowFromEventDispatcher(ServerWindow* window) = 0; 22 virtual void SetFocusedWindowFromEventDispatcher(ServerWindow* window) = 0;
23 virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0; 23 virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0;
24 24
25 // Called when capture should be set on the native display.
26 virtual void SetNativeCapture() = 0;
27 // Called when the native display is having capture released. There is no
28 // longer a ServerWindow holding capture.
29 virtual void ReleaseNativeCapture() = 0;
30 // Called when |window| has lost capture. The native display may still be
31 // holding capture. The delegate should not change native display capture.
32 // ReleaseNativeCapture is invoked if appropriate.
33 virtual void OnServerWindowCaptureLost(ServerWindow* window) = 0;
34
25 // |in_nonclient_area| is true if the event occurred in the non-client area. 35 // |in_nonclient_area| is true if the event occurred in the non-client area.
26 virtual void DispatchInputEventToWindow(ServerWindow* target, 36 virtual void DispatchInputEventToWindow(ServerWindow* target,
27 bool in_nonclient_area, 37 bool in_nonclient_area,
28 mojom::EventPtr event) = 0; 38 mojom::EventPtr event) = 0;
29 39
30 protected: 40 protected:
31 virtual ~EventDispatcherDelegate() {} 41 virtual ~EventDispatcherDelegate() {}
32 }; 42 };
33 43
34 } // namespace ws 44 } // namespace ws
35 } // namespace mus 45 } // namespace mus
36 46
37 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_ 47 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/event_dispatcher.cc ('k') | components/mus/ws/event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698