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 <map> |
| 9 |
8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
10 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/extensions/chrome_notification_observer.h" | 14 #include "chrome/browser/extensions/chrome_notification_observer.h" |
13 #include "extensions/browser/extensions_browser_client.h" | 15 #include "extensions/browser/extensions_browser_client.h" |
14 | 16 |
15 namespace base { | 17 namespace base { |
16 class CommandLine; | 18 class CommandLine; |
17 } | 19 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual bool DidVersionUpdate(content::BrowserContext* context) OVERRIDE; | 84 virtual bool DidVersionUpdate(content::BrowserContext* context) OVERRIDE; |
83 virtual scoped_ptr<AppSorting> CreateAppSorting() OVERRIDE; | 85 virtual scoped_ptr<AppSorting> CreateAppSorting() OVERRIDE; |
84 virtual bool IsRunningInForcedAppMode() OVERRIDE; | 86 virtual bool IsRunningInForcedAppMode() OVERRIDE; |
85 virtual ApiActivityMonitor* GetApiActivityMonitor( | 87 virtual ApiActivityMonitor* GetApiActivityMonitor( |
86 content::BrowserContext* context) OVERRIDE; | 88 content::BrowserContext* context) OVERRIDE; |
87 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; | 89 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; |
88 virtual void RegisterExtensionFunctions( | 90 virtual void RegisterExtensionFunctions( |
89 ExtensionFunctionRegistry* registry) const OVERRIDE; | 91 ExtensionFunctionRegistry* registry) const OVERRIDE; |
90 virtual scoped_ptr<extensions::RuntimeAPIDelegate> CreateRuntimeAPIDelegate( | 92 virtual scoped_ptr<extensions::RuntimeAPIDelegate> CreateRuntimeAPIDelegate( |
91 content::BrowserContext* context) const OVERRIDE; | 93 content::BrowserContext* context) const OVERRIDE; |
| 94 virtual bool IsComponentExtensionResource( |
| 95 const base::FilePath& extension_path, |
| 96 const base::FilePath& resource_path, |
| 97 int* resource_id) const OVERRIDE; |
92 | 98 |
93 private: | 99 private: |
94 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsBrowserClient>; | 100 friend struct base::DefaultLazyInstanceTraits<ChromeExtensionsBrowserClient>; |
95 | 101 |
96 // Observer for Chrome-specific notifications. | 102 // Observer for Chrome-specific notifications. |
97 ChromeNotificationObserver notification_observer_; | 103 ChromeNotificationObserver notification_observer_; |
98 | 104 |
99 #if defined(ENABLE_EXTENSIONS) | 105 #if defined(ENABLE_EXTENSIONS) |
100 // Client for API implementations. | 106 // Client for API implementations. |
101 scoped_ptr<ChromeExtensionsAPIClient> api_client_; | 107 scoped_ptr<ChromeExtensionsAPIClient> api_client_; |
102 #endif | 108 #endif |
103 | 109 |
| 110 // A map from a resource path to the resource ID. Used by |
| 111 // IsComponentExtensionResource. |
| 112 std::map<base::FilePath, int> path_to_resource_id_; |
| 113 |
104 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); | 114 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionsBrowserClient); |
105 }; | 115 }; |
106 | 116 |
107 } // namespace extensions | 117 } // namespace extensions |
108 | 118 |
109 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ | 119 #endif // CHROME_BROWSER_EXTENSIONS_CHROME_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |