From 3a453fa1f16dfa4168e52790e329148366abb05f Mon Sep 17 00:00:00 2001 From: "timsteele@google.com" Date: Fri, 15 Aug 2008 18:46:34 +0000 Subject: Copy from http://chrome-reviews.prom.corp.google.com/1237 (new gcl changelist model). Description was: Conditionally include personalization/ code by surrounding the hooks into this module with #ifdef CHROME_PERSONALIZATION in various .h/.cc files. Building with the module requires adding this macro as a preprocessor definition in build/internal/essential.vsprops, and adding it to the VCResourceCompiler tool's command line (using /d). We will try and make this easier in the future. TBR=darin git-svn-id: svn://svn.chromium.org/chrome/trunk/src@955 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/render_view_host.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'chrome/browser/render_view_host.h') diff --git a/chrome/browser/render_view_host.h b/chrome/browser/render_view_host.h index df158f9..b546331 100644 --- a/chrome/browser/render_view_host.h +++ b/chrome/browser/render_view_host.h @@ -36,6 +36,9 @@ #include "base/scoped_handle.h" #include "chrome/browser/render_view_host_delegate.h" #include "chrome/browser/render_widget_host.h" +#ifdef CHROME_PERSONALIZATION +#include "chrome/personalization/personalization.h" +#endif #include "webkit/glue/password_form_dom_manager.h" enum ConsoleMessageLevel; @@ -395,6 +398,12 @@ class RenderViewHost : public RenderWidgetHost { // and we're necessarily leaving the page. void UnloadListenerHasFired() { has_unload_listener_ = false; } +#ifdef CHROME_PERSONALIZATION + HostPersonalization personalization() { + return personalization_; + } +#endif + protected: // Overridden from RenderWidgetHost: virtual void UnhandledInputEvent(const WebInputEvent& event); @@ -450,6 +459,10 @@ class RenderViewHost : public RenderWidgetHost { int automation_id); void OnMsgDOMUISend(const std::string& message, const std::string& content); +#ifdef CHROME_PERSONALIZATION + void OnPersonalizationEvent(const std::string& message, + const std::string& content); +#endif void OnMsgGoToEntryAtOffset(int offset); void OnMsgSetTooltipText(const std::wstring& tooltip_text); void OnMsgRunFileChooser(const std::wstring& default_file); @@ -516,6 +529,10 @@ class RenderViewHost : public RenderWidgetHost { // Our delegate, which wants to know about changes in the RenderView. RenderViewHostDelegate* delegate_; +#ifdef CHROME_PERSONALIZATION + HostPersonalization personalization_; +#endif + // true if a renderer has once been valid. We use this flag to display a sad // tab only when we lose our renderer and not if a paint occurs during // initialization. -- cgit v1.1