diff options
author | joshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 20:34:45 +0000 |
---|---|---|
committer | joshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-21 20:34:45 +0000 |
commit | 18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0 (patch) | |
tree | daa421607577ba79de24e9d9d8c62f60dff60a29 /chrome/browser/external_tab_container.cc | |
parent | 8c026e7a5ab2077eb8381e7b79a78020624a5a64 (diff) | |
download | chromium_src-18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0.zip chromium_src-18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0.tar.gz chromium_src-18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0.tar.bz2 |
Code review changes. Incorporated all the suggestions from previous review.
One item not changed yet is to rename 'receiver' in ForwardMessageToExternalHost.
The idea is to invoke receiver("message") at the other end. So for example if the
args to ForwardMessageToExternalHost("hello", "world") then we will invoke a
script hello("world") on the other side.
'receiver' doesn't really describe the first argument here so if there is a
better suggestion, I would be happy to change it :)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_tab_container.cc')
-rw-r--r-- | chrome/browser/external_tab_container.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc index bc25861..1bd3dd8 100644 --- a/chrome/browser/external_tab_container.cc +++ b/chrome/browser/external_tab_container.cc @@ -35,6 +35,7 @@ #include "chrome/browser/profile.h" #include "chrome/browser/tab_contents.h" #include "chrome/browser/tab_contents_container_view.h" +#include "chrome/browser/web_contents.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/win_util.h" #include "chrome/views/hwnd_view_container.h" @@ -89,6 +90,11 @@ bool ExternalTabContainer::Init(Profile* profile) { } tab_contents_->SetupController(profile); tab_contents_->set_delegate(this); + + WebContents* web_conents = tab_contents_->AsWebContents(); + if (web_conents) + web_conents->render_view_host()->AllowExternalHostBindings(); + // Create a TabContentsContainerView to handle focus cycling using Tab and // Shift-Tab. // TODO(sanjeevr): We need to create a dummy FocusTraversable object to @@ -238,11 +244,11 @@ void ExternalTabContainer::DidNavigate(NavigationType nav_type, } } -void ExternalTabContainer::SendExternalHostMessage(const std::string& receiver, - const std::string& message) { +void ExternalTabContainer::ForwardMessageToExternalHost( + const std::string& receiver, const std::string& message) { if(automation_) { automation_->Send( - new AutomationMsg_SendExternalHostMessage(0, receiver, message)); + new AutomationMsg_ForwardMessageToExternalHost(0, receiver, message)); } } |