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

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: Update Implicit Capture 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
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.
sky 2016/02/10 23:30:02 Please add something along the lines of 'delegate
jonross 2016/02/11 00:26:28 Done.
32 virtual void OnServerWindowCaptureLost(ServerWindow* window) = 0;
33
25 // |in_nonclient_area| is true if the event occurred in the non-client area. 34 // |in_nonclient_area| is true if the event occurred in the non-client area.
26 virtual void DispatchInputEventToWindow(ServerWindow* target, 35 virtual void DispatchInputEventToWindow(ServerWindow* target,
27 bool in_nonclient_area, 36 bool in_nonclient_area,
28 mojom::EventPtr event) = 0; 37 mojom::EventPtr event) = 0;
29 38
30 protected: 39 protected:
31 virtual ~EventDispatcherDelegate() {} 40 virtual ~EventDispatcherDelegate() {}
32 }; 41 };
33 42
34 } // namespace ws 43 } // namespace ws
35 } // namespace mus 44 } // namespace mus
36 45
37 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_ 46 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698