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> |
11 | 11 |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ptr_util.h" |
14 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/certificate_viewer.h" | 18 #include "chrome/browser/certificate_viewer.h" |
18 #include "chrome/browser/devtools/devtools_toggle_action.h" | 19 #include "chrome/browser/devtools/devtools_toggle_action.h" |
19 #include "chrome/browser/devtools/devtools_window.h" | 20 #include "chrome/browser/devtools/devtools_window.h" |
20 #include "chrome/browser/infobars/infobar_service.h" | 21 #include "chrome/browser/infobars/infobar_service.h" |
21 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
23 #include "chrome/browser/ui/browser_dialogs.h" | 24 #include "chrome/browser/ui/browser_dialogs.h" |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 1, | 660 1, |
660 1, | 661 1, |
661 views::GridLayout::LEADING, | 662 views::GridLayout::LEADING, |
662 views::GridLayout::CENTER); | 663 views::GridLayout::CENTER); |
663 layout->AddPaddingRow(1, kContentRowSpacing); | 664 layout->AddPaddingRow(1, kContentRowSpacing); |
664 } | 665 } |
665 | 666 |
666 for (auto object : chosen_object_info_list) { | 667 for (auto object : chosen_object_info_list) { |
667 layout->StartRow(1, content_column); | 668 layout->StartRow(1, content_column); |
668 // The view takes ownership of the object info. | 669 // The view takes ownership of the object info. |
669 auto object_view = new ChosenObjectView(make_scoped_ptr(object)); | 670 auto object_view = new ChosenObjectView(base::WrapUnique(object)); |
670 object_view->AddObserver(this); | 671 object_view->AddObserver(this); |
671 layout->AddView(object_view, 1, 1, views::GridLayout::LEADING, | 672 layout->AddView(object_view, 1, 1, views::GridLayout::LEADING, |
672 views::GridLayout::CENTER); | 673 views::GridLayout::CENTER); |
673 layout->AddPaddingRow(1, kContentRowSpacing); | 674 layout->AddPaddingRow(1, kContentRowSpacing); |
674 } | 675 } |
675 | 676 |
676 layout->Layout(permissions_content_); | 677 layout->Layout(permissions_content_); |
677 | 678 |
678 // Add site settings link. | 679 // Add site settings link. |
679 site_settings_link_ = new views::Link( | 680 site_settings_link_ = new views::Link( |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 gfx::NativeWindow parent = | 808 gfx::NativeWindow parent = |
808 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; | 809 anchor_widget() ? anchor_widget()->GetNativeWindow() : nullptr; |
809 presenter_->RecordWebsiteSettingsAction( | 810 presenter_->RecordWebsiteSettingsAction( |
810 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); | 811 WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED); |
811 ShowCertificateViewerByID(web_contents_, parent, cert_id_); | 812 ShowCertificateViewerByID(web_contents_, parent, cert_id_); |
812 } else { | 813 } else { |
813 DevToolsWindow::OpenDevToolsWindow( | 814 DevToolsWindow::OpenDevToolsWindow( |
814 web_contents_, DevToolsToggleAction::ShowSecurityPanel()); | 815 web_contents_, DevToolsToggleAction::ShowSecurityPanel()); |
815 } | 816 } |
816 } | 817 } |
OLD | NEW |