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

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

Issue 1352043005: mus: Implement Window Server Capture Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added capture unit tests Created 5 years, 1 month 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 "components/mus/public/interfaces/input_events.mojom.h" 8 #include "components/mus/public/interfaces/input_events.mojom.h"
9 9
10 namespace mus { 10 namespace mus {
11 namespace ws { 11 namespace ws {
12 12
13 class ServerWindow; 13 class ServerWindow;
14 14
15 // Used by EventDispatcher for mocking in tests. 15 // Used by EventDispatcher for mocking in tests.
16 class EventDispatcherDelegate { 16 class EventDispatcherDelegate {
17 public: 17 public:
18 virtual void OnAccelerator(uint32_t accelerator, mojom::EventPtr event) = 0; 18 virtual void OnAccelerator(uint32_t accelerator, mojom::EventPtr event) = 0;
19 19
20 virtual void SetFocusedWindowFromEventDispatcher(ServerWindow* window) = 0; 20 virtual void SetFocusedWindowFromEventDispatcher(ServerWindow* window) = 0;
21 virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0; 21 virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0;
22 22
23 virtual void OnLostCapture(ServerWindow* window) = 0;
24
23 // |in_nonclient_area| is true if the event occurred in the non-client area. 25 // |in_nonclient_area| is true if the event occurred in the non-client area.
24 virtual void DispatchInputEventToWindow(ServerWindow* target, 26 virtual void DispatchInputEventToWindow(ServerWindow* target,
25 bool in_nonclient_area, 27 bool in_nonclient_area,
26 mojom::EventPtr event) = 0; 28 mojom::EventPtr event) = 0;
27 29
28 protected: 30 protected:
29 virtual ~EventDispatcherDelegate() {} 31 virtual ~EventDispatcherDelegate() {}
30 }; 32 };
31 33
32 } // namespace ws 34 } // namespace ws
33 } // namespace mus 35 } // namespace mus
34 36
35 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_ 37 #endif // COMPONENTS_MUS_WS_EVENT_DISPATCHER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698