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

Side by Side Diff: services/ui/ws/window_server.h

Issue 2339353003: mus: Remove window server access to clipboard and the drag clipboard. (Closed)
Patch Set: Created 4 years, 3 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 | « services/ui/ws/BUILD.gn ('k') | services/ui/ws/window_server.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_UI_WS_WINDOW_SERVER_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_SERVER_H_
6 #define SERVICES_UI_WS_WINDOW_SERVER_H_ 6 #define SERVICES_UI_WS_WINDOW_SERVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/optional.h" 16 #include "base/optional.h"
17 #include "mojo/public/cpp/bindings/array.h" 17 #include "mojo/public/cpp/bindings/array.h"
18 #include "mojo/public/cpp/bindings/binding.h" 18 #include "mojo/public/cpp/bindings/binding.h"
19 #include "services/ui/clipboard/clipboard_impl.h"
20 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h" 19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h"
21 #include "services/ui/public/interfaces/window_tree.mojom.h" 20 #include "services/ui/public/interfaces/window_tree.mojom.h"
22 #include "services/ui/public/interfaces/window_tree_host.mojom.h" 21 #include "services/ui/public/interfaces/window_tree_host.mojom.h"
23 #include "services/ui/surfaces/surfaces_state.h" 22 #include "services/ui/surfaces/surfaces_state.h"
24 #include "services/ui/ws/display.h" 23 #include "services/ui/ws/display.h"
25 #include "services/ui/ws/gpu_service_proxy_delegate.h" 24 #include "services/ui/ws/gpu_service_proxy_delegate.h"
26 #include "services/ui/ws/ids.h" 25 #include "services/ui/ws/ids.h"
27 #include "services/ui/ws/operation.h" 26 #include "services/ui/ws/operation.h"
28 #include "services/ui/ws/server_window_delegate.h" 27 #include "services/ui/ws/server_window_delegate.h"
29 #include "services/ui/ws/server_window_observer.h" 28 #include "services/ui/ws/server_window_observer.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 129
131 // Returns the WindowTree that has |id| as a root. 130 // Returns the WindowTree that has |id| as a root.
132 WindowTree* GetTreeWithRoot(const ServerWindow* window) { 131 WindowTree* GetTreeWithRoot(const ServerWindow* window) {
133 return const_cast<WindowTree*>( 132 return const_cast<WindowTree*>(
134 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window)); 133 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window));
135 } 134 }
136 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const; 135 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const;
137 136
138 void OnFirstWindowManagerWindowTreeFactoryReady(); 137 void OnFirstWindowManagerWindowTreeFactoryReady();
139 138
140 clipboard::ClipboardImpl* GetClipboardForUser(const UserId& user_id);
141
142 UserActivityMonitor* GetUserActivityMonitorForUser(const UserId& user_id); 139 UserActivityMonitor* GetUserActivityMonitorForUser(const UserId& user_id);
143 140
144 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() { 141 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() {
145 return &window_manager_window_tree_factory_set_; 142 return &window_manager_window_tree_factory_set_;
146 } 143 }
147 144
148 // Sets focus to |window|. Returns true if |window| already has focus, or 145 // Sets focus to |window|. Returns true if |window| already has focus, or
149 // focus was successfully changed. Returns |false| if |window| is not a valid 146 // focus was successfully changed. Returns |false| if |window| is not a valid
150 // window to receive focus. 147 // window to receive focus.
151 bool SetFocusedWindow(ServerWindow* window); 148 bool SetFocusedWindow(ServerWindow* window);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 241
245 private: 242 private:
246 struct CurrentMoveLoopState; 243 struct CurrentMoveLoopState;
247 struct CurrentDragLoopState; 244 struct CurrentDragLoopState;
248 friend class Operation; 245 friend class Operation;
249 246
250 using WindowTreeMap = 247 using WindowTreeMap =
251 std::map<ClientSpecificId, std::unique_ptr<WindowTree>>; 248 std::map<ClientSpecificId, std::unique_ptr<WindowTree>>;
252 using UserActivityMonitorMap = 249 using UserActivityMonitorMap =
253 std::map<UserId, std::unique_ptr<UserActivityMonitor>>; 250 std::map<UserId, std::unique_ptr<UserActivityMonitor>>;
254 using UserClipboardMap =
255 std::map<UserId, std::unique_ptr<ui::clipboard::ClipboardImpl>>;
256 251
257 struct InFlightWindowManagerChange { 252 struct InFlightWindowManagerChange {
258 // Identifies the client that initiated the change. 253 // Identifies the client that initiated the change.
259 ClientSpecificId client_id; 254 ClientSpecificId client_id;
260 255
261 // Change id supplied by the client. 256 // Change id supplied by the client.
262 uint32_t client_change_id; 257 uint32_t client_change_id;
263 }; 258 };
264 259
265 using InFlightWindowManagerChangeMap = 260 using InFlightWindowManagerChangeMap =
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 InFlightWindowManagerChangeMap in_flight_wm_change_map_; 370 InFlightWindowManagerChangeMap in_flight_wm_change_map_;
376 371
377 // Next id supplied to the window manager. 372 // Next id supplied to the window manager.
378 uint32_t next_wm_change_id_; 373 uint32_t next_wm_change_id_;
379 374
380 std::unique_ptr<GpuServiceProxy> gpu_proxy_; 375 std::unique_ptr<GpuServiceProxy> gpu_proxy_;
381 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; 376 scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
382 base::Callback<void(ServerWindow*)> window_paint_callback_; 377 base::Callback<void(ServerWindow*)> window_paint_callback_;
383 378
384 UserActivityMonitorMap activity_monitor_map_; 379 UserActivityMonitorMap activity_monitor_map_;
385 UserClipboardMap clipboard_map_;
386 380
387 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 381 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
388 382
389 DISALLOW_COPY_AND_ASSIGN(WindowServer); 383 DISALLOW_COPY_AND_ASSIGN(WindowServer);
390 }; 384 };
391 385
392 } // namespace ws 386 } // namespace ws
393 } // namespace ui 387 } // namespace ui
394 388
395 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 389 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_
OLDNEW
« no previous file with comments | « services/ui/ws/BUILD.gn ('k') | services/ui/ws/window_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698