| Index: mojo/services/view_manager/view_manager_service_impl.cc
|
| diff --git a/mojo/services/view_manager/view_manager_service_impl.cc b/mojo/services/view_manager/view_manager_service_impl.cc
|
| index 07bf803c0f061311271bc45e4d081b5219bd746c..323d2dbe4d232a67f70bf857da9c5a6b474353cb 100644
|
| --- a/mojo/services/view_manager/view_manager_service_impl.cc
|
| +++ b/mojo/services/view_manager/view_manager_service_impl.cc
|
| @@ -22,14 +22,12 @@ ViewManagerServiceImpl::ViewManagerServiceImpl(
|
| ConnectionSpecificId creator_id,
|
| const std::string& creator_url,
|
| const std::string& url,
|
| - const ViewId& root_id,
|
| - InterfaceRequest<ServiceProvider> service_provider)
|
| + const ViewId& root_id)
|
| : connection_manager_(connection_manager),
|
| id_(connection_manager_->GetAndAdvanceNextConnectionId()),
|
| url_(url),
|
| creator_id_(creator_id),
|
| - creator_url_(creator_url),
|
| - service_provider_(service_provider.Pass()) {
|
| + creator_url_(creator_url) {
|
| CHECK(GetView(root_id));
|
| root_.reset(new ViewId(root_id));
|
| if (root_id == RootViewId())
|
| @@ -42,6 +40,22 @@ ViewManagerServiceImpl::~ViewManagerServiceImpl() {
|
| DestroyViews();
|
| }
|
|
|
| +void ViewManagerServiceImpl::Init(
|
| + InterfaceRequest<ServiceProvider> service_provider) {
|
| + std::vector<const ServerView*> to_send;
|
| + if (root_.get())
|
| + GetUnknownViewsFrom(GetView(*root_), &to_send);
|
| +
|
| + MessagePipe pipe;
|
| + connection_manager_->wm_internal()->CreateWindowManagerForViewManagerClient(
|
| + id_, pipe.handle1.Pass());
|
| + client()->OnEmbed(id_,
|
| + creator_url_,
|
| + ViewToViewData(to_send.front()),
|
| + service_provider.Pass(),
|
| + pipe.handle0.Pass());
|
| +}
|
| +
|
| const ServerView* ViewManagerServiceImpl::GetView(const ViewId& id) const {
|
| if (id_ == id.connection_id) {
|
| ViewMap::const_iterator i = view_map_.find(id.view_id);
|
| @@ -550,21 +564,6 @@ void ViewManagerServiceImpl::Embed(
|
| callback.Run(true);
|
| }
|
|
|
| -void ViewManagerServiceImpl::OnConnectionEstablished() {
|
| - std::vector<const ServerView*> to_send;
|
| - if (root_.get())
|
| - GetUnknownViewsFrom(GetView(*root_), &to_send);
|
| -
|
| - MessagePipe pipe;
|
| - connection_manager_->wm_internal()->CreateWindowManagerForViewManagerClient(
|
| - id_, pipe.handle1.Pass());
|
| - client()->OnEmbed(id_,
|
| - creator_url_,
|
| - ViewToViewData(to_send.front()),
|
| - service_provider_.Pass(),
|
| - pipe.handle0.Pass());
|
| -}
|
| -
|
| bool ViewManagerServiceImpl::IsRootForAccessPolicy(const ViewId& id) const {
|
| return IsRoot(id);
|
| }
|
|
|