summaryrefslogtreecommitdiffstats
path: root/chrome/browser/content_setting_bubble_model.h
diff options
context:
space:
mode:
authorjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 09:32:20 +0000
committerjoth@chromium.org <joth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 09:32:20 +0000
commit1fa0c358faf8fef373aca6d30b97c2879539fe9a (patch)
tree56766650fa721e477d712d458827cc1ca391c804 /chrome/browser/content_setting_bubble_model.h
parentd2e15f3732d66d495c64f759f258996140ad0a5a (diff)
downloadchromium_src-1fa0c358faf8fef373aca6d30b97c2879539fe9a.zip
chromium_src-1fa0c358faf8fef373aca6d30b97c2879539fe9a.tar.gz
chromium_src-1fa0c358faf8fef373aca6d30b97c2879539fe9a.tar.bz2
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
Diffstat (limited to 'chrome/browser/content_setting_bubble_model.h')
-rw-r--r--chrome/browser/content_setting_bubble_model.h16
1 files changed, 16 insertions, 0 deletions
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 <set>
#include <string>
#include <vector>
@@ -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<RadioGroup> RadioGroups;
+ struct DomainList {
+ std::string title;
+ std::set<std::string> hosts;
+ };
+
struct BubbleContent {
std::string title;
PopupItems popup_items;
RadioGroups radio_groups;
+ std::vector<DomainList> 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_;