Chromium Code Reviews| 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/view_manager/view_manager_service_impl.h" | 5 #include "services/view_manager/view_manager_service_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 "mojo/converters/geometry/geometry_type_converters.h" | 9 #include "mojo/converters/geometry/geometry_type_converters.h" |
| 10 #include "mojo/converters/input_events/input_events_type_converters.h" | 10 #include "mojo/converters/input_events/input_events_type_converters.h" |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 620 ViewIdFromTransportId(transport_view_id), | 620 ViewIdFromTransportId(transport_view_id), |
| 621 services.Pass(), exposed_services.Pass())); | 621 services.Pass(), exposed_services.Pass())); |
| 622 } | 622 } |
| 623 | 623 |
| 624 void ViewManagerServiceImpl::Embed(mojo::Id transport_view_id, | 624 void ViewManagerServiceImpl::Embed(mojo::Id transport_view_id, |
| 625 mojo::ViewManagerClientPtr client, | 625 mojo::ViewManagerClientPtr client, |
| 626 const mojo::Callback<void(bool)>& callback) { | 626 const mojo::Callback<void(bool)>& callback) { |
| 627 callback.Run(Embed(ViewIdFromTransportId(transport_view_id), client.Pass())); | 627 callback.Run(Embed(ViewIdFromTransportId(transport_view_id), client.Pass())); |
| 628 } | 628 } |
| 629 | 629 |
| 630 void ViewManagerServiceImpl::PerformAction( | |
| 631 mojo::Id transport_view_id, | |
| 632 const mojo::String& action, | |
| 633 const mojo::Callback<void(bool)>& callback) { | |
|
msw
2015/02/25 22:30:32
Oh, hmm, should this callback be run when the wm r
sky
2015/02/25 23:20:27
Done.
| |
| 634 connection_manager_->GetWindowManagerViewManagerClient()->OnPerformAction( | |
| 635 transport_view_id, action); | |
| 636 } | |
| 637 | |
| 630 bool ViewManagerServiceImpl::IsRootForAccessPolicy(const ViewId& id) const { | 638 bool ViewManagerServiceImpl::IsRootForAccessPolicy(const ViewId& id) const { |
| 631 return IsRoot(id); | 639 return IsRoot(id); |
| 632 } | 640 } |
| 633 | 641 |
| 634 bool ViewManagerServiceImpl::IsViewKnownForAccessPolicy( | 642 bool ViewManagerServiceImpl::IsViewKnownForAccessPolicy( |
| 635 const ServerView* view) const { | 643 const ServerView* view) const { |
| 636 return IsViewKnown(view); | 644 return IsViewKnown(view); |
| 637 } | 645 } |
| 638 | 646 |
| 639 bool ViewManagerServiceImpl::IsViewRootOfAnotherConnectionForAccessPolicy( | 647 bool ViewManagerServiceImpl::IsViewRootOfAnotherConnectionForAccessPolicy( |
| 640 const ServerView* view) const { | 648 const ServerView* view) const { |
| 641 ViewManagerServiceImpl* connection = | 649 ViewManagerServiceImpl* connection = |
| 642 connection_manager_->GetConnectionWithRoot(view->id()); | 650 connection_manager_->GetConnectionWithRoot(view->id()); |
| 643 return connection && connection != this; | 651 return connection && connection != this; |
| 644 } | 652 } |
| 645 | 653 |
| 646 } // namespace view_manager | 654 } // namespace view_manager |
| OLD | NEW |