| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/bubble_icon_view.h" | 5 #include "chrome/browser/ui/views/location_bar/bubble_icon_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/command_updater.h" | 7 #include "chrome/browser/command_updater.h" |
| 8 #include "ui/accessibility/ax_view_state.h" | 8 #include "ui/accessibility/ax_view_state.h" |
| 9 #include "ui/base/material_design/material_design_controller.h" | 9 #include "ui/base/material_design/material_design_controller.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 image_->SetPaintToLayer(true); | 122 image_->SetPaintToLayer(true); |
| 123 image_->layer()->SetFillsBoundsOpaquely(false); | 123 image_->layer()->SetFillsBoundsOpaquely(false); |
| 124 views::InkDropHostView::AddInkDropLayer(ink_drop_layer); | 124 views::InkDropHostView::AddInkDropLayer(ink_drop_layer); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void BubbleIconView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { | 127 void BubbleIconView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { |
| 128 views::InkDropHostView::RemoveInkDropLayer(ink_drop_layer); | 128 views::InkDropHostView::RemoveInkDropLayer(ink_drop_layer); |
| 129 image_->SetPaintToLayer(false); | 129 image_->SetPaintToLayer(false); |
| 130 } | 130 } |
| 131 | 131 |
| 132 scoped_ptr<views::InkDropHover> BubbleIconView::CreateInkDropHover() const { | 132 std::unique_ptr<views::InkDropHover> BubbleIconView::CreateInkDropHover() |
| 133 const { |
| 133 // BubbleIconView views don't show hover effect. | 134 // BubbleIconView views don't show hover effect. |
| 134 return nullptr; | 135 return nullptr; |
| 135 } | 136 } |
| 136 | 137 |
| 137 SkColor BubbleIconView::GetInkDropBaseColor() const { | 138 SkColor BubbleIconView::GetInkDropBaseColor() const { |
| 138 return color_utils::DeriveDefaultIconColor(GetNativeTheme()->GetSystemColor( | 139 return color_utils::DeriveDefaultIconColor(GetNativeTheme()->GetSystemColor( |
| 139 ui::NativeTheme::kColorId_TextfieldDefaultColor)); | 140 ui::NativeTheme::kColorId_TextfieldDefaultColor)); |
| 140 } | 141 } |
| 141 | 142 |
| 142 void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) { | 143 void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 image_->SetImage( | 193 image_->SetImage( |
| 193 gfx::CreateVectorIcon(GetVectorIcon(), icon_size, icon_color)); | 194 gfx::CreateVectorIcon(GetVectorIcon(), icon_size, icon_color)); |
| 194 } | 195 } |
| 195 | 196 |
| 196 void BubbleIconView::SetActiveInternal(bool active) { | 197 void BubbleIconView::SetActiveInternal(bool active) { |
| 197 if (active_ == active) | 198 if (active_ == active) |
| 198 return; | 199 return; |
| 199 active_ = active; | 200 active_ = active; |
| 200 UpdateIcon(); | 201 UpdateIcon(); |
| 201 } | 202 } |
| OLD | NEW |