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

Side by Side Diff: chrome/browser/lifetime/application_lifetime.cc

Issue 10537079: TabContentsWrapper -> TabContents, part 20. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_list.h" 5 #include "chrome/browser/ui/browser_list.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/browser_shutdown.h" 12 #include "chrome/browser/browser_shutdown.h"
13 #include "chrome/browser/download/download_service.h" 13 #include "chrome/browser/download/download_service.h"
14 #include "chrome/browser/metrics/thread_watcher.h" 14 #include "chrome/browser/metrics/thread_watcher.h"
15 #include "chrome/browser/prefs/pref_service.h" 15 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
20 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 20 #include "chrome/browser/ui/tab_contents/tab_contents.h"
21 #include "chrome/common/chrome_notification_types.h" 21 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "content/public/browser/browser_shutdown.h" 24 #include "content/public/browser/browser_shutdown.h"
25 #include "content/public/browser/browser_thread.h" 25 #include "content/public/browser/browser_thread.h"
26 #include "content/public/browser/navigation_details.h" 26 #include "content/public/browser/navigation_details.h"
27 #include "content/public/browser/notification_service.h" 27 #include "content/public/browser/notification_service.h"
28 28
29 #if defined(OS_MACOSX) 29 #if defined(OS_MACOSX)
30 #include "chrome/browser/chrome_browser_application_mac.h" 30 #include "chrome/browser/chrome_browser_application_mac.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ++i; 189 ++i;
190 } else { 190 } else {
191 // This path is hit during logoff/power-down. In this case we won't get 191 // This path is hit during logoff/power-down. In this case we won't get
192 // a final message and so we force the browser to be deleted. 192 // a final message and so we force the browser to be deleted.
193 // Close doesn't immediately destroy the browser 193 // Close doesn't immediately destroy the browser
194 // (Browser::TabStripEmpty() uses invoke later) but when we're ending the 194 // (Browser::TabStripEmpty() uses invoke later) but when we're ending the
195 // session we need to make sure the browser is destroyed now. So, invoke 195 // session we need to make sure the browser is destroyed now. So, invoke
196 // DestroyBrowser to make sure the browser is deleted and cleanup can 196 // DestroyBrowser to make sure the browser is deleted and cleanup can
197 // happen. 197 // happen.
198 while (browser->tab_count()) 198 while (browser->tab_count())
199 delete browser->GetTabContentsWrapperAt(0); 199 delete browser->GetTabContentsAt(0);
200 browser->window()->DestroyBrowser(); 200 browser->window()->DestroyBrowser();
201 i = BrowserList::begin(); 201 i = BrowserList::begin();
202 if (i != BrowserList::end() && browser == *i) { 202 if (i != BrowserList::end() && browser == *i) {
203 // Destroying the browser should have removed it from the browser list. 203 // Destroying the browser should have removed it from the browser list.
204 // We should never get here. 204 // We should never get here.
205 NOTREACHED(); 205 NOTREACHED();
206 return; 206 return;
207 } 207 }
208 } 208 }
209 } 209 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 MessageLoop::current()) 359 MessageLoop::current())
360 CloseAllBrowsers(); 360 CloseAllBrowsers();
361 } 361 }
362 } 362 }
363 363
364 bool WillKeepAlive() { 364 bool WillKeepAlive() {
365 return g_keep_alive_count > 0; 365 return g_keep_alive_count > 0;
366 } 366 }
367 367
368 } // namespace browser 368 } // namespace browser
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