[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / mojo / shell / view_manager_loader.cc
blobe41a87469d84614b97105d4eab0f157f4d3a7260
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.
5 #include "mojo/shell/view_manager_loader.h"
7 #include "mojo/public/cpp/application/application_connection.h"
8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/services/view_manager/view_manager_init_service_impl.h"
11 namespace mojo {
12 namespace shell {
14 ViewManagerLoader::ViewManagerLoader() {
17 ViewManagerLoader::~ViewManagerLoader() {
20 void ViewManagerLoader::LoadService(
21 ServiceManager* manager,
22 const GURL& url,
23 ScopedMessagePipeHandle shell_handle) {
24 // TODO(sky): this needs some sort of authentication as well as making sure
25 // we only ever have one active at a time.
26 scoped_ptr<ApplicationImpl> app(
27 new ApplicationImpl(this, shell_handle.Pass()));
28 apps_.push_back(app.release());
31 void ViewManagerLoader::OnServiceError(ServiceManager* manager,
32 const GURL& url) {
35 bool ViewManagerLoader::ConfigureIncomingConnection(
36 mojo::ApplicationConnection* connection) {
37 connection->AddService<view_manager::service::ViewManagerInitServiceImpl>();
38 return true;
41 } // namespace shell
42 } // namespace mojo