OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/gtk/infobars/infobar_arrow_model.h" | 5 #include "chrome/browser/ui/gtk/infobars/infobar_arrow_model.h" |
6 | 6 |
7 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" | 7 #include "chrome/browser/ui/gtk/infobars/infobar_gtk.h" |
8 #include "gfx/canvas_skia_paint.h" | |
9 #include "gfx/color_utils.h" | |
10 #include "gfx/point.h" | |
11 #include "gfx/skia_utils_gtk.h" | |
12 #include "third_party/skia/include/effects/SkGradientShader.h" | 8 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 9 #include "ui/gfx/canvas_skia_paint.h" |
| 10 #include "ui/gfx/color_utils.h" |
| 11 #include "ui/gfx/point.h" |
| 12 #include "ui/gfx/skia_utils_gtk.h" |
13 | 13 |
14 InfoBarArrowModel::InfoBarArrowModel(Observer* observer) | 14 InfoBarArrowModel::InfoBarArrowModel(Observer* observer) |
15 : observer_(observer), | 15 : observer_(observer), |
16 animation_(this) { | 16 animation_(this) { |
17 animation_.SetTweenType(ui::Tween::LINEAR); | 17 animation_.SetTweenType(ui::Tween::LINEAR); |
18 animation_.Reset(1.0); | 18 animation_.Reset(1.0); |
19 target_colors_.top = target_colors_.bottom = SkColorSetARGB(0, 0, 0, 0); | 19 target_colors_.top = target_colors_.bottom = SkColorSetARGB(0, 0, 0, 0); |
20 previous_colors_ = target_colors_; | 20 previous_colors_ = target_colors_; |
21 } | 21 } |
22 | 22 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 observer_->PaintStateChanged(); | 115 observer_->PaintStateChanged(); |
116 } | 116 } |
117 | 117 |
118 void InfoBarArrowModel::AnimationProgressed(const ui::Animation* animation) { | 118 void InfoBarArrowModel::AnimationProgressed(const ui::Animation* animation) { |
119 observer_->PaintStateChanged(); | 119 observer_->PaintStateChanged(); |
120 } | 120 } |
121 | 121 |
122 void InfoBarArrowModel::AnimationCanceled(const ui::Animation* animation) { | 122 void InfoBarArrowModel::AnimationCanceled(const ui::Animation* animation) { |
123 observer_->PaintStateChanged(); | 123 observer_->PaintStateChanged(); |
124 } | 124 } |
OLD | NEW |