Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: athena/home/home_card_impl.cc

Issue 513523002: Adding Baseframework of the ResourceManager (all hooks and observers) are being put in place with a… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self nits Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 virtual aura::Window* GetNativeWindow() OVERRIDE; 434 virtual aura::Window* GetNativeWindow() OVERRIDE;
435 435
436 // HomeCardGestureManager::Delegate: 436 // HomeCardGestureManager::Delegate:
437 virtual void OnGestureEnded(State final_state) OVERRIDE; 437 virtual void OnGestureEnded(State final_state) OVERRIDE;
438 virtual void OnGestureProgressed( 438 virtual void OnGestureProgressed(
439 State from_state, State to_state, float progress) OVERRIDE; 439 State from_state, State to_state, float progress) OVERRIDE;
440 440
441 // WindowManagerObserver: 441 // WindowManagerObserver:
442 virtual void OnOverviewModeEnter() OVERRIDE; 442 virtual void OnOverviewModeEnter() OVERRIDE;
443 virtual void OnOverviewModeExit() OVERRIDE; 443 virtual void OnOverviewModeExit() OVERRIDE;
444 virtual void OnActivityOrderHasChanged() OVERRIDE;
444 445
445 // aura::client::ActivationChangeObserver: 446 // aura::client::ActivationChangeObserver:
446 virtual void OnWindowActivated(aura::Window* gained_active, 447 virtual void OnWindowActivated(aura::Window* gained_active,
447 aura::Window* lost_active) OVERRIDE; 448 aura::Window* lost_active) OVERRIDE;
448 449
449 scoped_ptr<AppModelBuilder> model_builder_; 450 scoped_ptr<AppModelBuilder> model_builder_;
450 451
451 HomeCard::State state_; 452 HomeCard::State state_;
452 453
453 // original_state_ is the state which the home card should go back to after 454 // original_state_ is the state which the home card should go back to after
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 } 634 }
634 635
635 void HomeCardImpl::OnOverviewModeEnter() { 636 void HomeCardImpl::OnOverviewModeEnter() {
636 SetState(VISIBLE_BOTTOM); 637 SetState(VISIBLE_BOTTOM);
637 } 638 }
638 639
639 void HomeCardImpl::OnOverviewModeExit() { 640 void HomeCardImpl::OnOverviewModeExit() {
640 SetState(VISIBLE_MINIMIZED); 641 SetState(VISIBLE_MINIMIZED);
641 } 642 }
642 643
644 void HomeCardImpl::OnActivityOrderHasChanged() {
645 }
646
643 void HomeCardImpl::OnWindowActivated(aura::Window* gained_active, 647 void HomeCardImpl::OnWindowActivated(aura::Window* gained_active,
644 aura::Window* lost_active) { 648 aura::Window* lost_active) {
645 if (state_ != HIDDEN && 649 if (state_ != HIDDEN &&
646 gained_active != home_card_widget_->GetNativeWindow()) { 650 gained_active != home_card_widget_->GetNativeWindow()) {
647 SetState(VISIBLE_MINIMIZED); 651 SetState(VISIBLE_MINIMIZED);
648 } 652 }
649 } 653 }
650 654
651 } // namespace 655 } // namespace
652 656
(...skipping 11 matching lines...) Expand all
664 instance = NULL; 668 instance = NULL;
665 } 669 }
666 670
667 // static 671 // static
668 HomeCard* HomeCard::Get() { 672 HomeCard* HomeCard::Get() {
669 DCHECK(instance); 673 DCHECK(instance);
670 return instance; 674 return instance;
671 } 675 }
672 676
673 } // namespace athena 677 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698