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

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

Issue 490033003: Fixes three crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add file thread 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 | athena/main/athena_launcher.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();
489 instance = NULL; 494 instance = NULL;
490 } 495 }
491 496
492 void HomeCardImpl::Init() { 497 void HomeCardImpl::Init() {
493 InstallAccelerators(); 498 InstallAccelerators();
494 ScreenManager::ContainerParams params("HomeCardContainer", CP_HOME_CARD); 499 ScreenManager::ContainerParams params("HomeCardContainer", CP_HOME_CARD);
495 params.can_activate_children = true; 500 params.can_activate_children = true;
496 aura::Window* container = ScreenManager::Get()->CreateContainer(params); 501 aura::Window* container = ScreenManager::Get()->CreateContainer(params);
497 layout_manager_ = new HomeCardLayoutManager(this); 502 layout_manager_ = new HomeCardLayoutManager(this);
498 503
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 instance = NULL; 664 instance = NULL;
660 } 665 }
661 666
662 // static 667 // static
663 HomeCard* HomeCard::Get() { 668 HomeCard* HomeCard::Get() {
664 DCHECK(instance); 669 DCHECK(instance);
665 return instance; 670 return instance;
666 } 671 }
667 672
668 } // namespace athena 673 } // namespace athena
OLDNEW
« no previous file with comments | « no previous file | athena/main/athena_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698