[SyncFS] Build indexes from FileTracker entries on disk.
[chromium-blink-merge.git] / mojo / service_manager / service_loader.h
blobe69e0fd0a297580abdf18376ad68f129c30783f9
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 #ifndef MOJO_SERVICE_MANAGER_SERVICE_LOADER_H_
6 #define MOJO_SERVICE_MANAGER_SERVICE_LOADER_H_
8 #include "mojo/public/cpp/system/core.h"
9 #include "mojo/public/interfaces/service_provider/service_provider.mojom.h"
10 #include "mojo/service_manager/service_manager_export.h"
11 #include "url/gurl.h"
13 namespace mojo {
15 class ServiceManager;
17 // Interface to allowing loading behavior to be established for schemes,
18 // specific urls or as the default.
19 // A ServiceLoader is responsible to using whatever mechanism is appropriate
20 // to load the application at url.
21 // TODO(davemoore): change name to ApplicationLoader.
22 // The handle to the shell is passed to that application so it can bind it to
23 // a Shell instance. This will give the Application a way to connect to other
24 // apps and services.
25 class MOJO_SERVICE_MANAGER_EXPORT ServiceLoader {
26 public:
27 virtual ~ServiceLoader() {}
28 virtual void LoadService(ServiceManager* manager,
29 const GURL& url,
30 ScopedMessagePipeHandle shell_handle) = 0;
31 virtual void OnServiceError(ServiceManager* manager, const GURL& url) = 0;
33 protected:
34 ServiceLoader() {}
37 } // namespace mojo
39 #endif // MOJO_SERVICE_MANAGER_SERVICE_LOADER_H_