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

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

Issue 467003003: Revert 291214 "Fixes three crashes" in an attempt to find the cause of Athena related unit test fai… (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | trunk/src/athena/system/device_socket_listener.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 instance = this; 479 instance = this;
480 WindowManager::GetInstance()->AddObserver(this); 480 WindowManager::GetInstance()->AddObserver(this);
481 } 481 }
482 482
483 HomeCardImpl::~HomeCardImpl() { 483 HomeCardImpl::~HomeCardImpl() {
484 DCHECK(instance); 484 DCHECK(instance);
485 WindowManager::GetInstance()->RemoveObserver(this); 485 WindowManager::GetInstance()->RemoveObserver(this);
486 if (activation_client_) 486 if (activation_client_)
487 activation_client_->RemoveObserver(this); 487 activation_client_->RemoveObserver(this);
488 home_card_widget_->CloseNow(); 488 home_card_widget_->CloseNow();
489
490 // Reset the view delegate first as it access search provider during
491 // shutdown.
492 view_delegate_.reset();
493 search_provider_.reset();
494 instance = NULL; 489 instance = NULL;
495 } 490 }
496 491
497 void HomeCardImpl::Init() { 492 void HomeCardImpl::Init() {
498 InstallAccelerators(); 493 InstallAccelerators();
499 ScreenManager::ContainerParams params("HomeCardContainer", CP_HOME_CARD); 494 ScreenManager::ContainerParams params("HomeCardContainer", CP_HOME_CARD);
500 params.can_activate_children = true; 495 params.can_activate_children = true;
501 aura::Window* container = ScreenManager::Get()->CreateContainer(params); 496 aura::Window* container = ScreenManager::Get()->CreateContainer(params);
502 layout_manager_ = new HomeCardLayoutManager(this); 497 layout_manager_ = new HomeCardLayoutManager(this);
503 498
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 instance = NULL; 659 instance = NULL;
665 } 660 }
666 661
667 // static 662 // static
668 HomeCard* HomeCard::Get() { 663 HomeCard* HomeCard::Get() {
669 DCHECK(instance); 664 DCHECK(instance);
670 return instance; 665 return instance;
671 } 666 }
672 667
673 } // namespace athena 668 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | trunk/src/athena/system/device_socket_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698