Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Unified Diff: chrome/browser/extensions/api/webview/webview_api.cc

Issue 17447005: <webview>: Move back, forward, canGoBack, canGoForward, go from content to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@filter_listener
Patch Set: Added DISALLOW_COPY_AND_ASSIGN Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698