diff options
-rw-r--r-- | chrome/browser/render_view_host.cc | 6 | ||||
-rw-r--r-- | chrome/browser/render_view_host.h | 16 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 3 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 2 |
5 files changed, 20 insertions, 11 deletions
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc index 56fc23d..0579a47 100644 --- a/chrome/browser/render_view_host.cc +++ b/chrome/browser/render_view_host.cc @@ -1200,12 +1200,14 @@ void RenderViewHost::OnDebugDisconnect() { } } -void RenderViewHost::RaiseAvatarEvent(std::string event_name, - std::string event_arg) { +#ifdef CHROME_PERSONALIZATION +void RenderViewHost::RaisePersonalizationEvent(std::string event_name, + std::string event_arg) { Send(new ViewMsg_PersonalizationEvent(routing_id_, event_name, event_arg)); } +#endif void RenderViewHost::ForwardMessageFromExternalHost( const std::string& target, const std::string& message) { diff --git a/chrome/browser/render_view_host.h b/chrome/browser/render_view_host.h index e81c0dc..865ffd6 100644 --- a/chrome/browser/render_view_host.h +++ b/chrome/browser/render_view_host.h @@ -377,20 +377,20 @@ 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); - #ifdef CHROME_PERSONALIZATION + // Tells the RenderView to raise an personalization event with the given name + // and argument. + void RaisePersonalizationEvent(std::string event_name, std::string event_arg); + HostPersonalization personalization() { return personalization_; } #endif + // Forward a message from external host to chrome renderer. + void ForwardMessageFromExternalHost(const std::string& target, + const std::string& message); + protected: // Overridden from RenderWidgetHost: virtual void UnhandledInputEvent(const WebInputEvent& event); diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 812978e..29599f1 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -413,10 +413,11 @@ IPC_BEGIN_MESSAGES(View, 1) IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, gfx::Size /* The view size to be repainted */) +#ifdef CHROME_PERSONALIZATION IPC_MESSAGE_ROUTED2(ViewMsg_PersonalizationEvent, std::string /* event name */, std::string /* event arguments */) - +#endif // Posts a message to the renderer. IPC_MESSAGE_ROUTED2(ViewMsg_HandleMessageFromExternalHost, std::string /* The target for the message */, diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 0f88427..0700b48 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2481,6 +2481,7 @@ void RenderView::OnThemeChanged() { DidInvalidateRect(webwidget_, view_rect); } +#ifdef CHROME_PERSONALIZATION void RenderView::OnPersonalizationEvent(std::string event_name, std::string event_args) { Personalization::HandleViewMsgPersonalizationEvent(personalization_, @@ -2488,9 +2489,12 @@ void RenderView::OnPersonalizationEvent(std::string event_name, event_name, event_args); } +#endif void RenderView::TransitionToCommittedForNewPage() { +#ifdef CHROME_PERSONALIZATION Personalization::HandleTransitionToCommittedForNewPage(personalization_); +#endif } void RenderView::OnMessageFromExternalHost( diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 746a49f..6ac8f0c 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -431,7 +431,9 @@ class RenderView : public RenderWidget, public WebViewDelegate, // Notification about ui theme changes. void OnThemeChanged(); +#ifdef CHROME_PERSONALIZATION void OnPersonalizationEvent(std::string event_name, std::string event_args); +#endif // Handles messages posted from automation. void OnMessageFromExternalHost(const std::string& target, |