From 1fa0c358faf8fef373aca6d30b97c2879539fe9a Mon Sep 17 00:00:00 2001 From: "joth@chromium.org" Date: Fri, 26 Mar 2010 09:32:20 +0000 Subject: Re-attempt at http://codereview.chromium.org/1344002 Adds geolocaiton support to the location bar content image model and content bubble model. Most of these edits were lifted out of http://codereview.chromium.org/650180 TODO: add geolocation support to the views in the three UI platforms for the bubble model. (NOTE this change results in poorly formed bubble contents for the geolocaiton bubble, this will be fixed up in the following CLs) BUG=11246 TEST=open a site that uses geolocaiton, select allow/deny & click the icon. Review URL: http://codereview.chromium.org/1369002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42739 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/content_setting_bubble_model.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'chrome/browser/content_setting_bubble_model.h') diff --git a/chrome/browser/content_setting_bubble_model.h b/chrome/browser/content_setting_bubble_model.h index dcbafb7..f506b48 100644 --- a/chrome/browser/content_setting_bubble_model.h +++ b/chrome/browser/content_setting_bubble_model.h @@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_CONTENT_SETTING_BUBBLE_MODEL_H_ #define CHROME_BROWSER_CONTENT_SETTING_BUBBLE_MODEL_H_ +#include #include #include @@ -13,6 +14,7 @@ #include "chrome/common/notification_registrar.h" #include "third_party/skia/include/core/SkBitmap.h" +class GURL; class Profile; class SkBitmap; class TabContents; @@ -46,11 +48,18 @@ class ContentSettingBubbleModel : public NotificationObserver { }; typedef std::vector RadioGroups; + struct DomainList { + std::string title; + std::set hosts; + }; + struct BubbleContent { std::string title; PopupItems popup_items; RadioGroups radio_groups; + std::vector domain_lists; std::string manage_link; + std::string clear_link; }; const BubbleContent& bubble_content() const { return bubble_content_; } @@ -63,6 +72,7 @@ class ContentSettingBubbleModel : public NotificationObserver { virtual void OnRadioClicked(int radio_group, int radio_index) {} virtual void OnPopupClicked(int index) {} virtual void OnManageLinkClicked() {} + virtual void OnClearLinkClicked() {} protected: ContentSettingBubbleModel(TabContents* tab_contents, Profile* profile, @@ -78,9 +88,15 @@ class ContentSettingBubbleModel : public NotificationObserver { void add_radio_group(const RadioGroup& radio_group) { bubble_content_.radio_groups.push_back(radio_group); } + void add_domain_list(const DomainList& domain_list) { + bubble_content_.domain_lists.push_back(domain_list); + } void set_manage_link(const std::string& link) { bubble_content_.manage_link = link; } + void set_clear_link(const std::string& link) { + bubble_content_.clear_link = link; + } private: TabContents* tab_contents_; -- cgit v1.1