| 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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 return; | 776 return; |
| 777 ClientWindowId client_window_id, transient_client_window_id; | 777 ClientWindowId client_window_id, transient_client_window_id; |
| 778 if (!IsWindowKnown(window, &client_window_id) || | 778 if (!IsWindowKnown(window, &client_window_id) || |
| 779 !IsWindowKnown(transient_window, &transient_client_window_id)) { | 779 !IsWindowKnown(transient_window, &transient_client_window_id)) { |
| 780 return; | 780 return; |
| 781 } | 781 } |
| 782 client()->OnTransientWindowRemoved(client_window_id.id, | 782 client()->OnTransientWindowRemoved(client_window_id.id, |
| 783 transient_client_window_id.id); | 783 transient_client_window_id.id); |
| 784 } | 784 } |
| 785 | 785 |
| 786 void WindowTree::ProcessWindowSurfaceChanged(ServerWindow* window, | 786 void WindowTree::ProcessWindowSurfaceChanged( |
| 787 const cc::SurfaceId& surface_id, | 787 ServerWindow* window, |
| 788 const gfx::Size& frame_size, | 788 const cc::SurfaceInfo& surface_info) { |
| 789 float device_scale_factor) { | |
| 790 ServerWindow* parent_window = window->parent(); | 789 ServerWindow* parent_window = window->parent(); |
| 791 ClientWindowId client_window_id, parent_client_window_id; | 790 ClientWindowId client_window_id, parent_client_window_id; |
| 792 if (!IsWindowKnown(window, &client_window_id) || | 791 if (!IsWindowKnown(window, &client_window_id) || |
| 793 !IsWindowKnown(parent_window, &parent_client_window_id) || | 792 !IsWindowKnown(parent_window, &parent_client_window_id) || |
| 794 !created_window_map_.count(parent_window->id())) { | 793 !created_window_map_.count(parent_window->id())) { |
| 795 return; | 794 return; |
| 796 } | 795 } |
| 797 | 796 |
| 798 client()->OnWindowSurfaceChanged(client_window_id.id, surface_id, frame_size, | 797 client()->OnWindowSurfaceChanged(client_window_id.id, surface_info); |
| 799 device_scale_factor); | |
| 800 } | 798 } |
| 801 | 799 |
| 802 void WindowTree::SendToPointerWatcher(const ui::Event& event, | 800 void WindowTree::SendToPointerWatcher(const ui::Event& event, |
| 803 ServerWindow* target_window) { | 801 ServerWindow* target_window) { |
| 804 if (!EventMatchesPointerWatcher(event)) | 802 if (!EventMatchesPointerWatcher(event)) |
| 805 return; | 803 return; |
| 806 | 804 |
| 807 ClientWindowId client_window_id; | 805 ClientWindowId client_window_id; |
| 808 // Ignore the return value from IsWindowKnown() as in the case of the client | 806 // Ignore the return value from IsWindowKnown() as in the case of the client |
| 809 // not knowing the window we'll send 0, which corresponds to no window. | 807 // not knowing the window we'll send 0, which corresponds to no window. |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2014 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 2017 effect_bitmask, callback); | 2015 effect_bitmask, callback); |
| 2018 } | 2016 } |
| 2019 | 2017 |
| 2020 void WindowTree::PerformOnDragDropDone() { | 2018 void WindowTree::PerformOnDragDropDone() { |
| 2021 client()->OnDragDropDone(); | 2019 client()->OnDragDropDone(); |
| 2022 } | 2020 } |
| 2023 | 2021 |
| 2024 } // namespace ws | 2022 } // namespace ws |
| 2025 } // namespace ui | 2023 } // namespace ui |
| OLD | NEW |