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

Side by Side Diff: services/ui/ws/window_tree.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, 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
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_TREE_H_ 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_
6 #define SERVICES_UI_WS_WINDOW_TREE_H_ 6 #define SERVICES_UI_WS_WINDOW_TREE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // required. 186 // required.
187 void OnAccelerator(uint32_t accelerator_id, 187 void OnAccelerator(uint32_t accelerator_id,
188 const ui::Event& event, 188 const ui::Event& event,
189 bool needs_ack); 189 bool needs_ack);
190 190
191 // Called when |tree|'s jankiness changes (see janky_ for definition). 191 // Called when |tree|'s jankiness changes (see janky_ for definition).
192 // Notifies the window manager client so it can update UI for the affected 192 // Notifies the window manager client so it can update UI for the affected
193 // window(s). 193 // window(s).
194 void ClientJankinessChanged(WindowTree* tree); 194 void ClientJankinessChanged(WindowTree* tree);
195 195
196 // The following methods send drag and drop messages to the client and return
197 // their results through the passed in callback.
198 void PerformOnDragEnter(
199 const ServerWindow* window,
200 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data,
201 uint32_t key_state,
202 const gfx::Point& cursor_offset,
203 uint32_t effect_bitmask,
204 const base::Callback<void(uint32_t)>& callback);
205 void PerformOnDragOver(const ServerWindow* window,
206 uint32_t key_state,
207 const gfx::Point& cursor_offset,
208 uint32_t effect_bitmask,
209 const base::Callback<void(uint32_t)>& callback);
210 void PerformOnDragLeave(const ServerWindow* window);
211 void PerformOnDragDrop(const ServerWindow* window,
212 uint32_t key_state,
213 const gfx::Point& cursor_offset,
214 uint32_t effect_bitmask,
215 const base::Callback<void(uint32_t)>& callback);
216
196 // The following methods are invoked after the corresponding change has been 217 // The following methods are invoked after the corresponding change has been
197 // processed. They do the appropriate bookkeeping and update the client as 218 // processed. They do the appropriate bookkeeping and update the client as
198 // necessary. 219 // necessary.
199 void ProcessWindowBoundsChanged(const ServerWindow* window, 220 void ProcessWindowBoundsChanged(const ServerWindow* window,
200 const gfx::Rect& old_bounds, 221 const gfx::Rect& old_bounds,
201 const gfx::Rect& new_bounds, 222 const gfx::Rect& new_bounds,
202 bool originated_change); 223 bool originated_change);
203 void ProcessClientAreaChanged( 224 void ProcessClientAreaChanged(
204 const ServerWindow* window, 225 const ServerWindow* window,
205 const gfx::Insets& new_client_area, 226 const gfx::Insets& new_client_area,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 mojo::TextInputStatePtr state) override; 432 mojo::TextInputStatePtr state) override;
412 void SetImeVisibility(Id transport_window_id, 433 void SetImeVisibility(Id transport_window_id,
413 bool visible, 434 bool visible,
414 mojo::TextInputStatePtr state) override; 435 mojo::TextInputStatePtr state) override;
415 void OnWindowInputEventAck(uint32_t event_id, 436 void OnWindowInputEventAck(uint32_t event_id,
416 mojom::EventResult result) override; 437 mojom::EventResult result) override;
417 void SetClientArea( 438 void SetClientArea(
418 Id transport_window_id, 439 Id transport_window_id,
419 const gfx::Insets& insets, 440 const gfx::Insets& insets,
420 mojo::Array<gfx::Rect> transport_additional_client_areas) override; 441 mojo::Array<gfx::Rect> transport_additional_client_areas) override;
442 void SetCanAcceptDrags(Id window_id, bool accepts_drags) override;
421 void SetHitTestMask(Id transport_window_id, 443 void SetHitTestMask(Id transport_window_id,
422 const base::Optional<gfx::Rect>& mask) override; 444 const base::Optional<gfx::Rect>& mask) override;
423 void GetWindowManagerClient( 445 void GetWindowManagerClient(
424 mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal) 446 mojo::AssociatedInterfaceRequest<mojom::WindowManagerClient> internal)
425 override; 447 override;
426 void GetCursorLocationMemory(const GetCursorLocationMemoryCallback& callback) 448 void GetCursorLocationMemory(const GetCursorLocationMemoryCallback& callback)
427 override; 449 override;
450 void PerformDragDrop(uint32_t change_id,
451 uint32_t source_window_id,
452 mojo::Map<mojo::String, mojo::Array<uint8_t>> drag_data,
453 uint32_t drag_operation,
454 const gfx::Point& cursor_offset,
455 const SkBitmap& drag_representation) override;
428 void PerformWindowMove(uint32_t change_id, 456 void PerformWindowMove(uint32_t change_id,
429 Id window_id, 457 Id window_id,
430 ui::mojom::MoveLoopSource source, 458 ui::mojom::MoveLoopSource source,
431 const gfx::Point& cursor) override; 459 const gfx::Point& cursor) override;
432 void CancelWindowMove(Id window_id) override; 460 void CancelWindowMove(Id window_id) override;
433 461
434 // mojom::WindowManagerClient: 462 // mojom::WindowManagerClient:
435 void AddAccelerator(uint32_t id, 463 void AddAccelerator(uint32_t id,
436 mojom::EventMatcherPtr event_matcher, 464 mojom::EventMatcherPtr event_matcher,
437 const AddAcceleratorCallback& callback) override; 465 const AddAcceleratorCallback& callback) override;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 waiting_for_top_level_window_info_; 542 waiting_for_top_level_window_info_;
515 bool embedder_intercepts_events_ = false; 543 bool embedder_intercepts_events_ = false;
516 544
517 DISALLOW_COPY_AND_ASSIGN(WindowTree); 545 DISALLOW_COPY_AND_ASSIGN(WindowTree);
518 }; 546 };
519 547
520 } // namespace ws 548 } // namespace ws
521 } // namespace ui 549 } // namespace ui
522 550
523 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ 551 #endif // SERVICES_UI_WS_WINDOW_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698