Chromium Code Reviews| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 302 NOTREACHED(); | 302 NOTREACHED(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 // Compensate for built-in vertical padding in the anchor view's image. | 305 // Compensate for built-in vertical padding in the anchor view's image. |
| 306 set_anchor_view_insets(gfx::Insets( | 306 set_anchor_view_insets(gfx::Insets( |
| 307 GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0)); | 307 GetLayoutConstant(LOCATION_BAR_BUBBLE_ANCHOR_VERTICAL_INSET), 0)); |
| 308 | 308 |
| 309 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, kSpacing, | 309 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, kSpacing, |
| 310 kSpacing, kSpacing)); | 310 kSpacing, kSpacing)); |
| 311 set_margins(gfx::Insets()); | 311 set_margins(gfx::Insets()); |
| 312 views::ImageView* icon_view = new NonAccessibleImageView(); | 312 // This will change to 'if (LayoutDelegate::Get()->ShouldShowWindowIcon())' |
| 313 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 313 // once CL https://codereview.chromium.org/2746223002 has landed. |
|
benwells
2017/03/14 23:19:57
Nit: it's a bit weird to reference CLs in code, e.
| |
| 314 icon_view->SetImage(rb.GetImageSkiaNamed(icon)); | 314 if (!ui::MaterialDesignController::IsSecondaryUiMaterial()) { |
| 315 AddChildView(icon_view); | 315 views::ImageView* icon_view = new NonAccessibleImageView(); |
| 316 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | |
| 317 icon_view->SetImage(rb.GetImageSkiaNamed(icon)); | |
| 318 AddChildView(icon_view); | |
| 319 } | |
| 316 | 320 |
| 317 views::Label* label = new views::Label(l10n_util::GetStringUTF16(text)); | 321 views::Label* label = new views::Label(l10n_util::GetStringUTF16(text)); |
| 318 label->SetMultiLine(true); | 322 label->SetMultiLine(true); |
| 319 label->SetAllowCharacterBreak(true); | 323 label->SetAllowCharacterBreak(true); |
| 320 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 324 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 321 AddChildView(label); | 325 AddChildView(label); |
| 322 | 326 |
| 323 views::BubbleDialogDelegateView::CreateBubble(this); | 327 views::BubbleDialogDelegateView::CreateBubble(this); |
| 324 } | 328 } |
| 325 | 329 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 760 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); | 764 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); |
| 761 break; | 765 break; |
| 762 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: | 766 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: |
| 763 presenter_->OnRevokeSSLErrorBypassButtonPressed(); | 767 presenter_->OnRevokeSSLErrorBypassButtonPressed(); |
| 764 GetWidget()->Close(); | 768 GetWidget()->Close(); |
| 765 break; | 769 break; |
| 766 default: | 770 default: |
| 767 NOTREACHED(); | 771 NOTREACHED(); |
| 768 } | 772 } |
| 769 } | 773 } |
| OLD | NEW |