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

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

Issue 11968054: <webview>: Implement ExecuteScript (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated stale browser_plugin_messages.h Created 7 years, 11 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.h
diff --git a/chrome/browser/extensions/api/webview/webview_api.h b/chrome/browser/extensions/api/webview/webview_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..d1b32b0625f2432fc78fd77f38ef2de75b95c554
--- /dev/null
+++ b/chrome/browser/extensions/api/webview/webview_api.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_
+#define CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_
+
+#include "chrome/browser/extensions/extension_function.h"
+#include "chrome/browser/extensions/script_executor.h"
+
+namespace extensions {
+namespace webview {
+struct InjectDetails;
Matt Perry 2013/01/23 20:23:58 Do you need this forward decl?
Fady Samuel 2013/01/23 20:54:32 No. Removed.
+} // namespace webview
+namespace api {
+} // namespace api
+} // namespace extensions
+
+class WebviewExecuteScriptFunction : public AsyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("webview.executeScript", WEBVIEW_EXECUTESCRIPT)
+
+ WebviewExecuteScriptFunction();
+
+ protected:
+ virtual ~WebviewExecuteScriptFunction();
+
+ // ExtensionFunction implementation.
+ virtual bool RunImpl() OVERRIDE;
+
+ private:
+
+ void OnExecuteCodeFinished(const std::string& error,
+ int32 on_page_id,
+ const GURL& on_url,
+ const ListValue& result);
+
+};
+#endif // CHROME_BROWSER_EXTENSIONS_API_WEBVIEW_WEBVIEW_API_H_

Powered by Google App Engine
This is Rietveld 408576698