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/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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // Clear the map since the UI is reconstructed. | 593 // Clear the map since the UI is reconstructed. |
594 selectors_.clear(); | 594 selectors_.clear(); |
595 | 595 |
596 for (PermissionInfoList::const_iterator permission = | 596 for (PermissionInfoList::const_iterator permission = |
597 permission_info_list.begin(); | 597 permission_info_list.begin(); |
598 permission != permission_info_list.end(); | 598 permission != permission_info_list.end(); |
599 ++permission) { | 599 ++permission) { |
600 PermissionSelector* selector = | 600 PermissionSelector* selector = |
601 new PermissionSelector( | 601 new PermissionSelector( |
602 theme_service_, | 602 theme_service_, |
| 603 web_contents_ ? web_contents_->GetURL() : GURL::EmptyGURL(), |
603 permission->type, | 604 permission->type, |
604 permission->setting, | 605 permission->setting, |
605 permission->default_setting, | 606 permission->default_setting, |
606 permission->source); | 607 permission->source); |
607 selector->AddObserver(this); | 608 selector->AddObserver(this); |
608 GtkWidget* hbox = selector->widget(); | 609 GtkWidget* hbox = selector->widget(); |
609 selectors_.push_back(selector); | 610 selectors_.push_back(selector); |
610 gtk_box_pack_start(GTK_BOX(permissions_section_contents_), hbox, FALSE, | 611 gtk_box_pack_start(GTK_BOX(permissions_section_contents_), hbox, FALSE, |
611 FALSE, 0); | 612 FALSE, 0); |
612 } | 613 } |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 } | 739 } |
739 | 740 |
740 void WebsiteSettingsPopupGtk::OnHelpLinkClicked(GtkWidget* widget) { | 741 void WebsiteSettingsPopupGtk::OnHelpLinkClicked(GtkWidget* widget) { |
741 browser_->OpenURL(OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), | 742 browser_->OpenURL(OpenURLParams(GURL(chrome::kPageInfoHelpCenterURL), |
742 content::Referrer(), | 743 content::Referrer(), |
743 NEW_FOREGROUND_TAB, | 744 NEW_FOREGROUND_TAB, |
744 content::PAGE_TRANSITION_LINK, | 745 content::PAGE_TRANSITION_LINK, |
745 false)); | 746 false)); |
746 bubble_->Close(); | 747 bubble_->Close(); |
747 } | 748 } |
OLD | NEW |