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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 2793443003: Removed NOTIFICATION_BROWSER_CLOSING notification (Closed)
Patch Set: Removed NOTIFICATION_BROWSER_CLOSING as separate patch Created 3 years, 7 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 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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 TabRestoreServiceFactory::GetForProfile(profile()); 739 TabRestoreServiceFactory::GetForProfile(profile());
740 740
741 #if defined(USE_AURA) 741 #if defined(USE_AURA)
742 if (tab_restore_service && is_app() && !is_devtools()) 742 if (tab_restore_service && is_app() && !is_devtools())
743 tab_restore_service->BrowserClosing(live_tab_context()); 743 tab_restore_service->BrowserClosing(live_tab_context());
744 #endif 744 #endif
745 745
746 if (tab_restore_service && is_type_tabbed() && tab_strip_model_->count()) 746 if (tab_restore_service && is_type_tabbed() && tab_strip_model_->count())
747 tab_restore_service->BrowserClosing(live_tab_context()); 747 tab_restore_service->BrowserClosing(live_tab_context());
748 748
749 // TODO(sky): convert session/tab restore to use notification. 749 BrowserList::NotifyBrowserCloseStarted(this);
750 content::NotificationService::current()->Notify(
751 chrome::NOTIFICATION_BROWSER_CLOSING,
752 content::Source<Browser>(this),
753 content::NotificationService::NoDetails());
754 750
755 if (!IsFastTabUnloadEnabled()) 751 if (!IsFastTabUnloadEnabled())
756 tab_strip_model_->CloseAllTabs(); 752 tab_strip_model_->CloseAllTabs();
757 } 753 }
758 754
759 //////////////////////////////////////////////////////////////////////////////// 755 ////////////////////////////////////////////////////////////////////////////////
760 // In-progress download termination handling: 756 // In-progress download termination handling:
761 757
762 void Browser::InProgressDownloadResponse(bool cancel_downloads) { 758 void Browser::InProgressDownloadResponse(bool cancel_downloads) {
763 if (cancel_downloads) { 759 if (cancel_downloads) {
(...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2638 // new window later, thus we need to navigate the window now. 2634 // new window later, thus we need to navigate the window now.
2639 if (contents) { 2635 if (contents) {
2640 contents->web_contents()->GetController().LoadURL( 2636 contents->web_contents()->GetController().LoadURL(
2641 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, 2637 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK,
2642 std::string()); // No extra headers. 2638 std::string()); // No extra headers.
2643 } 2639 }
2644 } 2640 }
2645 2641
2646 return contents != NULL; 2642 return contents != NULL;
2647 } 2643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698