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/public/home_card.h" | 5 #include "athena/home/public/home_card.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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 const ui::Accelerator& accelerator) OVERRIDE; | 258 const ui::Accelerator& accelerator) OVERRIDE; |
259 | 259 |
260 // HomeCardGestureManager::Delegate: | 260 // HomeCardGestureManager::Delegate: |
261 virtual void OnGestureEnded(State final_state) OVERRIDE; | 261 virtual void OnGestureEnded(State final_state) OVERRIDE; |
262 virtual void OnGestureProgressed( | 262 virtual void OnGestureProgressed( |
263 State from_state, State to_state, float progress) OVERRIDE; | 263 State from_state, State to_state, float progress) OVERRIDE; |
264 | 264 |
265 // WindowManagerObserver: | 265 // WindowManagerObserver: |
266 virtual void OnOverviewModeEnter() OVERRIDE; | 266 virtual void OnOverviewModeEnter() OVERRIDE; |
267 virtual void OnOverviewModeExit() OVERRIDE; | 267 virtual void OnOverviewModeExit() OVERRIDE; |
| 268 virtual void OnActivityOrderHasChanged() OVERRIDE; |
268 | 269 |
269 // aura::client::ActivationChangeObserver: | 270 // aura::client::ActivationChangeObserver: |
270 virtual void OnWindowActivated(aura::Window* gained_active, | 271 virtual void OnWindowActivated(aura::Window* gained_active, |
271 aura::Window* lost_active) OVERRIDE; | 272 aura::Window* lost_active) OVERRIDE; |
272 | 273 |
273 scoped_ptr<AppModelBuilder> model_builder_; | 274 scoped_ptr<AppModelBuilder> model_builder_; |
274 | 275 |
275 HomeCard::State state_; | 276 HomeCard::State state_; |
276 | 277 |
277 // original_state_ is the state which the home card should go back to after | 278 // original_state_ is the state which the home card should go back to after |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 473 |
473 void HomeCardImpl::OnOverviewModeEnter() { | 474 void HomeCardImpl::OnOverviewModeEnter() { |
474 if (state_ == VISIBLE_MINIMIZED) | 475 if (state_ == VISIBLE_MINIMIZED) |
475 SetState(VISIBLE_BOTTOM); | 476 SetState(VISIBLE_BOTTOM); |
476 } | 477 } |
477 | 478 |
478 void HomeCardImpl::OnOverviewModeExit() { | 479 void HomeCardImpl::OnOverviewModeExit() { |
479 SetState(VISIBLE_MINIMIZED); | 480 SetState(VISIBLE_MINIMIZED); |
480 } | 481 } |
481 | 482 |
| 483 void HomeCardImpl::OnActivityOrderHasChanged() { |
| 484 } |
| 485 |
482 void HomeCardImpl::OnWindowActivated(aura::Window* gained_active, | 486 void HomeCardImpl::OnWindowActivated(aura::Window* gained_active, |
483 aura::Window* lost_active) { | 487 aura::Window* lost_active) { |
484 if (state_ != HIDDEN && | 488 if (state_ != HIDDEN && |
485 gained_active != home_card_widget_->GetNativeWindow()) { | 489 gained_active != home_card_widget_->GetNativeWindow()) { |
486 SetState(VISIBLE_MINIMIZED); | 490 SetState(VISIBLE_MINIMIZED); |
487 } | 491 } |
488 } | 492 } |
489 | 493 |
490 } // namespace | 494 } // namespace |
491 | 495 |
(...skipping 11 matching lines...) Expand all Loading... |
503 instance = NULL; | 507 instance = NULL; |
504 } | 508 } |
505 | 509 |
506 // static | 510 // static |
507 HomeCard* HomeCard::Get() { | 511 HomeCard* HomeCard::Get() { |
508 DCHECK(instance); | 512 DCHECK(instance); |
509 return instance; | 513 return instance; |
510 } | 514 } |
511 | 515 |
512 } // namespace athena | 516 } // namespace athena |
OLD | NEW |