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

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

Issue 2266603002: mus: Implement interwindow drag and drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Uploaded for a few comments. 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
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 "mojo/public/cpp/bindings/array.h" 17 #include "mojo/public/cpp/bindings/array.h"
17 #include "mojo/public/cpp/bindings/binding.h" 18 #include "mojo/public/cpp/bindings/binding.h"
18 #include "services/ui/clipboard/clipboard_impl.h" 19 #include "services/ui/clipboard/clipboard_impl.h"
19 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h" 20 #include "services/ui/public/interfaces/window_manager_window_tree_factory.mojom .h"
20 #include "services/ui/public/interfaces/window_tree.mojom.h" 21 #include "services/ui/public/interfaces/window_tree.mojom.h"
21 #include "services/ui/public/interfaces/window_tree_host.mojom.h" 22 #include "services/ui/public/interfaces/window_tree_host.mojom.h"
22 #include "services/ui/surfaces/surfaces_state.h" 23 #include "services/ui/surfaces/surfaces_state.h"
23 #include "services/ui/ws/display.h" 24 #include "services/ui/ws/display.h"
24 #include "services/ui/ws/display_manager_delegate.h" 25 #include "services/ui/ws/display_manager_delegate.h"
25 #include "services/ui/ws/ids.h" 26 #include "services/ui/ws/ids.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 ServerWindow* window, 210 ServerWindow* window,
210 WindowTree* initiator, 211 WindowTree* initiator,
211 const gfx::Rect& revert_bounds); 212 const gfx::Rect& revert_bounds);
212 void EndMoveLoop(); 213 void EndMoveLoop();
213 uint32_t GetCurrentMoveLoopChangeId(); 214 uint32_t GetCurrentMoveLoopChangeId();
214 ServerWindow* GetCurrentMoveLoopWindow(); 215 ServerWindow* GetCurrentMoveLoopWindow();
215 WindowTree* GetCurrentMoveLoopInitiator(); 216 WindowTree* GetCurrentMoveLoopInitiator();
216 gfx::Rect GetCurrentMoveLoopRevertBounds(); 217 gfx::Rect GetCurrentMoveLoopRevertBounds();
217 bool in_move_loop() const { return !!current_move_loop_; } 218 bool in_move_loop() const { return !!current_move_loop_; }
218 219
220 void StartDragLoop(uint32_t change_id);
221 void EndDragLoop();
222 uint32_t GetCurrentDragLoopChangeId();
223 bool in_drag_loop() const { return current_drag_loop_.has_value(); }
224
219 private: 225 private:
220 struct CurrentMoveLoopState; 226 struct CurrentMoveLoopState;
221 friend class Operation; 227 friend class Operation;
222 228
223 using WindowTreeMap = 229 using WindowTreeMap =
224 std::map<ClientSpecificId, std::unique_ptr<WindowTree>>; 230 std::map<ClientSpecificId, std::unique_ptr<WindowTree>>;
225 using UserActivityMonitorMap = 231 using UserActivityMonitorMap =
226 std::map<UserId, std::unique_ptr<UserActivityMonitor>>; 232 std::map<UserId, std::unique_ptr<UserActivityMonitor>>;
227 using UserClipboardMap = 233 using UserClipboardMap =
228 std::map<UserId, std::unique_ptr<ui::clipboard::ClipboardImpl>>; 234 std::map<UserId, std::unique_ptr<ui::clipboard::ClipboardImpl>>;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 WindowServerDelegate* delegate_; 335 WindowServerDelegate* delegate_;
330 336
331 // State for rendering into a Surface. 337 // State for rendering into a Surface.
332 scoped_refptr<ui::SurfacesState> surfaces_state_; 338 scoped_refptr<ui::SurfacesState> surfaces_state_;
333 339
334 // ID to use for next WindowTree. 340 // ID to use for next WindowTree.
335 ClientSpecificId next_client_id_; 341 ClientSpecificId next_client_id_;
336 342
337 std::unique_ptr<DisplayManager> display_manager_; 343 std::unique_ptr<DisplayManager> display_manager_;
338 344
345 base::Optional<uint32_t> current_drag_loop_;
346
339 std::unique_ptr<CurrentMoveLoopState> current_move_loop_; 347 std::unique_ptr<CurrentMoveLoopState> current_move_loop_;
340 348
341 // Set of WindowTrees. 349 // Set of WindowTrees.
342 WindowTreeMap tree_map_; 350 WindowTreeMap tree_map_;
343 351
344 // If non-null then we're processing a client operation. The Operation is 352 // If non-null then we're processing a client operation. The Operation is
345 // not owned by us (it's created on the stack by WindowTree). 353 // not owned by us (it's created on the stack by WindowTree).
346 Operation* current_operation_; 354 Operation* current_operation_;
347 355
348 bool in_destructor_; 356 bool in_destructor_;
(...skipping 13 matching lines...) Expand all
362 370
363 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; 371 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_;
364 372
365 DISALLOW_COPY_AND_ASSIGN(WindowServer); 373 DISALLOW_COPY_AND_ASSIGN(WindowServer);
366 }; 374 };
367 375
368 } // namespace ws 376 } // namespace ws
369 } // namespace ui 377 } // namespace ui
370 378
371 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_ 379 #endif // SERVICES_UI_WS_WINDOW_SERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698