Chromium Code Reviews| 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..82517aaecc01ba4c7bb79c4644690e8283709f14 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 is_extension_icon = ui::MaterialDesignController::IsModeMaterial() ? |
|
Peter Kasting
2015/10/23 23:44:09
Nit: Seems clearer?
bool is_extension_icon =
|
| + false : is_extension_icon_; |
|
Peter Kasting
2015/10/23 23:44:09
Nit: Seems clearer?
bool is_extension_icon =
Evan Stade
2015/10/26 19:29:19
done
|
| const int image_width = image()->GetPreferredSize().width(); |
| image_->SetBounds(std::min((width() - image_width) / 2, |
| - GetBubbleOuterPadding(!is_extension_icon_)), |
| + GetBubbleOuterPadding(!is_extension_icon)), |
| 0, image_->GetPreferredSize().width(), height()); |
| const int padding = GetLayoutConstant(ICON_LABEL_VIEW_INTERNAL_PADDING); |