summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorericcheng@google.com <ericcheng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-26 01:27:35 +0000
committerericcheng@google.com <ericcheng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-26 01:27:35 +0000
commit1cc87964e944939380107ed86107868344adb304 (patch)
tree0ea2ec036516062e51da919edb3af0604f6e2a3f /chrome/browser
parentf3bb0346579cd4eb431c45e43041e139876015e8 (diff)
downloadchromium_src-1cc87964e944939380107ed86107868344adb304.zip
chromium_src-1cc87964e944939380107ed86107868344adb304.tar.gz
chromium_src-1cc87964e944939380107ed86107868344adb304.tar.bz2
Some more glue code for the personalization module.
Added ability to invoke a method on an NPObject wrapped in a CppVariant. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/render_view_host.cc9
-rw-r--r--chrome/browser/render_view_host.h4
2 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index 9385b0a..56fc23d 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -1003,7 +1003,7 @@ void RenderViewHost::OnMsgForwardMessageToExternalHost(
#ifdef CHROME_PERSONALIZATION
void RenderViewHost::OnPersonalizationEvent(const std::string& message,
- const std::string& content) {
+ const std::string& content) {
Personalization::HandlePersonalizationEvent(this, message, content);
}
#endif
@@ -1200,6 +1200,13 @@ void RenderViewHost::OnDebugDisconnect() {
}
}
+void RenderViewHost::RaiseAvatarEvent(std::string event_name,
+ std::string event_arg) {
+ Send(new ViewMsg_PersonalizationEvent(routing_id_,
+ event_name,
+ event_arg));
+}
+
void RenderViewHost::ForwardMessageFromExternalHost(
const std::string& target, const std::string& message) {
Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message));
diff --git a/chrome/browser/render_view_host.h b/chrome/browser/render_view_host.h
index 373113a..e81c0dc 100644
--- a/chrome/browser/render_view_host.h
+++ b/chrome/browser/render_view_host.h
@@ -377,6 +377,10 @@ class RenderViewHost : public RenderWidgetHost {
// and we're necessarily leaving the page.
void UnloadListenerHasFired() { has_unload_listener_ = false; }
+ // Tells the RenderView to raise an avatar event with the given name and
+ // argument.
+ void RaiseAvatarEvent(std::string event_name, std::string event_arg);
+
// Forward a message from external host to chrome renderer.
void ForwardMessageFromExternalHost(const std::string& target,
const std::string& message);