OLD | NEW |
---|---|
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 CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/extensions/chrome_notification_observer.h" | 12 #include "chrome/browser/extensions/chrome_notification_observer.h" |
13 #include "extensions/browser/extensions_browser_client.h" | 13 #include "extensions/browser/extensions_browser_client.h" |
14 | 14 |
15 class CommandLine; | 15 class CommandLine; |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 class BrowserContext; | 18 class BrowserContext; |
19 } | 19 } |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 | 22 |
23 class ChromeExtensionsApiClient; | |
24 | |
23 // Implementation of extensions::BrowserClient for Chrome, which includes | 25 // Implementation of extensions::BrowserClient for Chrome, which includes |
24 // knowledge of Profiles, BrowserContexts and incognito. | 26 // knowledge of Profiles, BrowserContexts and incognito. |
25 // | 27 // |
26 // NOTE: Methods that do not require knowledge of browser concepts should be | 28 // NOTE: Methods that do not require knowledge of browser concepts should be |
27 // implemented in ChromeExtensionsClient even if they are only used in the | 29 // implemented in ChromeExtensionsClient even if they are only used in the |
28 // browser process (see chrome/common/extensions/chrome_extensions_client.h). | 30 // browser process (see chrome/common/extensions/chrome_extensions_client.h). |
29 class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { | 31 class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { |
30 public: | 32 public: |
31 ChromeExtensionsBrowserClient(); | 33 ChromeExtensionsBrowserClient(); |
32 virtual ~ChromeExtensionsBrowserClient(); | 34 virtual ~ChromeExtensionsBrowserClient(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
69 virtual ApiActivityMonitor* GetApiActivityMonitor( | 71 virtual ApiActivityMonitor* GetApiActivityMonitor( |
70 content::BrowserContext* context) OVERRIDE; | 72 content::BrowserContext* context) OVERRIDE; |
71 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; | 73 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; |
72 | 74 |
73 private: | 75 private: |
74 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsBrowserClient>; | 76 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsBrowserClient>; |
75 | 77 |
76 // Observer for Chrome-specific notifications. | 78 // Observer for Chrome-specific notifications. |
77 ChromeNotificationObserver notification_observer_; | 79 ChromeNotificationObserver notification_observer_; |
78 | 80 |
81 // Client for API implementations. | |
82 scoped_ptr<ChromeExtensionsApiClient> api_client_; | |
Devlin
2014/03/03 17:07:59
Would it make sense to put this in ExtensionsBrows
James Cook
2014/03/03 19:53:09
Unless you feel strongly I'd like to keep it here.
Devlin
2014/03/03 20:25:27
I don't feel strongly at all, so this is fine. Bu
Yoyo Zhou
2014/03/04 19:55:04
Do we want to be able to handle ExtensionsApiClien
| |
83 | |
79 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); | 84 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); |
80 }; | 85 }; |
81 | 86 |
82 } // namespace extensions | 87 } // namespace extensions |
83 | 88 |
84 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 89 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |