OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/tabs/media_indicator_button.h" | 5 #include "chrome/browser/ui/views/tabs/media_indicator_button.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "chrome/browser/ui/views/tabs/tab.h" | 8 #include "chrome/browser/ui/views/tabs/tab.h" |
8 #include "chrome/browser/ui/views/tabs/tab_controller.h" | 9 #include "chrome/browser/ui/views/tabs/tab_controller.h" |
9 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" | 10 #include "chrome/browser/ui/views/tabs/tab_renderer_data.h" |
10 #include "content/public/browser/user_metrics.h" | 11 #include "content/public/browser/user_metrics.h" |
11 #include "ui/gfx/animation/animation_delegate.h" | 12 #include "ui/gfx/animation/animation_delegate.h" |
12 #include "ui/gfx/canvas.h" | 13 #include "ui/gfx/canvas.h" |
13 #include "ui/gfx/image/image.h" | 14 #include "ui/gfx/image/image.h" |
14 | 15 |
15 using base::UserMetricsAction; | 16 using base::UserMetricsAction; |
16 | 17 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 SkColor color = parent_tab_->button_color(); | 247 SkColor color = parent_tab_->button_color(); |
247 gfx::ImageSkia indicator_image = | 248 gfx::ImageSkia indicator_image = |
248 chrome::GetTabMediaIndicatorImage(state, color).AsImageSkia(); | 249 chrome::GetTabMediaIndicatorImage(state, color).AsImageSkia(); |
249 SetImage(views::CustomButton::STATE_NORMAL, &indicator_image); | 250 SetImage(views::CustomButton::STATE_NORMAL, &indicator_image); |
250 SetImage(views::CustomButton::STATE_DISABLED, &indicator_image); | 251 SetImage(views::CustomButton::STATE_DISABLED, &indicator_image); |
251 gfx::ImageSkia affordance_image = | 252 gfx::ImageSkia affordance_image = |
252 chrome::GetTabMediaIndicatorAffordanceImage(state, color).AsImageSkia(); | 253 chrome::GetTabMediaIndicatorAffordanceImage(state, color).AsImageSkia(); |
253 SetImage(views::CustomButton::STATE_HOVERED, &affordance_image); | 254 SetImage(views::CustomButton::STATE_HOVERED, &affordance_image); |
254 SetImage(views::CustomButton::STATE_PRESSED, &affordance_image); | 255 SetImage(views::CustomButton::STATE_PRESSED, &affordance_image); |
255 } | 256 } |
OLD | NEW |