OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_SERVICE_FACTORY_H_ | 5 #ifndef COMPONENTS_CAST_CHANNEL_CAST_SOCKET_SERVICE_FACTORY_H_ |
6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_SERVICE_FACTORY_H_ | 6 #define COMPONENTS_CAST_CHANNEL_CAST_SOCKET_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 10 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
11 | 11 |
12 namespace extensions { | |
13 namespace api { | |
14 namespace cast_channel { | 12 namespace cast_channel { |
15 | 13 |
16 class CastSocketService; | 14 class CastSocketService; |
17 | 15 |
18 // TODO(crbug.com/725717): CastSocket created by one profile (browser context) | 16 // TODO(crbug.com/725717): CastSocket created by one profile (browser context) |
19 // could be shared with other profiles. | 17 // could be shared with other profiles. |
20 class CastSocketServiceFactory : public BrowserContextKeyedServiceFactory { | 18 class CastSocketServiceFactory : public BrowserContextKeyedServiceFactory { |
21 public: | 19 public: |
22 // Caller needs to make sure that it passes in the same |context| instance to | 20 // Caller needs to make sure that it passes in the same |context| instance to |
23 // this function for both normal profile and incognito profile. | 21 // this function for both normal profile and incognito profile. |
(...skipping 12 matching lines...) Expand all Loading... |
36 content::BrowserContext* GetBrowserContextToUse( | 34 content::BrowserContext* GetBrowserContextToUse( |
37 content::BrowserContext* context) const override; | 35 content::BrowserContext* context) const override; |
38 | 36 |
39 KeyedService* BuildServiceInstanceFor( | 37 KeyedService* BuildServiceInstanceFor( |
40 content::BrowserContext* context) const override; | 38 content::BrowserContext* context) const override; |
41 | 39 |
42 DISALLOW_COPY_AND_ASSIGN(CastSocketServiceFactory); | 40 DISALLOW_COPY_AND_ASSIGN(CastSocketServiceFactory); |
43 }; | 41 }; |
44 | 42 |
45 } // namespace cast_channel | 43 } // namespace cast_channel |
46 } // namespace api | |
47 } // namespace extensions | |
48 | 44 |
49 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_CHANNEL_SERVICE_FACTORY_H_ | 45 #endif // COMPONENTS_CAST_CHANNEL_CAST_SOCKET_SERVICE_FACTORY_H_ |
OLD | NEW |