| 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/location_bar/icon_label_bubble_view.h" | 5 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/ui/layout_constants.h" | 8 #include "chrome/browser/ui/layout_constants.h" |
| 9 #include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h" | 9 #include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h" |
| 10 #include "ui/base/material_design/material_design_controller.h" | 10 #include "ui/base/material_design/material_design_controller.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 image()->SetPaintToLayer(true); | 182 image()->SetPaintToLayer(true); |
| 183 image()->layer()->SetFillsBoundsOpaquely(false); | 183 image()->layer()->SetFillsBoundsOpaquely(false); |
| 184 InkDropHostView::AddInkDropLayer(ink_drop_layer); | 184 InkDropHostView::AddInkDropLayer(ink_drop_layer); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void IconLabelBubbleView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { | 187 void IconLabelBubbleView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
| 188 InkDropHostView::RemoveInkDropLayer(ink_drop_layer); | 188 InkDropHostView::RemoveInkDropLayer(ink_drop_layer); |
| 189 image()->SetPaintToLayer(false); | 189 image()->SetPaintToLayer(false); |
| 190 } | 190 } |
| 191 | 191 |
| 192 scoped_ptr<views::InkDropHover> IconLabelBubbleView::CreateInkDropHover() | 192 std::unique_ptr<views::InkDropHover> IconLabelBubbleView::CreateInkDropHover() |
| 193 const { | 193 const { |
| 194 // Location bar views don't show hover effect. | 194 // Location bar views don't show hover effect. |
| 195 return nullptr; | 195 return nullptr; |
| 196 } | 196 } |
| 197 | 197 |
| 198 SkColor IconLabelBubbleView::GetInkDropBaseColor() const { | 198 SkColor IconLabelBubbleView::GetInkDropBaseColor() const { |
| 199 return color_utils::DeriveDefaultIconColor(GetTextColor()); | 199 return color_utils::DeriveDefaultIconColor(GetTextColor()); |
| 200 } | 200 } |
| 201 | 201 |
| 202 SkColor IconLabelBubbleView::GetParentBackgroundColor() const { | 202 SkColor IconLabelBubbleView::GetParentBackgroundColor() const { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 void IconLabelBubbleView::OnPaint(gfx::Canvas* canvas) { | 271 void IconLabelBubbleView::OnPaint(gfx::Canvas* canvas) { |
| 272 if (!ShouldShowBackground()) | 272 if (!ShouldShowBackground()) |
| 273 return; | 273 return; |
| 274 if (background_painter_) { | 274 if (background_painter_) { |
| 275 views::Painter::PaintPainterAt(canvas, background_painter_.get(), | 275 views::Painter::PaintPainterAt(canvas, background_painter_.get(), |
| 276 GetContentsBounds()); | 276 GetContentsBounds()); |
| 277 } | 277 } |
| 278 if (background()) | 278 if (background()) |
| 279 background()->Paint(canvas, this); | 279 background()->Paint(canvas, this); |
| 280 } | 280 } |
| OLD | NEW |