summaryrefslogtreecommitdiffstats
path: root/chrome/browser/render_view_host.h
diff options
context:
space:
mode:
authorjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 20:34:45 +0000
committerjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 20:34:45 +0000
commit18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0 (patch)
treedaa421607577ba79de24e9d9d8c62f60dff60a29 /chrome/browser/render_view_host.h
parent8c026e7a5ab2077eb8381e7b79a78020624a5a64 (diff)
downloadchromium_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/render_view_host.h')
-rw-r--r--chrome/browser/render_view_host.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome/browser/render_view_host.h b/chrome/browser/render_view_host.h
index dcba399..e80f111 100644
--- a/chrome/browser/render_view_host.h
+++ b/chrome/browser/render_view_host.h
@@ -333,6 +333,10 @@ class RenderViewHost : public RenderWidgetHost {
// process.
void AllowDomAutomationBindings();
+ // Tell the render view to allow the javascript access to
+ // the external host via automation.
+ void AllowExternalHostBindings();
+
// Tell the render view to expose DOM bindings so that the JS content
// can send JSON-encoded data back to the browser process.
// This is used for HTML-based UI.
@@ -398,9 +402,9 @@ class RenderViewHost : public RenderWidgetHost {
// and we're necessarily leaving the page.
void UnloadListenerHasFired() { has_unload_listener_ = false; }
- // Posts a message to the renderer.
- void PostMessage(const std::string& target,
- const std::string& message);
+ // Forward a message from external host to chrome renderer.
+ void ForwardMessageFromExternalHost(const std::string& target,
+ const std::string& message);
#ifdef CHROME_PERSONALIZATION
HostPersonalization personalization() {
@@ -463,8 +467,8 @@ class RenderViewHost : public RenderWidgetHost {
int automation_id);
void OnMsgDOMUISend(const std::string& message,
const std::string& content);
- void OnMsgExternalHostMessage(const std::string& receiver,
- const std::string& message);
+ void OnMsgForwardMessageToExternalHost(const std::string& receiver,
+ const std::string& message);
#ifdef CHROME_PERSONALIZATION
void OnPersonalizationEvent(const std::string& message,
const std::string& content);
@@ -555,6 +559,10 @@ class RenderViewHost : public RenderWidgetHost {
// sending messages back to the browser.
bool enable_dom_ui_bindings_;
+ // True if javascript access to the external host (through
+ // automation) is allowed.
+ bool enable_external_host_bindings_;
+
// Handle to an event that's set when the page is showing a modal dialog box
// (or equivalent constrained window). The renderer and plugin processes
// check this to know if they should pump messages/tasks then.