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

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

Issue 1987133002: Delete mus surfaces hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 4 years, 7 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/window_finder_unittest.cc ('k') | components/mus/ws/window_manager_state.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WINDOW_MANAGER_STATE_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_
6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "components/mus/public/interfaces/display.mojom.h" 14 #include "components/mus/public/interfaces/display.mojom.h"
15 #include "components/mus/ws/event_dispatcher.h" 15 #include "components/mus/ws/event_dispatcher.h"
16 #include "components/mus/ws/event_dispatcher_delegate.h" 16 #include "components/mus/ws/event_dispatcher_delegate.h"
17 #include "components/mus/ws/user_id.h" 17 #include "components/mus/ws/user_id.h"
18 #include "components/mus/ws/window_server.h" 18 #include "components/mus/ws/window_server.h"
19 19
20 namespace cc {
21 struct SurfaceId;
22 }
23
24 namespace mus { 20 namespace mus {
25 namespace ws { 21 namespace ws {
26 22
27 class Accelerator; 23 class Accelerator;
28 class Display; 24 class Display;
29 class PlatformDisplay; 25 class PlatformDisplay;
30 class ServerWindow; 26 class ServerWindow;
31 class WindowTree; 27 class WindowTree;
32 28
33 namespace test { 29 namespace test {
34 class WindowManagerStateTestApi; 30 class WindowManagerStateTestApi;
35 } 31 }
36 32
37 // Manages the state associated with a connection to a WindowManager for 33 // Manages the state associated with a connection to a WindowManager for
38 // a specific user. 34 // a specific user.
39 class WindowManagerState : public EventDispatcherDelegate { 35 class WindowManagerState : public EventDispatcherDelegate {
40 public: 36 public:
41 // Creates a WindowManagerState that can host content from any user. 37 // Creates a WindowManagerState that can host content from any user.
38 WindowManagerState(Display* display, PlatformDisplay* platform_display);
42 WindowManagerState(Display* display, 39 WindowManagerState(Display* display,
43 PlatformDisplay* platform_display, 40 PlatformDisplay* platform_display,
44 cc::SurfaceId surface_id);
45 WindowManagerState(Display* display,
46 PlatformDisplay* platform_display,
47 cc::SurfaceId surface_id,
48 const UserId& user_id); 41 const UserId& user_id);
49 ~WindowManagerState() override; 42 ~WindowManagerState() override;
50 43
51 bool is_user_id_valid() const { return is_user_id_valid_; } 44 bool is_user_id_valid() const { return is_user_id_valid_; }
52 45
53 const UserId& user_id() const { return user_id_; } 46 const UserId& user_id() const { return user_id_; }
54 47
55 ServerWindow* root() { return root_.get(); } 48 ServerWindow* root() { return root_.get(); }
56 const ServerWindow* root() const { return root_.get(); } 49 const ServerWindow* root() const { return root_.get(); }
57 50
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 struct QueuedEvent { 113 struct QueuedEvent {
121 QueuedEvent(); 114 QueuedEvent();
122 ~QueuedEvent(); 115 ~QueuedEvent();
123 116
124 std::unique_ptr<ui::Event> event; 117 std::unique_ptr<ui::Event> event;
125 std::unique_ptr<ProcessedEventTarget> processed_target; 118 std::unique_ptr<ProcessedEventTarget> processed_target;
126 }; 119 };
127 120
128 WindowManagerState(Display* display, 121 WindowManagerState(Display* display,
129 PlatformDisplay* platform_display, 122 PlatformDisplay* platform_display,
130 cc::SurfaceId surface_id,
131 bool is_user_id_valid, 123 bool is_user_id_valid,
132 const UserId& user_id); 124 const UserId& user_id);
133 125
134 WindowServer* window_server(); 126 WindowServer* window_server();
135 127
136 void OnEventAckTimeout(); 128 void OnEventAckTimeout();
137 129
138 // Schedules an event to be processed later. 130 // Schedules an event to be processed later.
139 void QueueEvent(const ui::Event& event, 131 void QueueEvent(const ui::Event& event,
140 std::unique_ptr<ProcessedEventTarget> processed_event_target); 132 std::unique_ptr<ProcessedEventTarget> processed_event_target);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 186
195 EventDispatcher event_dispatcher_; 187 EventDispatcher event_dispatcher_;
196 188
197 DISALLOW_COPY_AND_ASSIGN(WindowManagerState); 189 DISALLOW_COPY_AND_ASSIGN(WindowManagerState);
198 }; 190 };
199 191
200 } // namespace ws 192 } // namespace ws
201 } // namespace mus 193 } // namespace mus
202 194
203 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_ 195 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_STATE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_finder_unittest.cc ('k') | components/mus/ws/window_manager_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698