OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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. |
| 4 |
| 5 #ifndef EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_CONNECTION_DELEGATE
_FACTORY_H_ |
| 6 #define EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_CONNECTION_DELEGATE
_FACTORY_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/singleton.h" |
| 11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 12 #include "extensions/browser/api/display_source/display_source_connection_delega
te.h" |
| 13 |
| 14 namespace context { |
| 15 class BrowserContext; |
| 16 } |
| 17 |
| 18 namespace extensions { |
| 19 |
| 20 class DisplaySourceConnectionDelegateFactory |
| 21 : public BrowserContextKeyedServiceFactory { |
| 22 public: |
| 23 static DisplaySourceConnectionDelegate* GetForBrowserContext( |
| 24 content::BrowserContext* browser_context); |
| 25 static DisplaySourceConnectionDelegateFactory* GetInstance(); |
| 26 |
| 27 private: |
| 28 friend struct base::DefaultSingletonTraits< |
| 29 DisplaySourceConnectionDelegateFactory>; |
| 30 |
| 31 DisplaySourceConnectionDelegateFactory(); |
| 32 ~DisplaySourceConnectionDelegateFactory() override; |
| 33 |
| 34 // BrowserContextKeyedServiceFactory: |
| 35 KeyedService* BuildServiceInstanceFor( |
| 36 content::BrowserContext* browser_context) const override; |
| 37 content::BrowserContext* GetBrowserContextToUse( |
| 38 content::BrowserContext* context) const override; |
| 39 bool ServiceIsCreatedWithBrowserContext() const override; |
| 40 bool ServiceIsNULLWhileTesting() const override; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(DisplaySourceConnectionDelegateFactory); |
| 43 }; |
| 44 |
| 45 } // namespace extensions |
| 46 |
| 47 #endif // EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_CONNECTION_DELEG
ATE_FACTORY_H_ |
OLD | NEW |