Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: components/arc/arc_bridge_service_factory.h

Issue 1412863004: arc-bridge: Add the ARC Bridge Service (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed feedback Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 COMPONENTS_ARC_ARC_BRIDGE_SERVICE_FACTORY_H_
6 #define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_FACTORY_H_
7
8 #include "base/macros.h"
9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
11
12 namespace content {
13 class BrowserContext;
14 }
15
16 namespace arc {
17
18 class ArcBridgeService;
19
20 // Singleton that owns all ArcBridgeServices and associates them with
21 // Profiles. Listens for the Profile's destruction notification and cleans up
22 // the associated ArcBridgeService.
23 class ArcBridgeServiceFactory : public BrowserContextKeyedServiceFactory {
24 public:
25 static ArcBridgeService* GetForBrowserContext(
26 content::BrowserContext *context);
27
28 static ArcBridgeServiceFactory* GetInstance();
29
30 private:
31 friend struct base::DefaultSingletonTraits<ArcBridgeServiceFactory>;
32
33 ArcBridgeServiceFactory();
34 ~ArcBridgeServiceFactory() override;
35
36 // BrowserContextKeyedServiceFactory:
37 KeyedService* BuildServiceInstanceFor(
38 content::BrowserContext* profile) const override;
39 bool ServiceIsCreatedWithBrowserContext() const override;
40
41 DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceFactory);
42 };
43
44 } // namespace arc
45
46 #endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698