| 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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 !IsWindowKnown(transient_window, &transient_client_window_id)) { | 944 !IsWindowKnown(transient_window, &transient_client_window_id)) { |
| 945 return; | 945 return; |
| 946 } | 946 } |
| 947 client()->OnTransientWindowRemoved(client_window_id.id, | 947 client()->OnTransientWindowRemoved(client_window_id.id, |
| 948 transient_client_window_id.id); | 948 transient_client_window_id.id); |
| 949 } | 949 } |
| 950 | 950 |
| 951 void WindowTree::ProcessWindowSurfaceChanged( | 951 void WindowTree::ProcessWindowSurfaceChanged( |
| 952 ServerWindow* window, | 952 ServerWindow* window, |
| 953 const cc::SurfaceInfo& surface_info) { | 953 const cc::SurfaceInfo& surface_info) { |
| 954 ServerWindow* parent_window = window->parent(); | 954 ClientWindowId client_window_id; |
| 955 ClientWindowId client_window_id, parent_client_window_id; | 955 if (!IsWindowKnown(window, &client_window_id)) |
| 956 if (!IsWindowKnown(window, &client_window_id) || | |
| 957 !IsWindowKnown(parent_window, &parent_client_window_id) || | |
| 958 !created_window_map_.count(parent_window->id())) { | |
| 959 return; | 956 return; |
| 960 } | |
| 961 | |
| 962 client()->OnWindowSurfaceChanged(client_window_id.id, surface_info); | 957 client()->OnWindowSurfaceChanged(client_window_id.id, surface_info); |
| 963 } | 958 } |
| 964 | 959 |
| 965 void WindowTree::SendToPointerWatcher(const ui::Event& event, | 960 void WindowTree::SendToPointerWatcher(const ui::Event& event, |
| 966 ServerWindow* target_window, | 961 ServerWindow* target_window, |
| 967 int64_t display_id) { | 962 int64_t display_id) { |
| 968 if (!EventMatchesPointerWatcher(event)) | 963 if (!EventMatchesPointerWatcher(event)) |
| 969 return; | 964 return; |
| 970 | 965 |
| 971 ClientWindowId client_window_id; | 966 ClientWindowId client_window_id; |
| (...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2502 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, | 2497 client()->OnCompleteDrop(client_window_id.id, event_flags, cursor_offset, |
| 2503 effect_bitmask, callback); | 2498 effect_bitmask, callback); |
| 2504 } | 2499 } |
| 2505 | 2500 |
| 2506 void WindowTree::PerformOnDragDropDone() { | 2501 void WindowTree::PerformOnDragDropDone() { |
| 2507 client()->OnDragDropDone(); | 2502 client()->OnDragDropDone(); |
| 2508 } | 2503 } |
| 2509 | 2504 |
| 2510 } // namespace ws | 2505 } // namespace ws |
| 2511 } // namespace ui | 2506 } // namespace ui |
| OLD | NEW |