diff options
Diffstat (limited to 'chrome/browser/ui/webui')
-rw-r--r-- | chrome/browser/ui/webui/constrained_html_ui.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/webui/constrained_html_ui.h | 7 | ||||
-rw-r--r-- | chrome/browser/ui/webui/html_dialog_ui.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/webui/html_dialog_ui.h | 12 |
4 files changed, 18 insertions, 12 deletions
diff --git a/chrome/browser/ui/webui/constrained_html_ui.cc b/chrome/browser/ui/webui/constrained_html_ui.cc index c0a5b84..6549242 100644 --- a/chrome/browser/ui/webui/constrained_html_ui.cc +++ b/chrome/browser/ui/webui/constrained_html_ui.cc @@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/lazy_instance.h" +#include "base/property_bag.h" #include "base/values.h" #include "chrome/browser/ui/webui/html_dialog_ui.h" #include "chrome/common/chrome_notification_types.h" @@ -17,7 +18,7 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/public/browser/notification_service.h" -static base::LazyInstance<PropertyAccessor<ConstrainedHtmlUIDelegate*> > +static base::LazyInstance<base::PropertyAccessor<ConstrainedHtmlUIDelegate*> > g_constrained_html_ui_property_accessor = LAZY_INSTANCE_INITIALIZER; ConstrainedHtmlUI::ConstrainedHtmlUI(TabContents* contents) @@ -73,7 +74,7 @@ ConstrainedHtmlUIDelegate* ConstrainedHtmlUI::GetConstrainedDelegate() { } // static -PropertyAccessor<ConstrainedHtmlUIDelegate*>& +base::PropertyAccessor<ConstrainedHtmlUIDelegate*>& ConstrainedHtmlUI::GetPropertyAccessor() { return g_constrained_html_ui_property_accessor.Get(); } diff --git a/chrome/browser/ui/webui/constrained_html_ui.h b/chrome/browser/ui/webui/constrained_html_ui.h index 03d2022..77c2b3b 100644 --- a/chrome/browser/ui/webui/constrained_html_ui.h +++ b/chrome/browser/ui/webui/constrained_html_ui.h @@ -7,7 +7,6 @@ #pragma once #include "chrome/browser/ui/webui/chrome_web_ui.h" -#include "content/common/property_bag.h" class ConstrainedWindow; class HtmlDialogUIDelegate; @@ -16,6 +15,10 @@ class RenderViewHost; class TabContents; class TabContentsWrapper; +namespace base { +template<class T> class PropertyAccessor; +} + class ConstrainedHtmlUIDelegate { public: virtual HtmlDialogUIDelegate* GetHtmlDialogUIDelegate() = 0; @@ -62,7 +65,7 @@ class ConstrainedHtmlUI : public ChromeWebUI { // Returns a property accessor that can be used to set the // ConstrainedHtmlUIDelegate property on a TabContents. - static PropertyAccessor<ConstrainedHtmlUIDelegate*>& + static base::PropertyAccessor<ConstrainedHtmlUIDelegate*>& GetPropertyAccessor(); protected: diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc index 4d5b678..788ee23 100644 --- a/chrome/browser/ui/webui/html_dialog_ui.cc +++ b/chrome/browser/ui/webui/html_dialog_ui.cc @@ -7,6 +7,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/lazy_instance.h" +#include "base/property_bag.h" #include "base/values.h" #include "chrome/common/chrome_notification_types.h" #include "content/browser/renderer_host/render_view_host.h" @@ -14,7 +15,7 @@ #include "content/public/browser/notification_service.h" #include "content/public/common/bindings_policy.h" -static base::LazyInstance<PropertyAccessor<HtmlDialogUIDelegate*> > +static base::LazyInstance<base::PropertyAccessor<HtmlDialogUIDelegate*> > g_html_dialog_ui_property_accessor = LAZY_INSTANCE_INITIALIZER; HtmlDialogUI::HtmlDialogUI(TabContents* tab_contents) @@ -37,7 +38,8 @@ void HtmlDialogUI::CloseDialog(const base::ListValue* args) { } // static -PropertyAccessor<HtmlDialogUIDelegate*>& HtmlDialogUI::GetPropertyAccessor() { +base::PropertyAccessor<HtmlDialogUIDelegate*>& + HtmlDialogUI::GetPropertyAccessor() { return g_html_dialog_ui_property_accessor.Get(); } diff --git a/chrome/browser/ui/webui/html_dialog_ui.h b/chrome/browser/ui/webui/html_dialog_ui.h index 9e26f85..390790d 100644 --- a/chrome/browser/ui/webui/html_dialog_ui.h +++ b/chrome/browser/ui/webui/html_dialog_ui.h @@ -11,17 +11,17 @@ #include "base/string16.h" #include "chrome/browser/ui/webui/chrome_web_ui.h" -#include "content/common/property_bag.h" #include "googleurl/src/gurl.h" -namespace gfx { -class Size; -} - struct ContextMenuParams; namespace base { class ListValue; +template<class T> class PropertyAccessor; +} + +namespace gfx { +class Size; } // Implement this class to receive notifications. @@ -105,7 +105,7 @@ class HtmlDialogUI : public ChromeWebUI { // Returns the PropertyBag accessor object used to write the delegate pointer // into the TabContents (see class-level comment above). - static PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); + static base::PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); private: // WebUI |