| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 444 |
| 445 WebsiteSettingsPopupView::WebsiteSettingsPopupView( | 445 WebsiteSettingsPopupView::WebsiteSettingsPopupView( |
| 446 views::View* anchor_view, | 446 views::View* anchor_view, |
| 447 gfx::NativeView parent_window, | 447 gfx::NativeView parent_window, |
| 448 Profile* profile, | 448 Profile* profile, |
| 449 content::WebContents* web_contents, | 449 content::WebContents* web_contents, |
| 450 const GURL& url, | 450 const GURL& url, |
| 451 const security_state::SecurityStateModel::SecurityInfo& security_info) | 451 const security_state::SecurityStateModel::SecurityInfo& security_info) |
| 452 : content::WebContentsObserver(web_contents), | 452 : content::WebContentsObserver(web_contents), |
| 453 BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), | 453 BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT), |
| 454 profile_(profile), |
| 454 header_(nullptr), | 455 header_(nullptr), |
| 455 separator_(nullptr), | 456 separator_(nullptr), |
| 456 site_settings_view_(nullptr), | 457 site_settings_view_(nullptr), |
| 457 site_data_content_(nullptr), | 458 site_data_content_(nullptr), |
| 458 cookie_dialog_link_(nullptr), | 459 cookie_dialog_link_(nullptr), |
| 459 permissions_content_(nullptr), | 460 permissions_content_(nullptr), |
| 460 site_settings_link_(nullptr), | 461 site_settings_link_(nullptr), |
| 461 weak_factory_(this) { | 462 weak_factory_(this) { |
| 462 set_parent_window(parent_window); | 463 set_parent_window(parent_window); |
| 463 | 464 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 views::ColumnSet* column_set = layout->AddColumnSet(content_column); | 681 views::ColumnSet* column_set = layout->AddColumnSet(content_column); |
| 681 column_set->AddColumn(views::GridLayout::FILL, | 682 column_set->AddColumn(views::GridLayout::FILL, |
| 682 views::GridLayout::FILL, | 683 views::GridLayout::FILL, |
| 683 1, | 684 1, |
| 684 views::GridLayout::USE_PREF, | 685 views::GridLayout::USE_PREF, |
| 685 0, | 686 0, |
| 686 0); | 687 0); |
| 687 for (const auto& permission : permission_info_list) { | 688 for (const auto& permission : permission_info_list) { |
| 688 layout->StartRow(1, content_column); | 689 layout->StartRow(1, content_column); |
| 689 PermissionSelectorRow* selector = new PermissionSelectorRow( | 690 PermissionSelectorRow* selector = new PermissionSelectorRow( |
| 691 profile_, |
| 690 web_contents() ? web_contents()->GetVisibleURL() : GURL::EmptyGURL(), | 692 web_contents() ? web_contents()->GetVisibleURL() : GURL::EmptyGURL(), |
| 691 permission); | 693 permission); |
| 692 selector->AddObserver(this); | 694 selector->AddObserver(this); |
| 693 layout->AddView(selector, | 695 layout->AddView(selector, |
| 694 1, | 696 1, |
| 695 1, | 697 1, |
| 696 views::GridLayout::LEADING, | 698 views::GridLayout::LEADING, |
| 697 views::GridLayout::CENTER); | 699 views::GridLayout::CENTER); |
| 698 layout->AddPaddingRow(1, kContentRowSpacing); | 700 layout->AddPaddingRow(1, kContentRowSpacing); |
| 699 } | 701 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 gfx::NativeWindow parent = | 848 gfx::NativeWindow parent = |
| 847 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; | 849 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; |
| 848 presenter_->RecordWebsiteSettingsAction( | 850 presenter_->RecordWebsiteSettingsAction( |
| 849 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); | 851 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); |
| 850 ShowCertificateViewer(web_contents(), parent, certificate_.get()); | 852 ShowCertificateViewer(web_contents(), parent, certificate_.get()); |
| 851 } else { | 853 } else { |
| 852 DevToolsWindow::OpenDevToolsWindow( | 854 DevToolsWindow::OpenDevToolsWindow( |
| 853 web_contents(), DevToolsToggleAction::ShowSecurityPanel()); | 855 web_contents(), DevToolsToggleAction::ShowSecurityPanel()); |
| 854 } | 856 } |
| 855 } | 857 } |
| OLD | NEW |