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/ws/window_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 if (!display_root) { | 2140 if (!display_root) { |
2141 DVLOG(1) << "CancelWindowMove failed (no such window manager display root)"; | 2141 DVLOG(1) << "CancelWindowMove failed (no such window manager display root)"; |
2142 return; | 2142 return; |
2143 } | 2143 } |
2144 | 2144 |
2145 WindowManagerState* wms = display_root->window_manager_state(); | 2145 WindowManagerState* wms = display_root->window_manager_state(); |
2146 wms->window_tree()->window_manager_internal_->WmCancelMoveLoop( | 2146 wms->window_tree()->window_manager_internal_->WmCancelMoveLoop( |
2147 window_server_->GetCurrentMoveLoopChangeId()); | 2147 window_server_->GetCurrentMoveLoopChangeId()); |
2148 } | 2148 } |
2149 | 2149 |
| 2150 void WindowTree::GetFrameSinkId(Id window_id) { |
| 2151 ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id)); |
| 2152 if (!window) { |
| 2153 DVLOG(1) << "GetFrameSinkId failed (invalid window id)"; |
| 2154 return; |
| 2155 } |
| 2156 client()->OnFrameSinkIdAllocated(window_id, window->frame_sink_id()); |
| 2157 } |
| 2158 |
2150 void WindowTree::AddAccelerators( | 2159 void WindowTree::AddAccelerators( |
2151 std::vector<mojom::WmAcceleratorPtr> accelerators, | 2160 std::vector<mojom::WmAcceleratorPtr> accelerators, |
2152 const AddAcceleratorsCallback& callback) { | 2161 const AddAcceleratorsCallback& callback) { |
2153 DCHECK(window_manager_state_); | 2162 DCHECK(window_manager_state_); |
2154 | 2163 |
2155 bool success = true; | 2164 bool success = true; |
2156 for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) { | 2165 for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) { |
2157 if (!window_manager_state_->event_dispatcher()->AddAccelerator( | 2166 if (!window_manager_state_->event_dispatcher()->AddAccelerator( |
2158 iter->get()->id, std::move(iter->get()->event_matcher))) | 2167 iter->get()->id, std::move(iter->get()->event_matcher))) |
2159 success = false; | 2168 success = false; |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2483 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2492 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
2484 effect_bitmask, callback); | 2493 effect_bitmask, callback); |
2485 } | 2494 } |
2486 | 2495 |
2487 void WindowTree::PerformOnDragDropDone() { | 2496 void WindowTree::PerformOnDragDropDone() { |
2488 client()->OnDragDropDone(); | 2497 client()->OnDragDropDone(); |
2489 } | 2498 } |
2490 | 2499 |
2491 } // namespace ws | 2500 } // namespace ws |
2492 } // namespace ui | 2501 } // namespace ui |
OLD | NEW |