Index: chrome/browser/tab_contents/tab_contents.h |
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h |
index 0f00ae3011fbb59ac7f488d0983879fd9a7f2b85..74a9d81ba7761e6abd6540b8f386d59cc7a08a4c 100644 |
--- a/chrome/browser/tab_contents/tab_contents.h |
+++ b/chrome/browser/tab_contents/tab_contents.h |
@@ -35,6 +35,7 @@ |
#include "chrome/browser/tab_contents/navigation_entry.h" |
#include "chrome/browser/tab_contents/page_navigator.h" |
#include "chrome/browser/tab_contents/render_view_host_manager.h" |
+#include "chrome/common/content_settings.h" |
#include "chrome/common/content_settings_types.h" |
#include "chrome/common/extensions/url_pattern.h" |
#include "chrome/common/navigation_types.h" |
@@ -240,6 +241,12 @@ class TabContents : public PageNavigator, |
// page. |
bool IsContentBlocked(ContentSettingsType content_type) const; |
+ // Returns the current settings for geolocation services in this page. |
+ typedef std::map<std::string, ContentSetting> GeolocationContentSettings; |
+ const GeolocationContentSettings& geolocation_content_settings() const { |
+ return geolocation_content_settings_; |
+ } |
+ |
// Returns a human-readable description the tab's loading state. |
virtual std::wstring GetStatusText() const; |
@@ -693,6 +700,9 @@ class TabContents : public PageNavigator, |
// Resets the |content_blocked_| array. |
void ClearBlockedContentSettings(); |
+ // Resets the |geolocation_settings_| map. |
+ void ClearGeolocationContentSettings(); |
+ |
// Changes the IsLoading state and notifies delegate as needed |
// |details| is used to provide details on the load that just finished |
// (but can be null if not applicable). Can be overridden. |
@@ -836,6 +846,8 @@ class TabContents : public PageNavigator, |
bool showing_repost_interstitial); |
virtual void DocumentLoadedInFrame(); |
virtual void OnContentBlocked(ContentSettingsType type); |
+ virtual void OnGeolocationPermissionSet(const std::string& host, |
+ bool allowed); |
// RenderViewHostDelegate implementation. |
virtual RenderViewHostDelegate::View* GetViewDelegate(); |
@@ -1196,6 +1208,9 @@ class TabContents : public PageNavigator, |
// Information about the language the page is in and has been translated to. |
LanguageState language_state_; |
+ // Maps each frame on this page to its geolocation content settings. |
+ GeolocationContentSettings geolocation_content_settings_; |
+ |
// --------------------------------------------------------------------------- |
DISALLOW_COPY_AND_ASSIGN(TabContents); |