Chromium Code Reviews| Index: chrome/browser/extensions/api/webview/webview_api.cc |
| diff --git a/chrome/browser/extensions/api/webview/webview_api.cc b/chrome/browser/extensions/api/webview/webview_api.cc |
| index db6675f967367a2894daa4a3a1284be4c4f227c8..5e78d814a3a0b4e89c303967844a286f9998fb15 100644 |
| --- a/chrome/browser/extensions/api/webview/webview_api.cc |
| +++ b/chrome/browser/extensions/api/webview/webview_api.cc |
| @@ -64,6 +64,9 @@ bool WebviewExecuteCodeFunction::IsWebView() const { |
| return true; |
| } |
| +WebviewExecuteScriptFunction::WebviewExecuteScriptFunction() { |
| +} |
| + |
| void WebviewExecuteScriptFunction::OnExecuteCodeFinished( |
| const std::string& error, |
| int32 on_page_id, |
| @@ -76,7 +79,31 @@ void WebviewExecuteScriptFunction::OnExecuteCodeFinished( |
| result); |
| } |
| +WebviewInsertCSSFunction::WebviewInsertCSSFunction() { |
| +} |
| + |
| bool WebviewInsertCSSFunction::ShouldInsertCSS() const { |
| return true; |
| } |
| +WebviewGoFunction::WebviewGoFunction() { |
| +} |
| + |
| +WebviewGoFunction::~WebviewGoFunction() { |
| +} |
| + |
| +bool WebviewGoFunction::RunImpl() { |
| + int instance_id = 0; |
| + EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &instance_id)); |
| + |
| + int relative_index = 0; |
| + EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(1, &relative_index)); |
| + |
| + WebViewGuest* guest = WebViewGuest::From( |
| + render_view_host()->GetProcess()->GetID(), instance_id); |
|
Matt Perry
2013/06/25 19:33:12
indent to 4 when wrapping
Fady Samuel
2013/06/25 21:52:45
Done.
|
| + if (!guest) |
| + return false; |
| + |
| + guest->Go(relative_index); |
| + return true; |
| +} |