| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/browser_list.h" | 5 #include "chrome/browser/browser_list.h" |
| 6 | 6 |
| 7 #include "base/histogram.h" | 7 #include "base/histogram.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" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 NotificationService::current()->Notify( | 246 NotificationService::current()->Notify( |
| 247 NotificationType::APP_EXITING, | 247 NotificationType::APP_EXITING, |
| 248 NotificationService::AllSources(), | 248 NotificationService::AllSources(), |
| 249 NotificationService::NoDetails()); | 249 NotificationService::NoDetails()); |
| 250 | 250 |
| 251 #if !defined(OS_MACOSX) | 251 #if !defined(OS_MACOSX) |
| 252 // On most platforms, closing all windows causes the application to exit. | 252 // On most platforms, closing all windows causes the application to exit. |
| 253 CloseAllBrowsers(true); | 253 CloseAllBrowsers(true); |
| 254 #else | 254 #else |
| 255 // On the Mac, the application continues to run once all windows are closed. | 255 // On the Mac, the application continues to run once all windows are closed. |
| 256 // Terminate will result in a CloseAllBrowsers(true) call, and additionally, | 256 // Terminate will result in a CloseAllBrowsers(true) call, and once (and if) |
| 257 // will cause the application to exit cleanly. | 257 // that is done, will cause the application to exit cleanly. |
| 258 chrome_browser_application_mac::Terminate(); | 258 chrome_browser_application_mac::Terminate(); |
| 259 #endif | 259 #endif |
| 260 } | 260 } |
| 261 | 261 |
| 262 // static | 262 // static |
| 263 void BrowserList::WindowsSessionEnding() { | 263 void BrowserList::WindowsSessionEnding() { |
| 264 // EndSession is invoked once per frame. Only do something the first time. | 264 // EndSession is invoked once per frame. Only do something the first time. |
| 265 static bool already_ended = false; | 265 static bool already_ended = false; |
| 266 if (already_ended) | 266 if (already_ended) |
| 267 return; | 267 return; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 } | 429 } |
| 430 | 430 |
| 431 TabContents* next_tab = | 431 TabContents* next_tab = |
| 432 (*browser_iterator_)->GetTabContentsAt(web_view_index_); | 432 (*browser_iterator_)->GetTabContentsAt(web_view_index_); |
| 433 if (next_tab) { | 433 if (next_tab) { |
| 434 cur_ = next_tab; | 434 cur_ = next_tab; |
| 435 return; | 435 return; |
| 436 } | 436 } |
| 437 } | 437 } |
| 438 } | 438 } |
| OLD | NEW |