| 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 namespace base { |
| 15 class CommandLine; | 16 class CommandLine; |
| 17 } |
| 16 | 18 |
| 17 namespace content { | 19 namespace content { |
| 18 class BrowserContext; | 20 class BrowserContext; |
| 19 } | 21 } |
| 20 | 22 |
| 21 namespace extensions { | 23 namespace extensions { |
| 22 | 24 |
| 23 class ChromeExtensionsAPIClient; | 25 class ChromeExtensionsAPIClient; |
| 24 | 26 |
| 25 // Implementation of extensions::BrowserClient for Chrome, which includes | 27 // Implementation of extensions::BrowserClient for Chrome, which includes |
| 26 // knowledge of Profiles, BrowserContexts and incognito. | 28 // knowledge of Profiles, BrowserContexts and incognito. |
| 27 // | 29 // |
| 28 // NOTE: Methods that do not require knowledge of browser concepts should be | 30 // NOTE: Methods that do not require knowledge of browser concepts should be |
| 29 // implemented in ChromeExtensionsClient even if they are only used in the | 31 // implemented in ChromeExtensionsClient even if they are only used in the |
| 30 // browser process (see chrome/common/extensions/chrome_extensions_client.h). | 32 // browser process (see chrome/common/extensions/chrome_extensions_client.h). |
| 31 class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { | 33 class ChromeExtensionsBrowserClient : public ExtensionsBrowserClient { |
| 32 public: | 34 public: |
| 33 ChromeExtensionsBrowserClient(); | 35 ChromeExtensionsBrowserClient(); |
| 34 virtual ~ChromeExtensionsBrowserClient(); | 36 virtual ~ChromeExtensionsBrowserClient(); |
| 35 | 37 |
| 36 // BrowserClient overrides: | 38 // BrowserClient overrides: |
| 37 virtual bool IsShuttingDown() OVERRIDE; | 39 virtual bool IsShuttingDown() OVERRIDE; |
| 38 virtual bool AreExtensionsDisabled(const CommandLine& command_line, | 40 virtual bool AreExtensionsDisabled(const base::CommandLine& command_line, |
| 39 content::BrowserContext* context) OVERRIDE; | 41 content::BrowserContext* context) OVERRIDE; |
| 40 virtual bool IsValidContext(content::BrowserContext* context) OVERRIDE; | 42 virtual bool IsValidContext(content::BrowserContext* context) OVERRIDE; |
| 41 virtual bool IsSameContext(content::BrowserContext* first, | 43 virtual bool IsSameContext(content::BrowserContext* first, |
| 42 content::BrowserContext* second) OVERRIDE; | 44 content::BrowserContext* second) OVERRIDE; |
| 43 virtual bool HasOffTheRecordContext( | 45 virtual bool HasOffTheRecordContext( |
| 44 content::BrowserContext* context) OVERRIDE; | 46 content::BrowserContext* context) OVERRIDE; |
| 45 virtual content::BrowserContext* GetOffTheRecordContext( | 47 virtual content::BrowserContext* GetOffTheRecordContext( |
| 46 content::BrowserContext* context) OVERRIDE; | 48 content::BrowserContext* context) OVERRIDE; |
| 47 virtual content::BrowserContext* GetOriginalContext( | 49 virtual content::BrowserContext* GetOriginalContext( |
| 48 content::BrowserContext* context) OVERRIDE; | 50 content::BrowserContext* context) OVERRIDE; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 | 85 |
| 84 // Client for API implementations. | 86 // Client for API implementations. |
| 85 scoped_ptr<ChromeExtensionsAPIClient> api_client_; | 87 scoped_ptr<ChromeExtensionsAPIClient> api_client_; |
| 86 | 88 |
| 87 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); | 89 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); |
| 88 }; | 90 }; |
| 89 | 91 |
| 90 } // namespace extensions | 92 } // namespace extensions |
| 91 | 93 |
| 92 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 94 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |