Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: chrome/browser/ui/views/website_settings/website_settings_popup_view.cc

Issue 2750483003: Harmony - Remove icon from internal page info dialog view in Material Design mode. (Closed)
Patch Set: Added comment referencing another CL which will affect this code Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698