| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/launcher/app_list_button.h" | 5 #include "ash/launcher/app_list_button.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/launcher/launcher_button_host.h" | 9 #include "ash/launcher/launcher_button_host.h" |
| 10 #include "ash/launcher/launcher_types.h" | 10 #include "ash/launcher/launcher_types.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 layer()->GetAnimator()->ScheduleAnimation(opacity_sequence.release()); | 79 layer()->GetAnimator()->ScheduleAnimation(opacity_sequence.release()); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void AppListButton::StopLoadingAnimation() { | 82 void AppListButton::StopLoadingAnimation() { |
| 83 layer()->GetAnimator()->StopAnimating(); | 83 layer()->GetAnimator()->StopAnimating(); |
| 84 | 84 |
| 85 ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator()); | 85 ui::ScopedLayerAnimationSettings settings(layer()->GetAnimator()); |
| 86 settings.SetTransitionDuration( | 86 settings.SetTransitionDuration( |
| 87 base::TimeDelta::FromMilliseconds(kAnimationDurationInMs)); | 87 base::TimeDelta::FromMilliseconds(kAnimationDurationInMs)); |
| 88 layer()->SetOpacity(1.0f); | 88 layer()->SetOpacity(1.0f); |
| 89 layer()->SetTransform(ui::Transform()); | 89 layer()->SetTransform(gfx::Transform()); |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { | 92 bool AppListButton::OnMousePressed(const ui::MouseEvent& event) { |
| 93 ImageButton::OnMousePressed(event); | 93 ImageButton::OnMousePressed(event); |
| 94 host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); | 94 host_->PointerPressedOnButton(this, LauncherButtonHost::MOUSE, event); |
| 95 return true; | 95 return true; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void AppListButton::OnMouseReleased(const ui::MouseEvent& event) { | 98 void AppListButton::OnMouseReleased(const ui::MouseEvent& event) { |
| 99 ImageButton::OnMouseReleased(event); | 99 ImageButton::OnMouseReleased(event); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 126 host_->MouseExitedButton(this); | 126 host_->MouseExitedButton(this); |
| 127 } | 127 } |
| 128 | 128 |
| 129 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) { | 129 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) { |
| 130 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; | 130 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; |
| 131 state->name = host_->GetAccessibleName(this); | 131 state->name = host_->GetAccessibleName(this); |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace internal | 134 } // namespace internal |
| 135 } // namespace ash | 135 } // namespace ash |
| OLD | NEW |