| 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 29 matching lines...) Expand all Loading... |
| 40 views::CustomButton::STATE_HOVERED, | 40 views::CustomButton::STATE_HOVERED, |
| 41 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT). | 41 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_HOT). |
| 42 ToImageSkia()); | 42 ToImageSkia()); |
| 43 SetImage( | 43 SetImage( |
| 44 views::CustomButton::STATE_PRESSED, | 44 views::CustomButton::STATE_PRESSED, |
| 45 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED). | 45 rb.GetImageNamed(IDR_AURA_LAUNCHER_ICON_APPLIST_PUSHED). |
| 46 ToImageSkia()); | 46 ToImageSkia()); |
| 47 SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE)); | 47 SetAccessibleName(l10n_util::GetStringUTF16(IDS_AURA_APP_LIST_TITLE)); |
| 48 SetSize(gfx::Size(kLauncherPreferredSize, kLauncherPreferredSize)); | 48 SetSize(gfx::Size(kLauncherPreferredSize, kLauncherPreferredSize)); |
| 49 SetImageAlignment(ImageButton::ALIGN_CENTER, ImageButton::ALIGN_TOP); | 49 SetImageAlignment(ImageButton::ALIGN_CENTER, ImageButton::ALIGN_TOP); |
| 50 set_border(views::Border::CreateEmptyBorder(kBorderSize, | |
| 51 kBorderSize, | |
| 52 kBorderSize, | |
| 53 kBorderSize)); | |
| 54 } | 50 } |
| 55 | 51 |
| 56 AppListButton::~AppListButton() { | 52 AppListButton::~AppListButton() { |
| 57 } | 53 } |
| 58 | 54 |
| 59 void AppListButton::StartLoadingAnimation() { | 55 void AppListButton::StartLoadingAnimation() { |
| 60 layer()->GetAnimator()->StopAnimating(); | 56 layer()->GetAnimator()->StopAnimating(); |
| 61 | 57 |
| 62 scoped_ptr<ui::LayerAnimationSequence> opacity_sequence( | 58 scoped_ptr<ui::LayerAnimationSequence> opacity_sequence( |
| 63 new ui::LayerAnimationSequence()); | 59 new ui::LayerAnimationSequence()); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 host_->MouseExitedButton(this); | 125 host_->MouseExitedButton(this); |
| 130 } | 126 } |
| 131 | 127 |
| 132 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) { | 128 void AppListButton::GetAccessibleState(ui::AccessibleViewState* state) { |
| 133 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; | 129 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; |
| 134 state->name = host_->GetAccessibleName(this); | 130 state->name = host_->GetAccessibleName(this); |
| 135 } | 131 } |
| 136 | 132 |
| 137 } // namespace internal | 133 } // namespace internal |
| 138 } // namespace ash | 134 } // namespace ash |
| OLD | NEW |