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/env/public/athena_env.h" | 10 #include "athena/env/public/athena_env.h" |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 ui::ScopedLayerAnimationSettings settings( | 317 ui::ScopedLayerAnimationSettings settings( |
318 minimized_home_->layer()->GetAnimator()); | 318 minimized_home_->layer()->GetAnimator()); |
319 minimized_home_->layer()->SetVisible(state_ == VISIBLE_MINIMIZED); | 319 minimized_home_->layer()->SetVisible(state_ == VISIBLE_MINIMIZED); |
320 minimized_home_->layer()->SetOpacity( | 320 minimized_home_->layer()->SetOpacity( |
321 state_ == VISIBLE_MINIMIZED ? 1.0f : 0.0f); | 321 state_ == VISIBLE_MINIMIZED ? 1.0f : 0.0f); |
322 } | 322 } |
323 } | 323 } |
324 if (state_ == HIDDEN) { | 324 if (state_ == HIDDEN) { |
325 home_card_widget_->Hide(); | 325 home_card_widget_->Hide(); |
326 } else { | 326 } else { |
327 if (state_ == VISIBLE_CENTERED) | 327 if (state_ == VISIBLE_MINIMIZED) |
| 328 home_card_widget_->ShowInactive(); |
| 329 else |
328 home_card_widget_->Show(); | 330 home_card_widget_->Show(); |
329 else | |
330 home_card_widget_->ShowInactive(); | |
331 home_card_view_->SetStateWithAnimation(state); | 331 home_card_view_->SetStateWithAnimation(state); |
332 layout_manager_->Layout(true); | 332 layout_manager_->Layout(true); |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 HomeCard::State HomeCardImpl::GetState() { | 336 HomeCard::State HomeCardImpl::GetState() { |
337 return state_; | 337 return state_; |
338 } | 338 } |
339 | 339 |
340 void HomeCardImpl::RegisterSearchProvider( | 340 void HomeCardImpl::RegisterSearchProvider( |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 instance = NULL; | 443 instance = NULL; |
444 } | 444 } |
445 | 445 |
446 // static | 446 // static |
447 HomeCard* HomeCard::Get() { | 447 HomeCard* HomeCard::Get() { |
448 DCHECK(instance); | 448 DCHECK(instance); |
449 return instance; | 449 return instance; |
450 } | 450 } |
451 | 451 |
452 } // namespace athena | 452 } // namespace athena |
OLD | NEW |