| Index: chrome/browser/tab_contents/tab_contents.cc
|
| ===================================================================
|
| --- chrome/browser/tab_contents/tab_contents.cc (revision 42590)
|
| +++ chrome/browser/tab_contents/tab_contents.cc (working copy)
|
| @@ -1311,6 +1311,11 @@
|
| content_blocked_[i] = false;
|
| }
|
|
|
| +// Resets the |geolocation_settings_| map.
|
| +void TabContents::ClearGeolocationContentSettings() {
|
| + geolocation_content_settings_.clear();
|
| +}
|
| +
|
| // Notifies the RenderWidgetHost instance about the fact that the page is
|
| // loading, or done loading and calls the base implementation.
|
| void TabContents::SetIsLoading(bool is_loading,
|
| @@ -1498,6 +1503,7 @@
|
|
|
| // Clear "blocked" flags.
|
| ClearBlockedContentSettings();
|
| + ClearGeolocationContentSettings();
|
| if (delegate_)
|
| delegate_->OnBlockedContentChange(this);
|
| }
|
| @@ -2029,6 +2035,15 @@
|
| delegate_->OnBlockedContentChange(this);
|
| }
|
|
|
| +void TabContents::OnGeolocationPermissionSet(const GURL& requesting_origin,
|
| + bool allowed) {
|
| + geolocation_content_settings_[requesting_origin] =
|
| + allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
|
| + // TODO(bulach): rename OnBlockedContentChange to OnContentSettingsChange.
|
| + if (delegate_)
|
| + delegate_->OnBlockedContentChange(this);
|
| +}
|
| +
|
| RenderViewHostDelegate::View* TabContents::GetViewDelegate() {
|
| return view_.get();
|
| }
|
|
|