| 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 "athena/wm/overview_toolbar.h" | 5 #include "athena/wm/overview_toolbar.h" |
| 6 | 6 |
| 7 #include "athena/resources/grit/athena_resources.h" | 7 #include "athena/resources/grit/athena_resources.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 SK_ColorWHITE, | 74 SK_ColorWHITE, |
| 75 gfx::Rect(0, | 75 gfx::Rect(0, |
| 76 kActionButtonImageSize, | 76 kActionButtonImageSize, |
| 77 kActionButtonImageSize, | 77 kActionButtonImageSize, |
| 78 kActionButtonTextSize), | 78 kActionButtonTextSize), |
| 79 0, | 79 0, |
| 80 gfx::Canvas::TEXT_ALIGN_CENTER, | 80 gfx::Canvas::TEXT_ALIGN_CENTER, |
| 81 shadow); | 81 shadow); |
| 82 } | 82 } |
| 83 | 83 |
| 84 virtual void OnDelegatedFrameDamage( |
| 85 const gfx::Rect& damage_rect_in_dip) OVERRIDE {} |
| 86 |
| 84 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} | 87 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE {} |
| 85 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { | 88 virtual base::Closure PrepareForLayerBoundsChange() OVERRIDE { |
| 86 return base::Closure(); | 89 return base::Closure(); |
| 87 } | 90 } |
| 88 | 91 |
| 89 int resource_id_; | 92 int resource_id_; |
| 90 base::string16 label_; | 93 base::string16 label_; |
| 91 scoped_ptr<ui::Layer> layer_; | 94 scoped_ptr<ui::Layer> layer_; |
| 92 | 95 |
| 93 DISALLOW_COPY_AND_ASSIGN(ActionButton); | 96 DISALLOW_COPY_AND_ASSIGN(ActionButton); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 | 190 |
| 188 void OverviewToolbar::TransformButton(ActionButton* button) { | 191 void OverviewToolbar::TransformButton(ActionButton* button) { |
| 189 ui::ScopedLayerAnimationSettings split_settings( | 192 ui::ScopedLayerAnimationSettings split_settings( |
| 190 button->layer()->GetAnimator()); | 193 button->layer()->GetAnimator()); |
| 191 split_settings.SetTweenType(gfx::Tween::SMOOTH_IN_OUT); | 194 split_settings.SetTweenType(gfx::Tween::SMOOTH_IN_OUT); |
| 192 button->layer()->SetTransform(ComputeTransformFor(button)); | 195 button->layer()->SetTransform(ComputeTransformFor(button)); |
| 193 button->layer()->SetOpacity(shown_ ? 1 : 0); | 196 button->layer()->SetOpacity(shown_ ? 1 : 0); |
| 194 } | 197 } |
| 195 | 198 |
| 196 } // namespace athena | 199 } // namespace athena |
| OLD | NEW |