| OLD | NEW | 
|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bar_control_button.h" | 5 #include "chrome/browser/ui/views/bar_control_button.h" | 
| 6 | 6 | 
| 7 #include "ui/gfx/color_utils.h" | 7 #include "ui/gfx/color_utils.h" | 
| 8 #include "ui/gfx/paint_vector_icon.h" | 8 #include "ui/gfx/paint_vector_icon.h" | 
| 9 #include "ui/gfx/vector_icons_public.h" | 9 #include "ui/gfx/vector_icons_public.h" | 
| 10 #include "ui/views/animation/button_ink_drop_delegate.h" | 10 #include "ui/views/animation/button_ink_drop_delegate.h" | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
| 41   if (!border()) { | 41   if (!border()) { | 
| 42     SetBorder(views::Border::CreateEmptyBorder( | 42     SetBorder(views::Border::CreateEmptyBorder( | 
| 43         kButtonExtraTouchSize, kButtonExtraTouchSize, kButtonExtraTouchSize, | 43         kButtonExtraTouchSize, kButtonExtraTouchSize, kButtonExtraTouchSize, | 
| 44         kButtonExtraTouchSize)); | 44         kButtonExtraTouchSize)); | 
| 45   } | 45   } | 
| 46 } | 46 } | 
| 47 | 47 | 
| 48 void BarControlButton::OnThemeChanged() { | 48 void BarControlButton::OnThemeChanged() { | 
| 49   SkColor icon_color = | 49   SkColor icon_color = | 
| 50       color_utils::DeriveDefaultIconColor(get_text_color_callback_.Run()); | 50       color_utils::DeriveDefaultIconColor(get_text_color_callback_.Run()); | 
| 51   gfx::ImageSkia image = gfx::CreateVectorIcon(id_, 16, icon_color); | 51   gfx::ImageSkia image = gfx::CreateVectorIcon(id_, icon_color); | 
| 52   SetImage(views::CustomButton::STATE_NORMAL, &image); | 52   SetImage(views::CustomButton::STATE_NORMAL, &image); | 
| 53   image = gfx::CreateVectorIcon(id_, 16, SkColorSetA(icon_color, 0xff / 2)); | 53   image = gfx::CreateVectorIcon(id_, SkColorSetA(icon_color, 0xff / 2)); | 
| 54   SetImage(views::CustomButton::STATE_DISABLED, &image); | 54   SetImage(views::CustomButton::STATE_DISABLED, &image); | 
| 55   set_ink_drop_base_color(icon_color); | 55   set_ink_drop_base_color(icon_color); | 
| 56 } | 56 } | 
| 57 | 57 | 
| 58 void BarControlButton::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 58 void BarControlButton::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 
| 59   OnThemeChanged(); | 59   OnThemeChanged(); | 
| 60 } | 60 } | 
| OLD | NEW | 
|---|