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 3// found in the LICENSE file. 4 5#include "mojo/services/view_manager/view_manager_init_service_impl.h" 6 7#include "base/bind.h" 8#include "mojo/services/view_manager/ids.h" 9#include "mojo/services/view_manager/view_manager_init_service_context.h" 10#include "mojo/services/view_manager/view_manager_service_impl.h" 11 12namespace mojo { 13namespace service { 14 15ViewManagerInitServiceImpl::ViewManagerInitServiceImpl( 16 ApplicationConnection* connection, 17 ViewManagerInitServiceContext* context) 18 : context_(context) { 19 context_->AddConnection(this); 20} 21 22ViewManagerInitServiceImpl::~ViewManagerInitServiceImpl() { 23 context_->RemoveConnection(this); 24} 25 26void ViewManagerInitServiceImpl::Embed( 27 const String& url, 28 ServiceProviderPtr service_provider, 29 const Callback<void(bool)>& callback) { 30 context_->Embed(url, service_provider.Pass(), callback); 31} 32 33} // namespace service 34} // namespace mojo 35