summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 09:47:35 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 09:47:35 +0000
commit912256b3517241047095dac6946de191029dda27 (patch)
tree7799ca1544916d7e1f44b06bd0dd43e080b61996 /chrome/browser/tab_contents
parent50c4e907cf41e395a5edecd1ae122b9a2b35410d (diff)
downloadchromium_src-912256b3517241047095dac6946de191029dda27.zip
chromium_src-912256b3517241047095dac6946de191029dda27.tar.gz
chromium_src-912256b3517241047095dac6946de191029dda27.tar.bz2
Try again to land "Implement script API:executeScript"
http://codereview.chromium.org/173556 TBR=mpcomplete@chromium.org Patch from Jerry Tang <tangjie@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc7
-rw-r--r--chrome/browser/tab_contents/tab_contents.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 991b0e2..c7c1c37 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -845,6 +845,13 @@ void TabContents::CloseAllSuppressedPopups() {
blocked_popups_->CloseAll();
}
+void TabContents::ExecuteCode(int request_id, const std::string& extension_id,
+ bool is_js_code, const std::string& code_string) {
+ render_view_host()->Send(
+ new ViewMsg_ExecuteCode(render_view_host()->routing_id(), request_id,
+ extension_id, is_js_code, code_string));
+}
+
void TabContents::PopupNotificationVisibilityChanged(bool visible) {
render_view_host()->PopupNotificationVisibilityChanged(visible);
}
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index ee1b5bc..61404f3 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -363,6 +363,10 @@ class TabContents : public PageNavigator,
// of unwanted popups.
void CloseAllSuppressedPopups();
+ // Execute code in this tab.
+ void ExecuteCode(int request_id, const std::string& extension_id,
+ bool is_js_code, const std::string& code_string);
+
// Called when the blocked popup notification is shown or hidden.
virtual void PopupNotificationVisibilityChanged(bool visible);