| 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/page_info/website_settings_popup_view.h" | 5 #include "chrome/browser/ui/views/page_info/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 if (LayoutDelegate::Get()->ShouldShowWindowIcon()) { |
| 313 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 313 views::ImageView* icon_view = new NonAccessibleImageView(); |
| 314 icon_view->SetImage(rb.GetImageSkiaNamed(icon)); | 314 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 315 AddChildView(icon_view); | 315 icon_view->SetImage(rb.GetImageSkiaNamed(icon)); |
| 316 AddChildView(icon_view); |
| 317 } |
| 316 | 318 |
| 317 views::Label* label = new views::Label(l10n_util::GetStringUTF16(text)); | 319 views::Label* label = new views::Label(l10n_util::GetStringUTF16(text)); |
| 318 label->SetMultiLine(true); | 320 label->SetMultiLine(true); |
| 319 label->SetAllowCharacterBreak(true); | 321 label->SetAllowCharacterBreak(true); |
| 320 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 322 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 321 AddChildView(label); | 323 AddChildView(label); |
| 322 | 324 |
| 323 views::BubbleDialogDelegateView::CreateBubble(this); | 325 views::BubbleDialogDelegateView::CreateBubble(this); |
| 324 } | 326 } |
| 325 | 327 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); | 762 WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED); |
| 761 break; | 763 break; |
| 762 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: | 764 case STYLED_LABEL_RESET_CERTIFICATE_DECISIONS: |
| 763 presenter_->OnRevokeSSLErrorBypassButtonPressed(); | 765 presenter_->OnRevokeSSLErrorBypassButtonPressed(); |
| 764 GetWidget()->Close(); | 766 GetWidget()->Close(); |
| 765 break; | 767 break; |
| 766 default: | 768 default: |
| 767 NOTREACHED(); | 769 NOTREACHED(); |
| 768 } | 770 } |
| 769 } | 771 } |
| OLD | NEW |