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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "components/mus/ws/connection_manager.h" | 9 #include "components/mus/ws/connection_manager.h" |
10 #include "components/mus/ws/default_access_policy.h" | 10 #include "components/mus/ws/default_access_policy.h" |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 if (value.is_null()) { | 754 if (value.is_null()) { |
755 window->SetProperty(name, nullptr); | 755 window->SetProperty(name, nullptr); |
756 } else { | 756 } else { |
757 std::vector<uint8_t> data = value.To<std::vector<uint8_t>>(); | 757 std::vector<uint8_t> data = value.To<std::vector<uint8_t>>(); |
758 window->SetProperty(name, &data); | 758 window->SetProperty(name, &data); |
759 } | 759 } |
760 } | 760 } |
761 client_->OnChangeCompleted(change_id, success); | 761 client_->OnChangeCompleted(change_id, success); |
762 } | 762 } |
763 | 763 |
764 void WindowTreeImpl::RequestSurface( | 764 void WindowTreeImpl::AttachSurface( |
765 Id window_id, | 765 Id window_id, |
766 mojom::SurfaceType type, | 766 mojom::SurfaceType type, |
767 mojo::InterfaceRequest<mojom::Surface> surface, | 767 mojo::InterfaceRequest<mojom::Surface> surface, |
768 mojom::SurfaceClientPtr client) { | 768 mojom::SurfaceClientPtr client) { |
769 ServerWindow* window = GetWindow(WindowIdFromTransportId(window_id)); | 769 ServerWindow* window = GetWindow(WindowIdFromTransportId(window_id)); |
770 const bool success = | 770 const bool success = |
771 window && access_policy_->CanSetWindowSurface(window, type); | 771 window && access_policy_->CanSetWindowSurface(window, type); |
772 if (!success) | 772 if (!success) |
773 return; | 773 return; |
774 window->CreateSurface(type, surface.Pass(), client.Pass()); | 774 window->CreateSurface(type, surface.Pass(), client.Pass()); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 return connection && connection != this; | 857 return connection && connection != this; |
858 } | 858 } |
859 | 859 |
860 bool WindowTreeImpl::IsDescendantOfEmbedRoot(const ServerWindow* window) { | 860 bool WindowTreeImpl::IsDescendantOfEmbedRoot(const ServerWindow* window) { |
861 return is_embed_root_ && root_ && GetWindow(*root_)->Contains(window); | 861 return is_embed_root_ && root_ && GetWindow(*root_)->Contains(window); |
862 } | 862 } |
863 | 863 |
864 } // namespace ws | 864 } // namespace ws |
865 | 865 |
866 } // namespace mus | 866 } // namespace mus |
OLD | NEW |