Chromium Code Reviews| Index: extensions/browser/process_manager_factory.h |
| diff --git a/extensions/browser/process_manager_factory.h b/extensions/browser/process_manager_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0e045001bbcb84a7a4db0a5c4722c20a39424aea |
| --- /dev/null |
| +++ b/extensions/browser/process_manager_factory.h |
| @@ -0,0 +1,40 @@ |
| +// 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_PROCESS_MANAGER_FACTORY_H_ |
| +#define EXTENSIONS_BROWSER_PROCESS_MANAGER_FACTORY_H_ |
| + |
| +#include "base/memory/singleton.h" |
| +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
| + |
| +namespace extensions { |
| + |
| +class ProcessManager; |
| + |
|
not at google - send to devlin
2014/10/24 20:29:47
Typically these Factories are implementation detai
Reilly Grant (use Gerrit)
2014/10/24 20:37:23
The coding standard suggests one class per .cc fil
not at google - send to devlin
2014/10/24 20:52:03
Ah ok. Yeah I think you might need it in a separat
Reilly Grant (use Gerrit)
2014/10/24 21:01:18
I don't *need* to but I'd rather keep it separate.
|
| +class ProcessManagerFactory : public BrowserContextKeyedServiceFactory { |
| + public: |
| + static ProcessManager* GetForBrowserContext(content::BrowserContext* context); |
| + // Returns NULL if there is no ProcessManager associated with this context. |
| + static ProcessManager* GetForBrowserContextIfExists( |
| + content::BrowserContext* context); |
| + static ProcessManagerFactory* GetInstance(); |
| + |
| + private: |
| + friend struct DefaultSingletonTraits<ProcessManagerFactory>; |
| + |
| + ProcessManagerFactory(); |
| + virtual ~ProcessManagerFactory(); |
| + |
| + // BrowserContextKeyedServiceFactory |
| + virtual KeyedService* BuildServiceInstanceFor( |
| + content::BrowserContext* context) const override; |
| + virtual content::BrowserContext* GetBrowserContextToUse( |
| + content::BrowserContext* context) const override; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ProcessManagerFactory); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_FACTORY_H_ |