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/website_settings_popup_gtk.h" | 5 #include "chrome/browser/ui/gtk/website_settings/website_settings_popup_gtk.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 void WebsiteSettingsPopupGtk::BubbleClosing(BubbleGtk* bubble, | 264 void WebsiteSettingsPopupGtk::BubbleClosing(BubbleGtk* bubble, |
265 bool closed_by_escape) { | 265 bool closed_by_escape) { |
266 if (presenter_.get()) { | 266 if (presenter_.get()) { |
267 presenter_->OnUIClosing(); | 267 presenter_->OnUIClosing(); |
268 presenter_.reset(); | 268 presenter_.reset(); |
269 } | 269 } |
270 | 270 |
271 // Slightly delay destruction to allow the event stack to unwind and release | 271 // Slightly delay destruction to allow the event stack to unwind and release |
272 // references to owned widgets. | 272 // references to owned widgets. |
273 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 273 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
274 } | 274 } |
275 | 275 |
276 void WebsiteSettingsPopupGtk::InitContents() { | 276 void WebsiteSettingsPopupGtk::InitContents() { |
277 if (!contents_) | 277 if (!contents_) |
278 contents_ = gtk_vbox_new(FALSE, 0); | 278 contents_ = gtk_vbox_new(FALSE, 0); |
279 else | 279 else |
280 gtk_util::RemoveAllChildren(contents_); | 280 gtk_util::RemoveAllChildren(contents_); |
281 | 281 |
282 // Create popup header. | 282 // Create popup header. |
283 header_box_ = gtk_vbox_new(FALSE, ui::kControlSpacing); | 283 header_box_ = gtk_vbox_new(FALSE, ui::kControlSpacing); |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 } | 734 } |
735 | 735 |
736 void WebsiteSettingsPopupGtk::OnHelpLinkClicked(GtkWidget* widget) { | 736 void WebsiteSettingsPopupGtk::OnHelpLinkClicked(GtkWidget* widget) { |
737 browser_->OpenURL(OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), | 737 browser_->OpenURL(OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), |
738 content::Referrer(), | 738 content::Referrer(), |
739 NEW_FOREGROUND_TAB, | 739 NEW_FOREGROUND_TAB, |
740 content::PAGE_TRANSITION_LINK, | 740 content::PAGE_TRANSITION_LINK, |
741 false)); | 741 false)); |
742 bubble_->Close(); | 742 bubble_->Close(); |
743 } | 743 } |
OLD | NEW |