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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 views::GridLayout::USE_PREF, | 634 views::GridLayout::USE_PREF, |
635 0, | 635 0, |
636 0); | 636 0); |
637 for (PermissionInfoList::const_iterator permission = | 637 for (PermissionInfoList::const_iterator permission = |
638 permission_info_list.begin(); | 638 permission_info_list.begin(); |
639 permission != permission_info_list.end(); | 639 permission != permission_info_list.end(); |
640 ++permission) { | 640 ++permission) { |
641 layout->StartRow(1, content_column); | 641 layout->StartRow(1, content_column); |
642 PermissionSelectorView* selector = new PermissionSelectorView( | 642 PermissionSelectorView* selector = new PermissionSelectorView( |
643 web_contents_ ? web_contents_->GetURL() : GURL::EmptyGURL(), | 643 web_contents_ ? web_contents_->GetURL() : GURL::EmptyGURL(), |
644 *permission); | 644 *permission, web_contents_->GetBrowserContext()->IsOffTheRecord()); |
645 selector->AddObserver(this); | 645 selector->AddObserver(this); |
646 layout->AddView(selector, | 646 layout->AddView(selector, |
647 1, | 647 1, |
648 1, | 648 1, |
649 views::GridLayout::LEADING, | 649 views::GridLayout::LEADING, |
650 views::GridLayout::CENTER); | 650 views::GridLayout::CENTER); |
651 layout->AddPaddingRow(1, kPermissionsSectionRowSpacing); | 651 layout->AddPaddingRow(1, kPermissionsSectionRowSpacing); |
652 } | 652 } |
653 | 653 |
654 layout->Layout(permissions_content_); | 654 layout->Layout(permissions_content_); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 } | 928 } |
929 | 929 |
930 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, | 930 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, |
931 const gfx::Range& range, | 931 const gfx::Range& range, |
932 int event_flags) { | 932 int event_flags) { |
933 presenter_->RecordWebsiteSettingsAction( | 933 presenter_->RecordWebsiteSettingsAction( |
934 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); | 934 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); |
935 DevToolsWindow::OpenDevToolsWindow(web_contents_, | 935 DevToolsWindow::OpenDevToolsWindow(web_contents_, |
936 DevToolsToggleAction::ShowSecurityPanel()); | 936 DevToolsToggleAction::ShowSecurityPanel()); |
937 } | 937 } |
OLD | NEW |