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> |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 215 |
216 // Indicates whether extension update checks should be allowed. | 216 // Indicates whether extension update checks should be allowed. |
217 virtual bool IsBackgroundUpdateAllowed() = 0; | 217 virtual bool IsBackgroundUpdateAllowed() = 0; |
218 | 218 |
219 // Indicates whether an extension update which specifies its minimum browser | 219 // Indicates whether an extension update which specifies its minimum browser |
220 // version as |min_version| can be installed by the client. Not all extensions | 220 // version as |min_version| can be installed by the client. Not all extensions |
221 // embedders share the same versioning model, so interpretation of the string | 221 // embedders share the same versioning model, so interpretation of the string |
222 // is left up to the embedder. | 222 // is left up to the embedder. |
223 virtual bool IsMinBrowserVersionSupported(const std::string& min_version) = 0; | 223 virtual bool IsMinBrowserVersionSupported(const std::string& min_version) = 0; |
224 | 224 |
| 225 // Saves image data on clipboard. |
| 226 virtual void SaveImageDataToClipboard( |
| 227 const std::vector<char>& image_data, |
| 228 const std::string& type, |
| 229 const base::Closure& success_callback, |
| 230 const base::Closure& error_callback) = 0; |
| 231 |
225 // Embedders can override this function to handle extension errors. | 232 // Embedders can override this function to handle extension errors. |
226 virtual void ReportError(content::BrowserContext* context, | 233 virtual void ReportError(content::BrowserContext* context, |
227 std::unique_ptr<ExtensionError> error); | 234 std::unique_ptr<ExtensionError> error); |
228 | 235 |
229 // Returns the ExtensionWebContentsObserver for the given |web_contents|. | 236 // Returns the ExtensionWebContentsObserver for the given |web_contents|. |
230 virtual ExtensionWebContentsObserver* GetExtensionWebContentsObserver( | 237 virtual ExtensionWebContentsObserver* GetExtensionWebContentsObserver( |
231 content::WebContents* web_contents) = 0; | 238 content::WebContents* web_contents) = 0; |
232 | 239 |
233 // Cleans up browser-side state associated with a WebView that is being | 240 // Cleans up browser-side state associated with a WebView that is being |
234 // destroyed. | 241 // destroyed. |
(...skipping 27 matching lines...) Expand all Loading... |
262 // Returns the single instance of |this|. | 269 // Returns the single instance of |this|. |
263 static ExtensionsBrowserClient* Get(); | 270 static ExtensionsBrowserClient* Get(); |
264 | 271 |
265 // Initialize the single instance. | 272 // Initialize the single instance. |
266 static void Set(ExtensionsBrowserClient* client); | 273 static void Set(ExtensionsBrowserClient* client); |
267 }; | 274 }; |
268 | 275 |
269 } // namespace extensions | 276 } // namespace extensions |
270 | 277 |
271 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 278 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |