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/shell.h" | 11 #include "ash/shell.h" |
| 12 #include "ash/system/tray/system_tray.h" |
12 #include "ash/wm/event_rewriter_event_filter.h" | 13 #include "ash/wm/event_rewriter_event_filter.h" |
13 #include "ash/wm/property_util.h" | 14 #include "ash/wm/property_util.h" |
14 #include "base/command_line.h" | 15 #include "base/command_line.h" |
15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
16 #include "chrome/browser/lifetime/application_lifetime.h" | 17 #include "chrome/browser/lifetime/application_lifetime.h" |
17 #include "chrome/browser/ui/ash/caps_lock_handler.h" | 18 #include "chrome/browser/ui/ash/caps_lock_handler.h" |
18 #include "chrome/browser/ui/ash/event_rewriter.h" | 19 #include "chrome/browser/ui/ash/event_rewriter.h" |
19 #include "chrome/browser/ui/ash/screenshot_taker.h" | 20 #include "chrome/browser/ui/ash/screenshot_taker.h" |
20 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" | 21 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" |
21 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 chromeos::accessibility::IsHighContrastEnabled()); | 95 chromeos::accessibility::IsHighContrastEnabled()); |
95 | 96 |
96 ash::Shell::GetInstance()->magnification_controller()->SetEnabled( | 97 ash::Shell::GetInstance()->magnification_controller()->SetEnabled( |
97 chromeos::accessibility::IsScreenMagnifierEnabled()); | 98 chromeos::accessibility::IsScreenMagnifierEnabled()); |
98 | 99 |
99 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 100 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
100 switches::kDisableZeroBrowsersOpenForTests)) { | 101 switches::kDisableZeroBrowsersOpenForTests)) { |
101 browser::StartKeepAlive(); | 102 browser::StartKeepAlive(); |
102 } | 103 } |
103 #endif | 104 #endif |
| 105 shell->system_tray()->UpdateAfterAshInit(); |
104 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 106 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); |
105 } | 107 } |
106 | 108 |
107 void CloseAsh() { | 109 void CloseAsh() { |
108 if (ash::Shell::GetInstance()) | 110 if (ash::Shell::GetInstance()) |
109 ash::Shell::DeleteInstance(); | 111 ash::Shell::DeleteInstance(); |
110 } | 112 } |
111 | 113 |
112 } // namespace chrome | 114 } // namespace chrome |
OLD | NEW |