summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_system_provider.h
blob: 763afce1081fb931101478d4d5c3c9ea29777825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef EXTENSIONS_BROWSER_EXTENSION_SYSTEM_PROVIDER_H_
#define EXTENSIONS_BROWSER_EXTENSION_SYSTEM_PROVIDER_H_

#include "components/keyed_service/content/browser_context_keyed_service_factory.h"

class BrowserContextDependencyManager;

namespace content {
class BrowserContext;
}

namespace extensions {
class ExtensionSystem;

// An ExtensionSystemProvider maps a BrowserContext to its ExtensionSystem.
// Different applications may use this to provide differing implementations
// of ExtensionSystem.
// TODO(yoz): Rename to ExtensionSystemFactory.
class ExtensionSystemProvider : public BrowserContextKeyedServiceFactory {
 public:
  ExtensionSystemProvider(const char* name,
                          BrowserContextDependencyManager* manager);
  ~ExtensionSystemProvider() override;

  virtual ExtensionSystem* GetForBrowserContext(
      content::BrowserContext* context) = 0;
};

}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_EXTENSION_SYSTEM_PROVIDER_H_