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

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

Issue 10968064: Move the NOTIFICATION_APP_TERMINATING notification from content to chrome, since it's fired by chro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: cros compile Created 8 years, 2 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
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"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/power_button_observer.cc ('k') | chrome/browser/notifications/notification_ui_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698