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/lifetime/application_lifetime.h" | 5 #include "chrome/browser/lifetime/application_lifetime.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/app_mode/app_mode_utils.h" | |
9 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/notifications/notification_ui_manager.h" | 9 #include "chrome/browser/notifications/notification_ui_manager.h" |
11 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
12 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
13 | 12 |
14 #if defined(USE_ASH) | 13 #if defined(USE_ASH) |
15 #include "ash/shell.h" | 14 #include "ash/shell.h" |
16 #include "ui/aura/client/capture_client.h" | 15 #include "ui/aura/client/capture_client.h" |
17 #endif | 16 #endif |
18 | 17 |
(...skipping 21 matching lines...) Expand all Loading... |
40 #endif | 39 #endif |
41 | 40 |
42 views::Widget::CloseAllSecondaryWidgets(); | 41 views::Widget::CloseAllSecondaryWidgets(); |
43 | 42 |
44 #if defined(OS_CHROMEOS) | 43 #if defined(OS_CHROMEOS) |
45 // Stop handling display configuration events once the shutdown | 44 // Stop handling display configuration events once the shutdown |
46 // process starts. crbug.com/177014. | 45 // process starts. crbug.com/177014. |
47 ash::Shell::GetInstance()->output_configurator()->Stop(); | 46 ash::Shell::GetInstance()->output_configurator()->Stop(); |
48 | 47 |
49 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 48 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
50 switches::kDisableZeroBrowsersOpenForTests) && | 49 switches::kDisableZeroBrowsersOpenForTests)) { |
51 !chrome::IsRunningInAppMode()) { | |
52 // App is exiting, call EndKeepAlive() on behalf of Aura Shell. | 50 // App is exiting, call EndKeepAlive() on behalf of Aura Shell. |
53 EndKeepAlive(); | 51 EndKeepAlive(); |
54 // Make sure we have notified the session manager that we are exiting. | 52 // Make sure we have notified the session manager that we are exiting. |
55 // This might be called from FastShutdown() or CloseAllBrowsers(), but not | 53 // This might be called from FastShutdown() or CloseAllBrowsers(), but not |
56 // if something prevents a browser from closing before SetTryingToQuit() | 54 // if something prevents a browser from closing before SetTryingToQuit() |
57 // gets called (e.g. browser->TabsNeedBeforeUnloadFired() is true). | 55 // gets called (e.g. browser->TabsNeedBeforeUnloadFired() is true). |
58 // NotifyAndTerminate does nothing if called more than once. | 56 // NotifyAndTerminate does nothing if called more than once. |
59 NotifyAndTerminate(true); | 57 NotifyAndTerminate(true); |
60 } | 58 } |
61 #endif // OS_CHROMEOS | 59 #endif // OS_CHROMEOS |
62 } | 60 } |
63 | 61 |
64 } // namespace chrome | 62 } // namespace chrome |
OLD | NEW |