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 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2139 if (!display_root) { | 2139 if (!display_root) { |
2140 DVLOG(1) << "CancelWindowMove failed (no such window manager display root)"; | 2140 DVLOG(1) << "CancelWindowMove failed (no such window manager display root)"; |
2141 return; | 2141 return; |
2142 } | 2142 } |
2143 | 2143 |
2144 WindowManagerState* wms = display_root->window_manager_state(); | 2144 WindowManagerState* wms = display_root->window_manager_state(); |
2145 wms->window_tree()->window_manager_internal_->WmCancelMoveLoop( | 2145 wms->window_tree()->window_manager_internal_->WmCancelMoveLoop( |
2146 window_server_->GetCurrentMoveLoopChangeId()); | 2146 window_server_->GetCurrentMoveLoopChangeId()); |
2147 } | 2147 } |
2148 | 2148 |
| 2149 void WindowTree::GetFrameSinkId(Id window_id) { |
| 2150 ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id)); |
| 2151 if (!window) { |
| 2152 DVLOG(1) << "GetFrameSinkId failed (invalid window id)"; |
| 2153 return; |
| 2154 } |
| 2155 client()->OnFrameSinkIdAllocated(window_id, window->frame_sink_id()); |
| 2156 } |
| 2157 |
2149 void WindowTree::AddAccelerators( | 2158 void WindowTree::AddAccelerators( |
2150 std::vector<mojom::WmAcceleratorPtr> accelerators, | 2159 std::vector<mojom::WmAcceleratorPtr> accelerators, |
2151 const AddAcceleratorsCallback& callback) { | 2160 const AddAcceleratorsCallback& callback) { |
2152 DCHECK(window_manager_state_); | 2161 DCHECK(window_manager_state_); |
2153 | 2162 |
2154 bool success = true; | 2163 bool success = true; |
2155 for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) { | 2164 for (auto iter = accelerators.begin(); iter != accelerators.end(); ++iter) { |
2156 if (!window_manager_state_->event_dispatcher()->AddAccelerator( | 2165 if (!window_manager_state_->event_dispatcher()->AddAccelerator( |
2157 iter->get()->id, std::move(iter->get()->event_matcher))) | 2166 iter->get()->id, std::move(iter->get()->event_matcher))) |
2158 success = false; | 2167 success = false; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2512 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
2504 effect_bitmask, callback); | 2513 effect_bitmask, callback); |
2505 } | 2514 } |
2506 | 2515 |
2507 void WindowTree::PerformOnDragDropDone() { | 2516 void WindowTree::PerformOnDragDropDone() { |
2508 client()->OnDragDropDone(); | 2517 client()->OnDragDropDone(); |
2509 } | 2518 } |
2510 | 2519 |
2511 } // namespace ws | 2520 } // namespace ws |
2512 } // namespace ui | 2521 } // namespace ui |
OLD | NEW |