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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/browser_process_platform_part.h" |
10 #include "chrome/browser/notifications/notification_ui_manager.h" | 11 #include "chrome/browser/notifications/notification_ui_manager.h" |
11 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
12 #include "ui/aura/client/capture_client.h" | 13 #include "ui/aura/client/capture_client.h" |
13 #include "ui/aura/window_event_dispatcher.h" | 14 #include "ui/aura/window_event_dispatcher.h" |
14 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
15 | 16 |
16 #if defined(USE_ASH) | 17 #if defined(USE_ASH) |
17 #include "ash/shell.h" | 18 #include "ash/shell.h" |
18 #endif | 19 #endif |
19 | 20 |
(...skipping 13 matching lines...) Expand all Loading... |
33 aura::client::GetCaptureClient(ash::Shell::GetPrimaryRootWindow())-> | 34 aura::client::GetCaptureClient(ash::Shell::GetPrimaryRootWindow())-> |
34 SetCapture(NULL); | 35 SetCapture(NULL); |
35 } | 36 } |
36 #endif | 37 #endif |
37 | 38 |
38 views::Widget::CloseAllSecondaryWidgets(); | 39 views::Widget::CloseAllSecondaryWidgets(); |
39 | 40 |
40 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
41 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 42 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
42 switches::kDisableZeroBrowsersOpenForTests)) { | 43 switches::kDisableZeroBrowsersOpenForTests)) { |
43 // App is exiting, call DecrementKeepAliveCount() on behalf of Aura Shell. | 44 // App is exiting, release the keep alive on behalf of Aura Shell. |
44 DecrementKeepAliveCount(); | 45 g_browser_process->platform_part()->UnregisterKeepAlive(); |
45 // Make sure we have notified the session manager that we are exiting. | 46 // Make sure we have notified the session manager that we are exiting. |
46 // This might be called from FastShutdown() or CloseAllBrowsers(), but not | 47 // This might be called from FastShutdown() or CloseAllBrowsers(), but not |
47 // if something prevents a browser from closing before SetTryingToQuit() | 48 // if something prevents a browser from closing before SetTryingToQuit() |
48 // gets called (e.g. browser->TabsNeedBeforeUnloadFired() is true). | 49 // gets called (e.g. browser->TabsNeedBeforeUnloadFired() is true). |
49 // NotifyAndTerminate does nothing if called more than once. | 50 // NotifyAndTerminate does nothing if called more than once. |
50 NotifyAndTerminate(true); | 51 NotifyAndTerminate(true); |
51 } | 52 } |
52 #endif | 53 #endif |
53 } | 54 } |
54 | 55 |
55 } // namespace chrome | 56 } // namespace chrome |
OLD | NEW |