| 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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 | 1402 |
| 1403 void WindowTreeClient::WmCancelMoveLoop(uint32_t change_id) { | 1403 void WindowTreeClient::WmCancelMoveLoop(uint32_t change_id) { |
| 1404 if (!window_manager_delegate_ || change_id != current_wm_move_loop_change_) | 1404 if (!window_manager_delegate_ || change_id != current_wm_move_loop_change_) |
| 1405 return; | 1405 return; |
| 1406 | 1406 |
| 1407 Window* window = GetWindowByServerId(current_wm_move_loop_window_id_); | 1407 Window* window = GetWindowByServerId(current_wm_move_loop_window_id_); |
| 1408 if (window) | 1408 if (window) |
| 1409 window_manager_delegate_->OnWmCancelMoveLoop(window); | 1409 window_manager_delegate_->OnWmCancelMoveLoop(window); |
| 1410 } | 1410 } |
| 1411 | 1411 |
| 1412 void WindowTreeClient::WmDeactivateWindow(uint32_t window_id) {} |
| 1413 |
| 1412 void WindowTreeClient::OnAccelerator(uint32_t ack_id, | 1414 void WindowTreeClient::OnAccelerator(uint32_t ack_id, |
| 1413 uint32_t accelerator_id, | 1415 uint32_t accelerator_id, |
| 1414 std::unique_ptr<ui::Event> event) { | 1416 std::unique_ptr<ui::Event> event) { |
| 1415 DCHECK(event); | 1417 DCHECK(event); |
| 1416 const mojom::EventResult result = | 1418 const mojom::EventResult result = |
| 1417 window_manager_delegate_->OnAccelerator(accelerator_id, *event.get()); | 1419 window_manager_delegate_->OnAccelerator(accelerator_id, *event.get()); |
| 1418 if (ack_id && window_manager_internal_client_) | 1420 if (ack_id && window_manager_internal_client_) |
| 1419 window_manager_internal_client_->OnAcceleratorAck(ack_id, result); | 1421 window_manager_internal_client_->OnAcceleratorAck(ack_id, result); |
| 1420 } | 1422 } |
| 1421 | 1423 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1471 // TODO(riajiang): Figure out if |offset| needs to be converted. | 1473 // TODO(riajiang): Figure out if |offset| needs to be converted. |
| 1472 // (http://crbugs.com/646932) | 1474 // (http://crbugs.com/646932) |
| 1473 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( | 1475 window_manager_internal_client_->SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| 1474 server_id(window), offset.x(), offset.y(), | 1476 server_id(window), offset.x(), offset.y(), |
| 1475 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), | 1477 gfx::ConvertInsetsToDIP(ScaleFactorForDisplay(window->display_id()), |
| 1476 hit_area)); | 1478 hit_area)); |
| 1477 } | 1479 } |
| 1478 } | 1480 } |
| 1479 | 1481 |
| 1480 } // namespace ui | 1482 } // namespace ui |
| OLD | NEW |