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/views/website_settings/website_settings_popup_view.h
" | 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 views::GridLayout::USE_PREF, | 617 views::GridLayout::USE_PREF, |
618 0, | 618 0, |
619 0); | 619 0); |
620 for (PermissionInfoList::const_iterator permission = | 620 for (PermissionInfoList::const_iterator permission = |
621 permission_info_list.begin(); | 621 permission_info_list.begin(); |
622 permission != permission_info_list.end(); | 622 permission != permission_info_list.end(); |
623 ++permission) { | 623 ++permission) { |
624 layout->StartRow(1, content_column); | 624 layout->StartRow(1, content_column); |
625 PermissionSelectorView* selector = new PermissionSelectorView( | 625 PermissionSelectorView* selector = new PermissionSelectorView( |
626 web_contents_ ? web_contents_->GetURL() : GURL::EmptyGURL(), | 626 web_contents_ ? web_contents_->GetURL() : GURL::EmptyGURL(), |
627 *permission); | 627 *permission, web_contents_->GetBrowserContext()->IsOffTheRecord()); |
628 selector->AddObserver(this); | 628 selector->AddObserver(this); |
629 layout->AddView(selector, | 629 layout->AddView(selector, |
630 1, | 630 1, |
631 1, | 631 1, |
632 views::GridLayout::LEADING, | 632 views::GridLayout::LEADING, |
633 views::GridLayout::CENTER); | 633 views::GridLayout::CENTER); |
634 layout->AddPaddingRow(1, kPermissionsSectionRowSpacing); | 634 layout->AddPaddingRow(1, kPermissionsSectionRowSpacing); |
635 } | 635 } |
636 | 636 |
637 layout->Layout(permissions_content_); | 637 layout->Layout(permissions_content_); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 } | 911 } |
912 | 912 |
913 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, | 913 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, |
914 const gfx::Range& range, | 914 const gfx::Range& range, |
915 int event_flags) { | 915 int event_flags) { |
916 presenter_->RecordWebsiteSettingsAction( | 916 presenter_->RecordWebsiteSettingsAction( |
917 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); | 917 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); |
918 DevToolsWindow::OpenDevToolsWindow(web_contents_, | 918 DevToolsWindow::OpenDevToolsWindow(web_contents_, |
919 DevToolsToggleAction::ShowSecurityPanel()); | 919 DevToolsToggleAction::ShowSecurityPanel()); |
920 } | 920 } |
OLD | NEW |