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/home/home_card_impl.h" | 5 #include "athena/home/home_card_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "athena/common/container_priorities.h" | 10 #include "athena/common/container_priorities.h" |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 ui::ScopedLayerAnimationSettings settings( | 320 ui::ScopedLayerAnimationSettings settings( |
321 minimized_home_->layer()->GetAnimator()); | 321 minimized_home_->layer()->GetAnimator()); |
322 minimized_home_->layer()->SetVisible(state_ == VISIBLE_MINIMIZED); | 322 minimized_home_->layer()->SetVisible(state_ == VISIBLE_MINIMIZED); |
323 minimized_home_->layer()->SetOpacity( | 323 minimized_home_->layer()->SetOpacity( |
324 state_ == VISIBLE_MINIMIZED ? 1.0f : 0.0f); | 324 state_ == VISIBLE_MINIMIZED ? 1.0f : 0.0f); |
325 } | 325 } |
326 } | 326 } |
327 if (state_ == HIDDEN) { | 327 if (state_ == HIDDEN) { |
328 home_card_widget_->Hide(); | 328 home_card_widget_->Hide(); |
329 } else { | 329 } else { |
330 if (state_ == VISIBLE_CENTERED) | 330 if (state_ == VISIBLE_MINIMIZED) |
| 331 home_card_widget_->ShowInactive(); |
| 332 else |
331 home_card_widget_->Show(); | 333 home_card_widget_->Show(); |
332 else | |
333 home_card_widget_->ShowInactive(); | |
334 home_card_view_->SetStateWithAnimation(state); | 334 home_card_view_->SetStateWithAnimation(state); |
335 layout_manager_->Layout(true); | 335 layout_manager_->Layout(true); |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 HomeCard::State HomeCardImpl::GetState() { | 339 HomeCard::State HomeCardImpl::GetState() { |
340 return state_; | 340 return state_; |
341 } | 341 } |
342 | 342 |
343 void HomeCardImpl::RegisterSearchProvider( | 343 void HomeCardImpl::RegisterSearchProvider( |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 instance = NULL; | 446 instance = NULL; |
447 } | 447 } |
448 | 448 |
449 // static | 449 // static |
450 HomeCard* HomeCard::Get() { | 450 HomeCard* HomeCard::Get() { |
451 DCHECK(instance); | 451 DCHECK(instance); |
452 return instance; | 452 return instance; |
453 } | 453 } |
454 | 454 |
455 } // namespace athena | 455 } // namespace athena |
OLD | NEW |