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/launcher_view.h" | 5 #include "ash/launcher/launcher_view.h" |
6 | 6 |
7 #include "ash/launcher/launcher_button.h" | 7 #include "ash/launcher/launcher_button.h" |
8 #include "ash/launcher/launcher_delegate.h" | 8 #include "ash/launcher/launcher_delegate.h" |
9 #include "ash/launcher/launcher_icon_observer.h" | 9 #include "ash/launcher/launcher_icon_observer.h" |
10 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(FadeInAnimationDelegate); | 163 DISALLOW_COPY_AND_ASSIGN(FadeInAnimationDelegate); |
164 }; | 164 }; |
165 | 165 |
166 void ReflectItemStatus(const ash::LauncherItem& item, | 166 void ReflectItemStatus(const ash::LauncherItem& item, |
167 LauncherButton* button) { | 167 LauncherButton* button) { |
168 switch (item.status) { | 168 switch (item.status) { |
169 case STATUS_CLOSED: | 169 case STATUS_CLOSED: |
170 button->ClearState(LauncherButton::STATE_ACTIVE); | 170 button->ClearState(LauncherButton::STATE_ACTIVE); |
171 button->ClearState(LauncherButton::STATE_RUNNING); | 171 button->ClearState(LauncherButton::STATE_RUNNING); |
| 172 button->ClearState(LauncherButton::STATE_ATTENTION); |
172 break; | 173 break; |
173 case STATUS_RUNNING: | 174 case STATUS_RUNNING: |
174 button->ClearState(LauncherButton::STATE_ACTIVE); | 175 button->ClearState(LauncherButton::STATE_ACTIVE); |
175 button->AddState(LauncherButton::STATE_RUNNING); | 176 button->AddState(LauncherButton::STATE_RUNNING); |
| 177 button->ClearState(LauncherButton::STATE_ATTENTION); |
176 break; | 178 break; |
177 case STATUS_ACTIVE: | 179 case STATUS_ACTIVE: |
178 button->AddState(LauncherButton::STATE_ACTIVE); | 180 button->AddState(LauncherButton::STATE_ACTIVE); |
179 button->ClearState(LauncherButton::STATE_RUNNING); | 181 button->ClearState(LauncherButton::STATE_RUNNING); |
| 182 button->ClearState(LauncherButton::STATE_ATTENTION); |
| 183 break; |
| 184 case STATUS_ATTENTION: |
| 185 button->ClearState(LauncherButton::STATE_ACTIVE); |
| 186 button->ClearState(LauncherButton::STATE_RUNNING); |
| 187 button->AddState(LauncherButton::STATE_ATTENTION); |
180 break; | 188 break; |
181 } | 189 } |
182 } | 190 } |
183 | 191 |
184 } // namespace | 192 } // namespace |
185 | 193 |
186 // AnimationDelegate used when inserting a new item. This steadily decreased the | 194 // AnimationDelegate used when inserting a new item. This steadily decreased the |
187 // opacity of the layer as the animation progress. | 195 // opacity of the layer as the animation progress. |
188 class LauncherView::FadeOutAnimationDelegate : | 196 class LauncherView::FadeOutAnimationDelegate : |
189 public views::BoundsAnimator::OwnedAnimationDelegate { | 197 public views::BoundsAnimator::OwnedAnimationDelegate { |
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 973 source->GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
966 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) | 974 views::MenuItemView::TOPLEFT, 0) == views::MenuRunner::MENU_DELETED) |
967 return; | 975 return; |
968 | 976 |
969 Shell::GetInstance()->UpdateShelfVisibility(); | 977 Shell::GetInstance()->UpdateShelfVisibility(); |
970 #endif | 978 #endif |
971 } | 979 } |
972 | 980 |
973 } // namespace internal | 981 } // namespace internal |
974 } // namespace ash | 982 } // namespace ash |
OLD | NEW |