| Index: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
|
| index 3e8a3e64d86fe9ae6158eed09e6a6f4bcb6b0fc6..80c3c6a3f54f17cd109a331208671b79f64ef7a6 100644
|
| --- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/ui/views/layout_constants.h"
|
| +#include "ui/base/resource/material_design/material_design_controller.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/color_utils.h"
|
| @@ -100,9 +101,14 @@ gfx::Size IconLabelBubbleView::GetPreferredSize() const {
|
| }
|
|
|
| void IconLabelBubbleView::Layout() {
|
| + // In MD mode, both extension icons and Chrome-provided icons are 16px,
|
| + // so it's not necessary to handle them differently. TODO(estade): clean
|
| + // this up when MD is on by default.
|
| + bool icon_needs_extra_padding =
|
| + !is_extension_icon_ && !ui::MaterialDesignController::IsModeMaterial();
|
| const int image_width = image()->GetPreferredSize().width();
|
| image_->SetBounds(std::min((width() - image_width) / 2,
|
| - GetBubbleOuterPadding(!is_extension_icon_)),
|
| + GetBubbleOuterPadding(icon_needs_extra_padding)),
|
| 0, image_->GetPreferredSize().width(), height());
|
|
|
| const int padding = GetLayoutConstant(ICON_LABEL_VIEW_INTERNAL_PADDING);
|
|
|