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

Side by Side Diff: extensions/browser/api/display_source/display_source_event_router_factory.h

Issue 1410093008: Introduce chrome.displaySource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from Antony 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 EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_EVENT_ROUTER_FACTOR Y_H_
6 #define EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_EVENT_ROUTER_FACTOR Y_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 extensions {
13
14 class DisplaySourceEventRouter;
15
16 class DisplaySourceEventRouterFactory
17 : public BrowserContextKeyedServiceFactory {
18 public:
19 // Returns the DisplaySourceEventRouter for |profile|, creating it if
20 // it is not yet created.
21 static DisplaySourceEventRouter* GetForProfile(
22 content::BrowserContext* context);
23
24 static DisplaySourceEventRouterFactory* GetInstance();
25
26 protected:
27 // BrowserContextKeyedBaseFactory overrides:
28 content::BrowserContext* GetBrowserContextToUse(
29 content::BrowserContext* context) const override;
30 bool ServiceIsCreatedWithBrowserContext() const override;
31 bool ServiceIsNULLWhileTesting() const override;
32
33 private:
34 friend struct base::DefaultSingletonTraits<DisplaySourceEventRouterFactory>;
35
36 DisplaySourceEventRouterFactory();
37 ~DisplaySourceEventRouterFactory() override;
38
39 // BrowserContextKeyedServiceFactory:
40 KeyedService* BuildServiceInstanceFor(
41 content::BrowserContext* profile) const override;
42
43 DISALLOW_COPY_AND_ASSIGN(DisplaySourceEventRouterFactory);
44 };
45
46 } // namespace extensions
47
48 #endif // EXTENSIONS_BROWSER_API_DISPLAY_SOURCE_DISPLAY_SOURCE_EVENT_ROUTER_FAC TORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698