OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_API_WEBVIEW_WEBVIEW_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/api/capture_web_contents_function.h" | 8 #include "chrome/browser/extensions/api/capture_web_contents_function.h" |
9 #include "chrome/browser/extensions/api/execute_code_function.h" | 9 #include "chrome/browser/extensions/api/execute_code_function.h" |
10 #include "chrome/browser/guest_view/web_view/web_view_find_helper.h" | 10 #include "chrome/browser/guestview/webview/webview_find_helper.h" |
11 #include "chrome/browser/guest_view/web_view/web_view_guest.h" | 11 #include "chrome/browser/guestview/webview/webview_guest.h" |
12 | 12 |
13 // WARNING: Webview could be loaded in an unblessed context, thus any new | 13 // WARNING: Webview could be loaded in an unblessed context, thus any new |
14 // APIs must extend WebviewExtensionFunction/WebviewExecuteCodeFunction which | 14 // APIs must extend WebviewExtensionFunction/WebviewExecuteCodeFunction which |
15 // do a process ID check to prevent abuse by normal renderer processes. | 15 // do a process ID check to prevent abuse by normal renderer processes. |
16 // TODO(guohui): refactor WebviewExecuteCodeFunction to also extend | 16 // TODO(guohui): refactor WebviewExecuteCodeFunction to also extend |
17 // WebviewExtensionFunction. | 17 // WebviewExtensionFunction. |
18 namespace extensions { | 18 namespace extensions { |
19 | 19 |
20 // An abstract base class for async webview APIs. It does a process ID check | 20 // An abstract base class for async webview APIs. It does a process ID check |
21 // in RunImpl, and then calls RunImplSafe which must be overriden by all | 21 // in RunImpl, and then calls RunImplSafe which must be overriden by all |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 private: | 362 private: |
363 // WebviewExtensionFunction implementation. | 363 // WebviewExtensionFunction implementation. |
364 virtual bool RunImplSafe(WebViewGuest* guest) OVERRIDE; | 364 virtual bool RunImplSafe(WebViewGuest* guest) OVERRIDE; |
365 | 365 |
366 DISALLOW_COPY_AND_ASSIGN(WebviewTerminateFunction); | 366 DISALLOW_COPY_AND_ASSIGN(WebviewTerminateFunction); |
367 }; | 367 }; |
368 | 368 |
369 } // namespace extensions | 369 } // namespace extensions |
370 | 370 |
371 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ | 371 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ |
OLD | NEW |