Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Unified Diff: chrome/browser/tab_contents/tab_contents.h

Issue 1320005: Adds GeolocationContentSettings on TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/tab_contents.h
===================================================================
--- chrome/browser/tab_contents/tab_contents.h (revision 42590)
+++ chrome/browser/tab_contents/tab_contents.h (working copy)
@@ -34,6 +34,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"
@@ -247,6 +248,13 @@
// page.
bool IsContentBlocked(ContentSettingsType content_type) const;
+ // Returns the map of settings per origin that has used the geolocation API on
+ // this page.
+ typedef std::map<GURL, 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;
@@ -701,6 +709,9 @@
// 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.
@@ -842,6 +853,8 @@
bool showing_repost_interstitial);
virtual void DocumentLoadedInFrame();
virtual void OnContentBlocked(ContentSettingsType type);
+ virtual void OnGeolocationPermissionSet(const GURL& requesting_origin,
+ bool allowed);
// RenderViewHostDelegate implementation.
virtual RenderViewHostDelegate::View* GetViewDelegate();
@@ -1203,6 +1216,9 @@
// 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);
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_delegate.h ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698