| 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 "chrome/browser/ui/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 9 #include "ui/accessibility/ax_view_state.h" | 9 #include "ui/accessibility/ax_view_state.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 185 } |
| 186 | 186 |
| 187 void BubbleIconView::UpdateIcon() { | 187 void BubbleIconView::UpdateIcon() { |
| 188 const ui::NativeTheme* theme = GetNativeTheme(); | 188 const ui::NativeTheme* theme = GetNativeTheme(); |
| 189 SkColor icon_color = | 189 SkColor icon_color = |
| 190 active_ | 190 active_ |
| 191 ? theme->GetSystemColor( | 191 ? theme->GetSystemColor( |
| 192 ui::NativeTheme::kColorId_ProminentButtonColor) | 192 ui::NativeTheme::kColorId_ProminentButtonColor) |
| 193 : GetInkDropBaseColor(); | 193 : GetInkDropBaseColor(); |
| 194 image_->SetImage(gfx::CreateVectorIcon( | 194 image_->SetImage(gfx::CreateVectorIcon( |
| 195 GetVectorIcon(), LocationBarView::kLocationBarIconWidth, icon_color)); | 195 GetVectorIcon(), LocationBarView::kIconWidth, icon_color)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void BubbleIconView::SetActiveInternal(bool active) { | 198 void BubbleIconView::SetActiveInternal(bool active) { |
| 199 if (active_ == active) | 199 if (active_ == active) |
| 200 return; | 200 return; |
| 201 active_ = active; | 201 active_ = active; |
| 202 UpdateIcon(); | 202 UpdateIcon(); |
| 203 } | 203 } |
| OLD | NEW |