| 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 a5be9dfe60b17d3372c1edab6f2c38619d940695..ed9c5d000275d2ab5c2f32cab6c7db95abe91ea0 100644
|
| --- a/chrome/browser/extensions/api/webview/webview_api.cc
|
| +++ b/chrome/browser/extensions/api/webview/webview_api.cc
|
| @@ -80,3 +80,24 @@ bool WebviewInsertCSSFunction::ShouldInsertCSS() const {
|
| return true;
|
| }
|
|
|
| +WebviewGoFunction::WebviewGoFunction() {
|
| +}
|
| +
|
| +WebviewGoFunction::~WebviewGoFunction() {
|
| +}
|
| +
|
| +bool WebviewGoFunction::RunImpl() {
|
| + int instance_id;
|
| + EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &instance_id));
|
| +
|
| + int relative_index;
|
| + EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(1, &relative_index));
|
| +
|
| + chrome::WebViewGuest* guest = chrome::WebViewGuest::From(
|
| + render_view_host()->GetProcess()->GetID(), instance_id);
|
| + if (!guest)
|
| + return false;
|
| +
|
| + guest->Go(relative_index);
|
| + return true;
|
| +}
|
|
|