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/ash/ash_init.h" | 5 #include "chrome/browser/ui/ash/ash_init.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
10 #include "ash/magnifier/magnification_controller.h" | 10 #include "ash/magnifier/magnification_controller.h" |
11 #include "ash/magnifier/partial_magnification_controller.h" | 11 #include "ash/magnifier/partial_magnification_controller.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "chrome/browser/browser_shutdown.h" | |
15 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 14 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
16 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
17 #include "chrome/browser/lifetime/application_lifetime.h" | 16 #include "chrome/browser/lifetime/application_lifetime.h" |
18 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 17 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
19 #include "chrome/browser/ui/ash/screenshot_taker.h" | 18 #include "chrome/browser/ui/ash/screenshot_taker.h" |
20 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
21 #include "ui/aura/env.h" | 20 #include "ui/aura/env.h" |
22 #include "ui/aura/window_tree_host.h" | 21 #include "ui/aura/window_tree_host.h" |
23 | 22 |
24 #if defined(OS_CHROMEOS) | 23 #if defined(OS_CHROMEOS) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 75 |
77 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 76 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
78 switches::kDisableZeroBrowsersOpenForTests)) { | 77 switches::kDisableZeroBrowsersOpenForTests)) { |
79 chrome::IncrementKeepAliveCount(); | 78 chrome::IncrementKeepAliveCount(); |
80 } | 79 } |
81 #endif | 80 #endif |
82 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 81 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
83 } | 82 } |
84 | 83 |
85 void CloseAsh() { | 84 void CloseAsh() { |
86 // If shutdown is initiated by |BrowserX11IOErrorHandler|, don't | 85 if (ash::Shell::HasInstance()) |
87 // try to cleanup resources. | |
88 if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers() && | |
89 ash::Shell::HasInstance()) { | |
90 ash::Shell::DeleteInstance(); | 86 ash::Shell::DeleteInstance(); |
91 } | |
92 } | 87 } |
93 | 88 |
94 } // namespace chrome | 89 } // namespace chrome |
OLD | NEW |