Add ServiceManager::GetInstance() and change ServiceManager::Loader to ServiceLoader
[chromium-blink-merge.git] / mojo / service_manager / service_loader.h
blob7da0540d427482fe39871aae8f2b31ffb6aec88a
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/shell/shell.mojom.h"
9 #include "url/gurl.h"
11 namespace mojo {
13 class ServiceManager;
15 // Interface to allowing default loading behavior to be overridden for a
16 // specific url.
17 class ServiceLoader {
18 public:
19 virtual ~ServiceLoader() {};
20 virtual void LoadService(ServiceManager* manager,
21 const GURL& url,
22 ScopedShellHandle service_handle) = 0;
23 protected:
24 ServiceLoader() {}
27 } // namespace mojo
29 #endif // MOJO_SERVICE_MANAGER_SERVICE_LOADER_H_