diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 20:45:26 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-19 20:45:26 +0000 |
commit | 78e049b83ebf4e92c844ba3ed3d2b76080b0d68e (patch) | |
tree | d41e90831f6b775b280123a7f34aa624a82d61aa /chrome/browser/ui/gtk/collected_cookies_gtk.cc | |
parent | 08dd831c4155e2bb6ccc8cd65d15945823c11aca (diff) | |
download | chromium_src-78e049b83ebf4e92c844ba3ed3d2b76080b0d68e.zip chromium_src-78e049b83ebf4e92c844ba3ed3d2b76080b0d68e.tar.gz chromium_src-78e049b83ebf4e92c844ba3ed3d2b76080b0d68e.tar.bz2 |
gtk: Inform user to reload page after chagning cookie settings from in-page dialog.
BUG=63645
TEST=Block all cookies and load a page that uses cookies. Click on the broken
cookie icon in the omnibox and open the in-page cookie dialog. Change a
blocked to allow, or block an allowed cookie. After clicking the Close button
an infobar appears with a warning. Make sure the reload button works.
R=rogerta@chromium.org,jochen@chromium.org
Review URL: http://codereview.chromium.org/6711059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/collected_cookies_gtk.cc')
-rw-r--r-- | chrome/browser/ui/gtk/collected_cookies_gtk.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/ui/gtk/collected_cookies_gtk.cc b/chrome/browser/ui/gtk/collected_cookies_gtk.cc index 1b16e58..b17e167 100644 --- a/chrome/browser/ui/gtk/collected_cookies_gtk.cc +++ b/chrome/browser/ui/gtk/collected_cookies_gtk.cc @@ -8,6 +8,7 @@ #include "chrome/browser/cookies_tree_model.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/collected_cookies_infobar_delegate.h" #include "chrome/browser/ui/gtk/gtk_chrome_cookie_view.h" #include "chrome/browser/ui/gtk/gtk_util.h" #include "content/browser/tab_contents/tab_contents.h" @@ -74,7 +75,8 @@ const std::string GetInfobarLabel(ContentSetting setting, CollectedCookiesGtk::CollectedCookiesGtk(GtkWindow* parent, TabContents* tab_contents) - : tab_contents_(tab_contents) { + : tab_contents_(tab_contents), + status_changed_(false) { TabSpecificContentSettings* content_settings = tab_contents->GetTabSpecificContentSettings(); registrar_.Add(this, NotificationType::COLLECTED_COOKIES_SHOWN, @@ -422,6 +424,10 @@ void CollectedCookiesGtk::Observe(NotificationType type, } void CollectedCookiesGtk::OnClose(GtkWidget* close_button) { + if (status_changed_) { + tab_contents_->AddInfoBar( + new CollectedCookiesInfoBarDelegate(tab_contents_)); + } window_->CloseConstrainedWindow(); } @@ -462,6 +468,7 @@ void CollectedCookiesGtk::AddExceptions(GtkTreeSelection* selection, setting, multiple_domains_added, last_domain_name).c_str()); gtk_widget_show(infobar_); } + status_changed_ = true; } void CollectedCookiesGtk::OnBlockAllowedButtonClicked(GtkWidget* button) { |