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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
583 // link. | 583 // link. |
584 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, | 584 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, |
585 views::GridLayout::USE_PREF, 0, 0); | 585 views::GridLayout::USE_PREF, 0, 0); |
586 | 586 |
587 layout->AddPaddingRow(1, 5); | 587 layout->AddPaddingRow(1, 5); |
588 | 588 |
589 layout->StartRow(1, site_data_content_column); | 589 layout->StartRow(1, site_data_content_column); |
590 WebsiteSettingsUI::PermissionInfo info; | 590 WebsiteSettingsUI::PermissionInfo info; |
591 info.type = CONTENT_SETTINGS_TYPE_COOKIES; | 591 info.type = CONTENT_SETTINGS_TYPE_COOKIES; |
592 info.setting = CONTENT_SETTING_ALLOW; | 592 info.setting = CONTENT_SETTING_ALLOW; |
593 info.is_incognito = | |
594 Profile::FromBrowserContext(web_contents_->GetBrowserContext()) | |
palmer
2016/01/14 19:26:19
I *think* it is possible for this to return nullpt
johnme
2016/01/14 23:34:48
web_contents_ is guaranteed to be non-null (despit
| |
595 ->IsOffTheRecord(); | |
593 views::ImageView* icon = new views::ImageView(); | 596 views::ImageView* icon = new views::ImageView(); |
594 const gfx::Image& image = WebsiteSettingsUI::GetPermissionIcon(info); | 597 const gfx::Image& image = WebsiteSettingsUI::GetPermissionIcon(info); |
595 icon->SetImage(image.ToImageSkia()); | 598 icon->SetImage(image.ToImageSkia()); |
596 layout->AddView(icon, 1, 1, views::GridLayout::CENTER, | 599 layout->AddView(icon, 1, 1, views::GridLayout::CENTER, |
597 views::GridLayout::CENTER); | 600 views::GridLayout::CENTER); |
598 layout->AddView(cookie_dialog_link_, 1, 1, views::GridLayout::CENTER, | 601 layout->AddView(cookie_dialog_link_, 1, 1, views::GridLayout::CENTER, |
599 views::GridLayout::CENTER); | 602 views::GridLayout::CENTER); |
600 base::string16 comma = base::ASCIIToUTF16(", "); | 603 base::string16 comma = base::ASCIIToUTF16(", "); |
601 | 604 |
602 layout->AddView(new views::Label(comma + third_party_label_text), 1, 1, | 605 layout->AddView(new views::Label(comma + third_party_label_text), 1, 1, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
945 } | 948 } |
946 | 949 |
947 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, | 950 void WebsiteSettingsPopupView::StyledLabelLinkClicked(views::StyledLabel* label, |
948 const gfx::Range& range, | 951 const gfx::Range& range, |
949 int event_flags) { | 952 int event_flags) { |
950 presenter_->RecordWebsiteSettingsAction( | 953 presenter_->RecordWebsiteSettingsAction( |
951 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); | 954 WebsiteSettings::WEBSITE_SETTINGS_SECURITY_DETAILS_OPENED); |
952 DevToolsWindow::OpenDevToolsWindow(web_contents_, | 955 DevToolsWindow::OpenDevToolsWindow(web_contents_, |
953 DevToolsToggleAction::ShowSecurityPanel()); | 956 DevToolsToggleAction::ShowSecurityPanel()); |
954 } | 957 } |
OLD | NEW |