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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 11434013: In Chrome ASH on Windows 8 make sure that the browser object is closed before destroying it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 jumplist_->Terminate(); 545 jumplist_->Terminate();
546 } 546 }
547 #endif 547 #endif
548 548
549 // We destroy the download shelf before |browser_| to remove its child 549 // We destroy the download shelf before |browser_| to remove its child
550 // download views from the set of download observers (since the observed 550 // download views from the set of download observers (since the observed
551 // downloads can be destroyed along with |browser_| and the observer 551 // downloads can be destroyed along with |browser_| and the observer
552 // notifications will call back into deleted objects). 552 // notifications will call back into deleted objects).
553 download_shelf_.reset(); 553 download_shelf_.reset();
554 554
555 #if defined(OS_WIN) && defined(USE_AURA)
556 // Chrome ASH on Windows 8 could be closed with open browser windows.
557 // Make sure that we close the browser window before destroying it.
558 if (!browser_->tab_strip_model()->empty())
sky 2012/11/28 22:44:57 This seems wrong. What code path is letting us get
559 browser_->OnWindowClosing();
560 #endif
561
555 // The TabStrip attaches a listener to the model. Make sure we shut down the 562 // The TabStrip attaches a listener to the model. Make sure we shut down the
556 // TabStrip first so that it can cleanly remove the listener. 563 // TabStrip first so that it can cleanly remove the listener.
557 if (tabstrip_) { 564 if (tabstrip_) {
558 tabstrip_->parent()->RemoveChildView(tabstrip_); 565 tabstrip_->parent()->RemoveChildView(tabstrip_);
559 delete tabstrip_; 566 delete tabstrip_;
560 tabstrip_ = NULL; 567 tabstrip_ = NULL;
561 } 568 }
562 // Child views maintain PrefMember attributes that point to 569 // Child views maintain PrefMember attributes that point to
563 // OffTheRecordProfile's PrefService which gets deleted by ~Browser. 570 // OffTheRecordProfile's PrefService which gets deleted by ~Browser.
564 RemoveAllChildViews(true); 571 RemoveAllChildViews(true);
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 modal_browser->window()->Activate(); 2788 modal_browser->window()->Activate();
2782 } 2789 }
2783 2790
2784 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2791 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2785 } 2792 }
2786 2793
2787 void BrowserView::MaybeStackBookmarkBarAtTop() { 2794 void BrowserView::MaybeStackBookmarkBarAtTop() {
2788 if (bookmark_bar_view_.get()) 2795 if (bookmark_bar_view_.get())
2789 bookmark_bar_view_->MaybeStackAtTop(); 2796 bookmark_bar_view_->MaybeStackAtTop();
2790 } 2797 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698