| 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 "components/mus/ws/window_tree_impl.h" | 5 #include "components/mus/ws/window_tree_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" |
| 8 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 9 #include "components/mus/ws/client_connection.h" | 12 #include "components/mus/ws/client_connection.h" |
| 10 #include "components/mus/ws/connection_manager.h" | 13 #include "components/mus/ws/connection_manager.h" |
| 11 #include "components/mus/ws/default_access_policy.h" | 14 #include "components/mus/ws/default_access_policy.h" |
| 12 #include "components/mus/ws/display_manager.h" | 15 #include "components/mus/ws/display_manager.h" |
| 13 #include "components/mus/ws/operation.h" | 16 #include "components/mus/ws/operation.h" |
| 14 #include "components/mus/ws/server_window.h" | 17 #include "components/mus/ws/server_window.h" |
| 15 #include "components/mus/ws/server_window_observer.h" | 18 #include "components/mus/ws/server_window_observer.h" |
| 16 #include "components/mus/ws/window_manager_access_policy.h" | 19 #include "components/mus/ws/window_manager_access_policy.h" |
| 17 #include "components/mus/ws/window_tree_host_impl.h" | 20 #include "components/mus/ws/window_tree_host_impl.h" |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 window_manager_internal_) | 967 window_manager_internal_) |
| 965 return; | 968 return; |
| 966 window_manager_internal_client_binding_.reset( | 969 window_manager_internal_client_binding_.reset( |
| 967 new mojo::AssociatedBinding<mojom::WindowManagerInternalClient>( | 970 new mojo::AssociatedBinding<mojom::WindowManagerInternalClient>( |
| 968 this, internal.Pass())); | 971 this, internal.Pass())); |
| 969 | 972 |
| 970 window_manager_internal_ = connection_manager_->GetClientConnection(this) | 973 window_manager_internal_ = connection_manager_->GetClientConnection(this) |
| 971 ->GetWindowManagerInternal(); | 974 ->GetWindowManagerInternal(); |
| 972 } | 975 } |
| 973 | 976 |
| 974 void WindowTreeImpl::WmResponse(uint32 change_id, bool response) { | 977 void WindowTreeImpl::WmResponse(uint32_t change_id, bool response) { |
| 975 if (GetHost() && GetHost()->GetWindowTree() == this) | 978 if (GetHost() && GetHost()->GetWindowTree() == this) |
| 976 connection_manager_->WindowManagerChangeCompleted(change_id, response); | 979 connection_manager_->WindowManagerChangeCompleted(change_id, response); |
| 977 } | 980 } |
| 978 | 981 |
| 979 void WindowTreeImpl::WmRequestClose(Id transport_window_id) { | 982 void WindowTreeImpl::WmRequestClose(Id transport_window_id) { |
| 980 // Only the WindowManager should be using this. | 983 // Only the WindowManager should be using this. |
| 981 if (!GetHost() || GetHost()->GetWindowTree() != this) | 984 if (!GetHost() || GetHost()->GetWindowTree() != this) |
| 982 return; | 985 return; |
| 983 | 986 |
| 984 const WindowId window_id(WindowIdFromTransportId(transport_window_id)); | 987 const WindowId window_id(WindowIdFromTransportId(transport_window_id)); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1004 return connection && connection != this; | 1007 return connection && connection != this; |
| 1005 } | 1008 } |
| 1006 | 1009 |
| 1007 bool WindowTreeImpl::IsDescendantOfEmbedRoot(const ServerWindow* window) { | 1010 bool WindowTreeImpl::IsDescendantOfEmbedRoot(const ServerWindow* window) { |
| 1008 return is_embed_root_ && root_ && GetWindow(*root_)->Contains(window); | 1011 return is_embed_root_ && root_ && GetWindow(*root_)->Contains(window); |
| 1009 } | 1012 } |
| 1010 | 1013 |
| 1011 } // namespace ws | 1014 } // namespace ws |
| 1012 | 1015 |
| 1013 } // namespace mus | 1016 } // namespace mus |
| OLD | NEW |