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 "ash/wm/event_rewriter_event_filter.h" | 13 #include "ash/wm/event_rewriter_event_filter.h" |
14 #include "ash/wm/property_util.h" | 14 #include "ash/wm/property_util.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 16 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
17 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 17 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
18 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
19 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 19 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
20 #include "chrome/browser/ui/ash/event_rewriter.h" | 20 #include "chrome/browser/ui/ash/event_rewriter.h" |
21 #include "chrome/browser/ui/ash/screenshot_taker.h" | 21 #include "chrome/browser/ui/ash/screenshot_taker.h" |
22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
23 #include "chrome/common/switch_utils.h" | |
23 #include "ui/aura/aura_switches.h" | 24 #include "ui/aura/aura_switches.h" |
24 #include "ui/aura/display_util.h" | 25 #include "ui/aura/display_util.h" |
25 #include "ui/aura/env.h" | 26 #include "ui/aura/env.h" |
26 #include "ui/aura/root_window.h" | 27 #include "ui/aura/root_window.h" |
27 #include "ui/compositor/compositor_setup.h" | 28 #include "ui/compositor/compositor_setup.h" |
28 | 29 |
29 #if defined(OS_CHROMEOS) | 30 #if defined(OS_CHROMEOS) |
30 #include "base/chromeos/chromeos_version.h" | 31 #include "base/chromeos/chromeos_version.h" |
31 #include "chrome/browser/chromeos/login/user_manager.h" | 32 #include "chrome/browser/chromeos/login/user_manager.h" |
32 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" | 33 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 bool magnifier_enabled = | 100 bool magnifier_enabled = |
100 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); | 101 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); |
101 ash::MagnifierType magnifier_type = | 102 ash::MagnifierType magnifier_type = |
102 chromeos::MagnificationManager::Get()->GetMagnifierType(); | 103 chromeos::MagnificationManager::Get()->GetMagnifierType(); |
103 ash::Shell::GetInstance()->magnification_controller()-> | 104 ash::Shell::GetInstance()->magnification_controller()-> |
104 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_FULL); | 105 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_FULL); |
105 ash::Shell::GetInstance()->partial_magnification_controller()-> | 106 ash::Shell::GetInstance()->partial_magnification_controller()-> |
106 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); | 107 SetEnabled(magnifier_enabled && magnifier_type == ash::MAGNIFIER_PARTIAL); |
107 | 108 |
108 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 109 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
109 switches::kDisableZeroBrowsersOpenForTests)) { | 110 switches::kDisableZeroBrowsersOpenForTests) && |
110 browser::StartKeepAlive(); | 111 !switches::IsRunningInAppMode()) { |
sky
2013/01/30 22:27:10
Does running in app mode trigger session restore?
zel
2013/01/30 22:55:16
Nope. No session restore needed for this mode.
sky
2013/01/30 23:29:56
But this runs on chromeos which automatically trig
zel
2013/01/30 23:56:57
Nope, we won't trigger session restore in forced a
| |
112 browser::StartKeepAlive(); | |
111 } | 113 } |
112 #endif | 114 #endif |
113 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 115 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); |
114 } | 116 } |
115 | 117 |
116 void CloseAsh() { | 118 void CloseAsh() { |
117 if (ash::Shell::HasInstance()) | 119 if (ash::Shell::HasInstance()) |
118 ash::Shell::DeleteInstance(); | 120 ash::Shell::DeleteInstance(); |
119 } | 121 } |
120 | 122 |
121 } // namespace chrome | 123 } // namespace chrome |
OLD | NEW |