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 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 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/public/browser/bluetooth_chooser.h" | 14 #include "content/public/browser/bluetooth_chooser.h" |
15 #include "extensions/browser/extension_event_histogram_value.h" | 15 #include "extensions/browser/extension_event_histogram_value.h" |
16 #include "extensions/browser/extension_prefs_observer.h" | 16 #include "extensions/browser/extension_prefs_observer.h" |
17 #include "extensions/common/api/clipboard.h" | |
17 #include "extensions/common/view_type.h" | 18 #include "extensions/common/view_type.h" |
18 | 19 |
19 class ExtensionFunctionRegistry; | 20 class ExtensionFunctionRegistry; |
20 class PrefService; | 21 class PrefService; |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class CommandLine; | 24 class CommandLine; |
24 class FilePath; | 25 class FilePath; |
25 class ListValue; | 26 class ListValue; |
26 } | 27 } |
(...skipping 10 matching lines...) Expand all Loading... | |
37 class URLRequest; | 38 class URLRequest; |
38 class URLRequestJob; | 39 class URLRequestJob; |
39 } | 40 } |
40 | 41 |
41 namespace update_client { | 42 namespace update_client { |
42 class UpdateClient; | 43 class UpdateClient; |
43 } | 44 } |
44 | 45 |
45 namespace extensions { | 46 namespace extensions { |
46 | 47 |
48 namespace clipboard = api::clipboard; | |
Devlin
2016/12/09 15:23:54
ditto (https://codereview.chromium.org/2379573008/
jennyz
2016/12/14 01:15:36
Done.
| |
49 | |
47 class ComponentExtensionResourceManager; | 50 class ComponentExtensionResourceManager; |
48 class Extension; | 51 class Extension; |
49 class ExtensionCache; | 52 class ExtensionCache; |
50 class ExtensionError; | 53 class ExtensionError; |
51 class ExtensionHostDelegate; | 54 class ExtensionHostDelegate; |
52 class ExtensionPrefsObserver; | 55 class ExtensionPrefsObserver; |
53 class ExtensionApiFrameIdMap; | 56 class ExtensionApiFrameIdMap; |
54 class ExtensionApiFrameIdMapHelper; | 57 class ExtensionApiFrameIdMapHelper; |
55 class ExtensionNavigationUIData; | 58 class ExtensionNavigationUIData; |
56 class ExtensionSystem; | 59 class ExtensionSystem; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 | 219 |
217 // Indicates whether extension update checks should be allowed. | 220 // Indicates whether extension update checks should be allowed. |
218 virtual bool IsBackgroundUpdateAllowed() = 0; | 221 virtual bool IsBackgroundUpdateAllowed() = 0; |
219 | 222 |
220 // Indicates whether an extension update which specifies its minimum browser | 223 // Indicates whether an extension update which specifies its minimum browser |
221 // version as |min_version| can be installed by the client. Not all extensions | 224 // version as |min_version| can be installed by the client. Not all extensions |
222 // embedders share the same versioning model, so interpretation of the string | 225 // embedders share the same versioning model, so interpretation of the string |
223 // is left up to the embedder. | 226 // is left up to the embedder. |
224 virtual bool IsMinBrowserVersionSupported(const std::string& min_version) = 0; | 227 virtual bool IsMinBrowserVersionSupported(const std::string& min_version) = 0; |
225 | 228 |
229 // Saves image data on clipboard. | |
230 virtual void SaveImageDataToClipboard( | |
231 const std::vector<char>& image_data, | |
232 clipboard::ImageType type, | |
233 const base::Closure& success_callback, | |
234 const base::Closure& error_callback) = 0; | |
235 | |
226 // Embedders can override this function to handle extension errors. | 236 // Embedders can override this function to handle extension errors. |
227 virtual void ReportError(content::BrowserContext* context, | 237 virtual void ReportError(content::BrowserContext* context, |
228 std::unique_ptr<ExtensionError> error); | 238 std::unique_ptr<ExtensionError> error); |
229 | 239 |
230 // Returns the ExtensionWebContentsObserver for the given |web_contents|. | 240 // Returns the ExtensionWebContentsObserver for the given |web_contents|. |
231 virtual ExtensionWebContentsObserver* GetExtensionWebContentsObserver( | 241 virtual ExtensionWebContentsObserver* GetExtensionWebContentsObserver( |
232 content::WebContents* web_contents) = 0; | 242 content::WebContents* web_contents) = 0; |
233 | 243 |
234 // Cleans up browser-side state associated with a WebView that is being | 244 // Cleans up browser-side state associated with a WebView that is being |
235 // destroyed. | 245 // destroyed. |
(...skipping 30 matching lines...) Expand all Loading... | |
266 // Returns the single instance of |this|. | 276 // Returns the single instance of |this|. |
267 static ExtensionsBrowserClient* Get(); | 277 static ExtensionsBrowserClient* Get(); |
268 | 278 |
269 // Initialize the single instance. | 279 // Initialize the single instance. |
270 static void Set(ExtensionsBrowserClient* client); | 280 static void Set(ExtensionsBrowserClient* client); |
271 }; | 281 }; |
272 | 282 |
273 } // namespace extensions | 283 } // namespace extensions |
274 | 284 |
275 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 285 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |