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

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

Issue 2180593002: mus: The window server needs to be able to write to the clipboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn check Created 4 years, 4 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 "mojo/public/cpp/bindings/array.h" 16 #include "mojo/public/cpp/bindings/array.h"
17 #include "mojo/public/cpp/bindings/binding.h" 17 #include "mojo/public/cpp/bindings/binding.h"
18 #include "services/ui/clipboard/clipboard_impl.h"
18 #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"
19 #include "services/ui/public/interfaces/window_tree.mojom.h" 20 #include "services/ui/public/interfaces/window_tree.mojom.h"
20 #include "services/ui/public/interfaces/window_tree_host.mojom.h" 21 #include "services/ui/public/interfaces/window_tree_host.mojom.h"
21 #include "services/ui/surfaces/surfaces_state.h" 22 #include "services/ui/surfaces/surfaces_state.h"
22 #include "services/ui/ws/display.h" 23 #include "services/ui/ws/display.h"
23 #include "services/ui/ws/display_manager_delegate.h" 24 #include "services/ui/ws/display_manager_delegate.h"
24 #include "services/ui/ws/ids.h" 25 #include "services/ui/ws/ids.h"
25 #include "services/ui/ws/operation.h" 26 #include "services/ui/ws/operation.h"
26 #include "services/ui/ws/server_window_delegate.h" 27 #include "services/ui/ws/server_window_delegate.h"
27 #include "services/ui/ws/server_window_observer.h" 28 #include "services/ui/ws/server_window_observer.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 125
125 // Returns the WindowTree that has |id| as a root. 126 // Returns the WindowTree that has |id| as a root.
126 WindowTree* GetTreeWithRoot(const ServerWindow* window) { 127 WindowTree* GetTreeWithRoot(const ServerWindow* window) {
127 return const_cast<WindowTree*>( 128 return const_cast<WindowTree*>(
128 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window)); 129 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window));
129 } 130 }
130 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const; 131 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const;
131 132
132 void OnFirstWindowManagerWindowTreeFactoryReady(); 133 void OnFirstWindowManagerWindowTreeFactoryReady();
133 134
135 clipboard::ClipboardImpl* GetClipboardForUser(const UserId& user_id);
136
134 UserActivityMonitor* GetUserActivityMonitorForUser(const UserId& user_id); 137 UserActivityMonitor* GetUserActivityMonitorForUser(const UserId& user_id);
135 138
136 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() { 139 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() {
137 return &window_manager_window_tree_factory_set_; 140 return &window_manager_window_tree_factory_set_;
138 } 141 }
139 142
140 // Sets focus to |window|. Returns true if |window| already has focus, or 143 // Sets focus to |window|. Returns true if |window| already has focus, or
141 // focus was successfully changed. Returns |false| if |window| is not a valid 144 // focus was successfully changed. Returns |false| if |window| is not a valid
142 // window to receive focus. 145 // window to receive focus.
143 bool SetFocusedWindow(ServerWindow* window); 146 bool SetFocusedWindow(ServerWindow* window);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 bool in_move_loop() const { return !!current_move_loop_; } 214 bool in_move_loop() const { return !!current_move_loop_; }
212 215
213 private: 216 private:
214 struct CurrentMoveLoopState; 217 struct CurrentMoveLoopState;
215 friend class Operation; 218 friend class Operation;
216 219
217 using WindowTreeMap = 220 using WindowTreeMap =
218 std::map<ClientSpecificId, std::unique_ptr<WindowTree>>; 221 std::map<ClientSpecificId, std::unique_ptr<WindowTree>>;
219 using UserActivityMonitorMap = 222 using UserActivityMonitorMap =
220 std::map<UserId, std::unique_ptr<UserActivityMonitor>>; 223 std::map<UserId, std::unique_ptr<UserActivityMonitor>>;
224 using UserClipboardMap =
225 std::map<UserId, std::unique_ptr<ui::clipboard::ClipboardImpl>>;
221 226
222 struct InFlightWindowManagerChange { 227 struct InFlightWindowManagerChange {
223 // Identifies the client that initiated the change. 228 // Identifies the client that initiated the change.
224 ClientSpecificId client_id; 229 ClientSpecificId client_id;
225 230
226 // Change id supplied by the client. 231 // Change id supplied by the client.
227 uint32_t client_change_id; 232 uint32_t client_change_id;
228 }; 233 };
229 234
230 using InFlightWindowManagerChangeMap = 235 using InFlightWindowManagerChangeMap =
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // Maps from window manager change id to the client that initiated the 348 // Maps from window manager change id to the client that initiated the
344 // request. 349 // request.
345 InFlightWindowManagerChangeMap in_flight_wm_change_map_; 350 InFlightWindowManagerChangeMap in_flight_wm_change_map_;
346 351
347 // Next id supplied to the window manager. 352 // Next id supplied to the window manager.
348 uint32_t next_wm_change_id_; 353 uint32_t next_wm_change_id_;
349 354
350 base::Callback<void(ServerWindow*)> window_paint_callback_; 355 base::Callback<void(ServerWindow*)> window_paint_callback_;
351 356
352 UserActivityMonitorMap activity_monitor_map_; 357 UserActivityMonitorMap activity_monitor_map_;
358 UserClipboardMap clipboard_map_;
353 359
354 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 360 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
355 361
356 DISALLOW_COPY_AND_ASSIGN(WindowServer); 362 DISALLOW_COPY_AND_ASSIGN(WindowServer);
357 }; 363 };
358 364
359 } // namespace ws 365 } // namespace ws
360 } // namespace ui 366 } // namespace ui
361 367
362 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 368 #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