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

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: 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..4a4b88239166ce7eb7993684a176e1d8731b686e 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);
+ if (!guest)
+ return false;
+
+ guest->Go(relative_index);
+ return true;
+}
« no previous file with comments | « chrome/browser/extensions/api/webview/webview_api.h ('k') | chrome/browser/extensions/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698