| 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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 !IsWindowKnown(transient_window, &transient_client_window_id)) { | 956 !IsWindowKnown(transient_window, &transient_client_window_id)) { |
| 957 return; | 957 return; |
| 958 } | 958 } |
| 959 client()->OnTransientWindowRemoved(client_window_id.id, | 959 client()->OnTransientWindowRemoved(client_window_id.id, |
| 960 transient_client_window_id.id); | 960 transient_client_window_id.id); |
| 961 } | 961 } |
| 962 | 962 |
| 963 void WindowTree::ProcessWindowSurfaceChanged( | 963 void WindowTree::ProcessWindowSurfaceChanged( |
| 964 ServerWindow* window, | 964 ServerWindow* window, |
| 965 const cc::SurfaceInfo& surface_info) { | 965 const cc::SurfaceInfo& surface_info) { |
| 966 ClientWindowId client_window_id; | 966 ServerWindow* parent_window = window->parent(); |
| 967 if (!IsWindowKnown(window, &client_window_id)) | 967 ClientWindowId client_window_id, parent_client_window_id; |
| 968 if (!IsWindowKnown(window, &client_window_id) || |
| 969 !IsWindowKnown(parent_window, &parent_client_window_id) || |
| 970 !created_window_map_.count(parent_window->id())) { |
| 968 return; | 971 return; |
| 972 } |
| 973 |
| 969 client()->OnWindowSurfaceChanged(client_window_id.id, surface_info); | 974 client()->OnWindowSurfaceChanged(client_window_id.id, surface_info); |
| 970 } | 975 } |
| 971 | 976 |
| 972 void WindowTree::SendToPointerWatcher(const ui::Event& event, | 977 void WindowTree::SendToPointerWatcher(const ui::Event& event, |
| 973 ServerWindow* target_window, | 978 ServerWindow* target_window, |
| 974 int64_t display_id) { | 979 int64_t display_id) { |
| 975 if (!EventMatchesPointerWatcher(event)) | 980 if (!EventMatchesPointerWatcher(event)) |
| 976 return; | 981 return; |
| 977 | 982 |
| 978 ClientWindowId client_window_id; | 983 ClientWindowId client_window_id; |
| (...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2544 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2549 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 2545 effect_bitmask, callback); | 2550 effect_bitmask, callback); |
| 2546 } | 2551 } |
| 2547 | 2552 |
| 2548 void WindowTree::PerformOnDragDropDone() { | 2553 void WindowTree::PerformOnDragDropDone() { |
| 2549 client()->OnDragDropDone(); | 2554 client()->OnDragDropDone(); |
| 2550 } | 2555 } |
| 2551 | 2556 |
| 2552 } // namespace ws | 2557 } // namespace ws |
| 2553 } // namespace ui | 2558 } // namespace ui |
| OLD | NEW |