Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "services/ui/public/cpp/window_tree_client.h" | 5 #include "services/ui/public/cpp/window_tree_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 667 base::MakeUnique<InFlightDragChange>(window, ChangeType::DRAG_LOOP)); | 667 base::MakeUnique<InFlightDragChange>(window, ChangeType::DRAG_LOOP)); |
| 668 current_drag_state_.reset(new CurrentDragState{ | 668 current_drag_state_.reset(new CurrentDragState{ |
| 669 current_drag_change, ui::mojom::kDropEffectNone, callback}); | 669 current_drag_change, ui::mojom::kDropEffectNone, callback}); |
| 670 | 670 |
| 671 tree_->PerformDragDrop( | 671 tree_->PerformDragDrop( |
| 672 current_drag_change, window->server_id(), drag_pointer, | 672 current_drag_change, window->server_id(), drag_pointer, |
| 673 mojo::Map<mojo::String, mojo::Array<uint8_t>>::From(drag_data), | 673 mojo::Map<mojo::String, mojo::Array<uint8_t>>::From(drag_data), |
| 674 drag_operation); | 674 drag_operation); |
| 675 } | 675 } |
| 676 | 676 |
| 677 void WindowTreeClient::CancelDragDrop(Window* window) { | |
| 678 tree_->CancelDragDrop(window->server_id()); | |
|
sky
2016/09/21 20:40:56
Please add a comment that cleanup is done when ser
| |
| 679 } | |
| 680 | |
| 677 void WindowTreeClient::PerformWindowMove( | 681 void WindowTreeClient::PerformWindowMove( |
| 678 Window* window, | 682 Window* window, |
| 679 ui::mojom::MoveLoopSource source, | 683 ui::mojom::MoveLoopSource source, |
| 680 const gfx::Point& cursor_location, | 684 const gfx::Point& cursor_location, |
| 681 const base::Callback<void(bool)>& callback) { | 685 const base::Callback<void(bool)>& callback) { |
| 682 DCHECK(on_current_move_finished_.is_null()); | 686 DCHECK(on_current_move_finished_.is_null()); |
| 683 on_current_move_finished_ = callback; | 687 on_current_move_finished_ = callback; |
| 684 | 688 |
| 685 current_move_loop_change_ = ScheduleInFlightChange( | 689 current_move_loop_change_ = ScheduleInFlightChange( |
| 686 base::MakeUnique<InFlightDragChange>(window, ChangeType::MOVE_LOOP)); | 690 base::MakeUnique<InFlightDragChange>(window, ChangeType::MOVE_LOOP)); |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1406 Window* window, | 1410 Window* window, |
| 1407 const gfx::Vector2d& offset, | 1411 const gfx::Vector2d& offset, |
| 1408 const gfx::Insets& hit_area) { | 1412 const gfx::Insets& hit_area) { |
| 1409 if (window_manager_internal_client_) { | 1413 if (window_manager_internal_client_) { |
| 1410 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1414 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 1411 server_id(window), offset.x(), offset.y(), hit_area); | 1415 server_id(window), offset.x(), offset.y(), hit_area); |
| 1412 } | 1416 } |
| 1413 } | 1417 } |
| 1414 | 1418 |
| 1415 } // namespace ui | 1419 } // namespace ui |
| OLD | NEW |