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

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

Issue 536013002: Decoupling visibility states from webcontent, adding visibility management in ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a few more unittests 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
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/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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 414
415 void HomeCardImpl::OnOverviewModeEnter() { 415 void HomeCardImpl::OnOverviewModeEnter() {
416 if (state_ == VISIBLE_MINIMIZED) 416 if (state_ == VISIBLE_MINIMIZED)
417 SetState(VISIBLE_BOTTOM); 417 SetState(VISIBLE_BOTTOM);
418 } 418 }
419 419
420 void HomeCardImpl::OnOverviewModeExit() { 420 void HomeCardImpl::OnOverviewModeExit() {
421 SetState(VISIBLE_MINIMIZED); 421 SetState(VISIBLE_MINIMIZED);
422 } 422 }
423 423
424 void HomeCardImpl::OnActivityOrderHasChanged() { 424 void HomeCardImpl::OnSplitViewModeEnter() {
425 }
426
427 void HomeCardImpl::OnSplitViewModeExit() {
425 } 428 }
426 429
427 void HomeCardImpl::OnWindowActivated(aura::Window* gained_active, 430 void HomeCardImpl::OnWindowActivated(aura::Window* gained_active,
428 aura::Window* lost_active) { 431 aura::Window* lost_active) {
429 if (state_ != HIDDEN && 432 if (state_ != HIDDEN &&
430 gained_active != home_card_widget_->GetNativeWindow()) { 433 gained_active != home_card_widget_->GetNativeWindow()) {
431 SetState(VISIBLE_MINIMIZED); 434 SetState(VISIBLE_MINIMIZED);
432 } 435 }
433 } 436 }
434 437
(...skipping 11 matching lines...) Expand all
446 instance = NULL; 449 instance = NULL;
447 } 450 }
448 451
449 // static 452 // static
450 HomeCard* HomeCard::Get() { 453 HomeCard* HomeCard::Get() {
451 DCHECK(instance); 454 DCHECK(instance);
452 return instance; 455 return instance;
453 } 456 }
454 457
455 } // namespace athena 458 } // namespace athena
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698