Chromium Code Reviews| 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/execute_code_function.h" | 8 #include "chrome/browser/extensions/api/execute_code_function.h" |
| 9 | 9 |
| 10 // WARNING: Webview could be loaded in an unblessed context, thus any new | |
| 11 // APIs must be guarded with process ID check to prevent abuse by normal | |
| 12 // renderer processes. | |
|
not at google - send to devlin
2013/09/25 17:14:03
To enforce this at another level, consider having
guohui
2013/09/25 22:43:51
Done.
| |
| 13 | |
| 10 namespace extensions { | 14 namespace extensions { |
| 11 | 15 |
| 12 class WebviewClearDataFunction : public AsyncExtensionFunction { | 16 class WebviewClearDataFunction : public AsyncExtensionFunction { |
| 13 public: | 17 public: |
| 14 DECLARE_EXTENSION_FUNCTION("webview.clearData", WEBVIEW_CLEARDATA); | 18 DECLARE_EXTENSION_FUNCTION("webview.clearData", WEBVIEW_CLEARDATA); |
| 15 | 19 |
| 16 WebviewClearDataFunction(); | 20 WebviewClearDataFunction(); |
| 17 | 21 |
| 18 protected: | 22 protected: |
| 19 virtual ~WebviewClearDataFunction(); | 23 virtual ~WebviewClearDataFunction(); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 // ExtensionFunction implementation. | 172 // ExtensionFunction implementation. |
| 169 virtual bool RunImpl() OVERRIDE; | 173 virtual bool RunImpl() OVERRIDE; |
| 170 | 174 |
| 171 private: | 175 private: |
| 172 DISALLOW_COPY_AND_ASSIGN(WebviewTerminateFunction); | 176 DISALLOW_COPY_AND_ASSIGN(WebviewTerminateFunction); |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 } // namespace extensions | 179 } // namespace extensions |
| 176 | 180 |
| 177 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ | 181 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_ |
| OLD | NEW |