• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/shell/view_manager_loader.h"
6 
7 #include "mojo/public/cpp/application/application.h"
8 #include "mojo/services/view_manager/view_manager_init_service_impl.h"
9 
10 namespace mojo {
11 namespace shell {
12 
ViewManagerLoader()13 ViewManagerLoader::ViewManagerLoader() {
14 }
15 
~ViewManagerLoader()16 ViewManagerLoader::~ViewManagerLoader() {
17 }
18 
LoadService(ServiceManager * manager,const GURL & url,ScopedMessagePipeHandle service_provider_handle)19 void ViewManagerLoader::LoadService(
20     ServiceManager* manager,
21     const GURL& url,
22     ScopedMessagePipeHandle service_provider_handle) {
23   // TODO(sky): this needs some sort of authentication as well as making sure
24   // we only ever have one active at a time.
25   scoped_ptr<Application> app(new Application(service_provider_handle.Pass()));
26   app->AddService<view_manager::service::ViewManagerInitServiceImpl>(
27       app->service_provider());
28   apps_.push_back(app.release());
29 }
30 
OnServiceError(ServiceManager * manager,const GURL & url)31 void ViewManagerLoader::OnServiceError(ServiceManager* manager,
32                                        const GURL& url) {
33 }
34 
35 }  // namespace shell
36 }  // namespace mojo
37