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

Side by Side Diff: extensions/browser/extensions_browser_client.h

Issue 69883007: Extract chrome.runtime API code from extensions::EventRouter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EXTENSIONS_BROWSER_CLIENT_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_
6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_
7 7
8 namespace content { 8 namespace content {
9 class BrowserContext; 9 class BrowserContext;
10 } 10 }
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 class ExtensionPrefs;
15
16 // Interface to allow the extensions module to make browser-process-specific 14 // Interface to allow the extensions module to make browser-process-specific
17 // queries of the embedder. Should be Set() once in the browser process. 15 // queries of the embedder. Should be Set() once in the browser process.
18 // 16 //
19 // NOTE: Methods that do not require knowledge of browser concepts should be 17 // NOTE: Methods that do not require knowledge of browser concepts should be
20 // added in ExtensionsClient (extensions/common/extensions_client.h) even if 18 // added in ExtensionsClient (extensions/common/extensions_client.h) even if
21 // they are only used in the browser process. 19 // they are only used in the browser process.
22 class ExtensionsBrowserClient { 20 class ExtensionsBrowserClient {
23 public: 21 public:
24 virtual ~ExtensionsBrowserClient() {} 22 virtual ~ExtensionsBrowserClient() {}
25 23
(...skipping 22 matching lines...) Expand all
48 // |context| is not incognito. 46 // |context| is not incognito.
49 virtual content::BrowserContext* GetOriginalContext( 47 virtual content::BrowserContext* GetOriginalContext(
50 content::BrowserContext* context) = 0; 48 content::BrowserContext* context) = 0;
51 49
52 // Returns true if loading background pages should be deferred. 50 // Returns true if loading background pages should be deferred.
53 virtual bool DeferLoadingBackgroundHosts( 51 virtual bool DeferLoadingBackgroundHosts(
54 content::BrowserContext* context) const = 0; 52 content::BrowserContext* context) const = 0;
55 53
56 // Returns true if the client version has updated since the last run. Called 54 // Returns true if the client version has updated since the last run. Called
57 // once each time the extensions system is loaded per browser_context. The 55 // once each time the extensions system is loaded per browser_context. The
58 // implementation may wish to use |extension_prefs| to record the current 56 // implementation may wish to use the BrowserContext to record the current
59 // version for later comparison. |extension_prefs| may be NULL in tests. 57 // version for later comparison.
60 virtual bool DidVersionUpdate(ExtensionPrefs* extension_prefs) = 0; 58 virtual bool DidVersionUpdate(content::BrowserContext* context) = 0;
61 59
62 // Returns the single instance of |this|. 60 // Returns the single instance of |this|.
63 static ExtensionsBrowserClient* Get(); 61 static ExtensionsBrowserClient* Get();
64 62
65 // Initialize the single instance. 63 // Initialize the single instance.
66 static void Set(ExtensionsBrowserClient* client); 64 static void Set(ExtensionsBrowserClient* client);
67 }; 65 };
68 66
69 } // namespace extensions 67 } // namespace extensions
70 68
71 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ 69 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698