| OLD | NEW |
| 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" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 chrome_browser_application_mac::Terminate(); | 96 chrome_browser_application_mac::Terminate(); |
| 97 #endif | 97 #endif |
| 98 } | 98 } |
| 99 | 99 |
| 100 void NotifyAppTerminating() { | 100 void NotifyAppTerminating() { |
| 101 static bool notified = false; | 101 static bool notified = false; |
| 102 if (notified) | 102 if (notified) |
| 103 return; | 103 return; |
| 104 notified = true; | 104 notified = true; |
| 105 content::NotificationService::current()->Notify( | 105 content::NotificationService::current()->Notify( |
| 106 content::NOTIFICATION_APP_TERMINATING, | 106 chrome::NOTIFICATION_APP_TERMINATING, |
| 107 content::NotificationService::AllSources(), | 107 content::NotificationService::AllSources(), |
| 108 content::NotificationService::NoDetails()); | 108 content::NotificationService::NoDetails()); |
| 109 } | 109 } |
| 110 | 110 |
| 111 void NotifyAndTerminate(bool fast_path) { | 111 void NotifyAndTerminate(bool fast_path) { |
| 112 #if defined(OS_CHROMEOS) | 112 #if defined(OS_CHROMEOS) |
| 113 static bool notified = false; | 113 static bool notified = false; |
| 114 // Don't ask SessionManager to shutdown if | 114 // Don't ask SessionManager to shutdown if |
| 115 // a) a shutdown request has already been sent. | 115 // a) a shutdown request has already been sent. |
| 116 // b) shutdown request comes from session manager. | 116 // b) shutdown request comes from session manager. |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 MessageLoop::current()) | 362 MessageLoop::current()) |
| 363 CloseAllBrowsers(); | 363 CloseAllBrowsers(); |
| 364 } | 364 } |
| 365 } | 365 } |
| 366 | 366 |
| 367 bool WillKeepAlive() { | 367 bool WillKeepAlive() { |
| 368 return g_keep_alive_count > 0; | 368 return g_keep_alive_count > 0; |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace browser | 371 } // namespace browser |
| OLD | NEW |