OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/gtk/website_settings_popup_gtk.h" | 5 #include "chrome/browser/ui/gtk/website_settings_popup_gtk.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/certificate_viewer.h" | 10 #include "chrome/browser/certificate_viewer.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 tab_contents->infobar_tab_helper(), | 170 tab_contents->infobar_tab_helper(), |
171 url, ssl, | 171 url, ssl, |
172 content::CertStore::GetInstance())); | 172 content::CertStore::GetInstance())); |
173 } | 173 } |
174 | 174 |
175 WebsiteSettingsPopupGtk::~WebsiteSettingsPopupGtk() { | 175 WebsiteSettingsPopupGtk::~WebsiteSettingsPopupGtk() { |
176 } | 176 } |
177 | 177 |
178 void WebsiteSettingsPopupGtk::BubbleClosing(BubbleGtk* bubble, | 178 void WebsiteSettingsPopupGtk::BubbleClosing(BubbleGtk* bubble, |
179 bool closed_by_escape) { | 179 bool closed_by_escape) { |
180 if (presenter_.get()) | 180 if (presenter_.get()) { |
| 181 presenter_->OnUIClosing(); |
181 presenter_.reset(); | 182 presenter_.reset(); |
| 183 } |
182 delete this; | 184 delete this; |
183 } | 185 } |
184 | 186 |
185 void WebsiteSettingsPopupGtk::InitContents() { | 187 void WebsiteSettingsPopupGtk::InitContents() { |
186 if (!contents_) { | 188 if (!contents_) { |
187 contents_ = gtk_vbox_new(FALSE, ui::kContentAreaSpacing); | 189 contents_ = gtk_vbox_new(FALSE, ui::kContentAreaSpacing); |
188 gtk_container_set_border_width(GTK_CONTAINER(contents_), | 190 gtk_container_set_border_width(GTK_CONTAINER(contents_), |
189 ui::kContentAreaBorder); | 191 ui::kContentAreaBorder); |
190 } else { | 192 } else { |
191 gtk_util::RemoveAllChildren(contents_); | 193 gtk_util::RemoveAllChildren(contents_); |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 presenter_->OnSitePermissionChanged(ContentSettingsType(type), | 595 presenter_->OnSitePermissionChanged(ContentSettingsType(type), |
594 ContentSetting(value)); | 596 ContentSetting(value)); |
595 } | 597 } |
596 | 598 |
597 void WebsiteSettingsPopupGtk::OnViewCertLinkClicked(GtkWidget* widget) { | 599 void WebsiteSettingsPopupGtk::OnViewCertLinkClicked(GtkWidget* widget) { |
598 DCHECK_NE(cert_id_, 0); | 600 DCHECK_NE(cert_id_, 0); |
599 ShowCertificateViewerByID( | 601 ShowCertificateViewerByID( |
600 tab_contents_->web_contents(), GTK_WINDOW(parent_), cert_id_); | 602 tab_contents_->web_contents(), GTK_WINDOW(parent_), cert_id_); |
601 bubble_->Close(); | 603 bubble_->Close(); |
602 } | 604 } |
OLD | NEW |