| 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/shell_init_params.h" | 13 #include "ash/shell_init_params.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "chrome/browser/browser_shutdown.h" | 15 #include "chrome/browser/browser_shutdown.h" |
| 16 #include "chrome/browser/lifetime/application_lifetime.h" | 16 #include "chrome/browser/lifetime/application_lifetime.h" |
| 17 #include "chrome/browser/lifetime/browser_keep_alive.h" |
| 17 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" | 18 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" |
| 18 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 19 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 19 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
| 20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 21 #include "content/public/browser/context_factory.h" | 22 #include "content/public/browser/context_factory.h" |
| 22 #include "ui/aura/env.h" | 23 #include "ui/aura/env.h" |
| 23 #include "ui/aura/window_tree_host.h" | 24 #include "ui/aura/window_tree_host.h" |
| 24 | 25 |
| 25 #if defined(OS_CHROMEOS) | 26 #if defined(OS_CHROMEOS) |
| 26 #include "base/sys_info.h" | 27 #include "base/sys_info.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); | 82 chromeos::MagnificationManager::Get()->IsMagnifierEnabled(); |
| 82 ui::MagnifierType magnifier_type = | 83 ui::MagnifierType magnifier_type = |
| 83 chromeos::MagnificationManager::Get()->GetMagnifierType(); | 84 chromeos::MagnificationManager::Get()->GetMagnifierType(); |
| 84 shell->magnification_controller()-> | 85 shell->magnification_controller()-> |
| 85 SetEnabled(magnifier_enabled && magnifier_type == ui::MAGNIFIER_FULL); | 86 SetEnabled(magnifier_enabled && magnifier_type == ui::MAGNIFIER_FULL); |
| 86 shell->partial_magnification_controller()-> | 87 shell->partial_magnification_controller()-> |
| 87 SetEnabled(magnifier_enabled && magnifier_type == ui::MAGNIFIER_PARTIAL); | 88 SetEnabled(magnifier_enabled && magnifier_type == ui::MAGNIFIER_PARTIAL); |
| 88 | 89 |
| 89 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 90 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 90 switches::kDisableZeroBrowsersOpenForTests)) { | 91 switches::kDisableZeroBrowsersOpenForTests)) { |
| 91 chrome::IncrementKeepAliveCount(); | 92 browser_lifetime::IncrementKeepAliveCount(); |
| 92 } | 93 } |
| 93 #endif | 94 #endif |
| 94 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); | 95 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); |
| 95 } | 96 } |
| 96 | 97 |
| 97 void CloseAsh() { | 98 void CloseAsh() { |
| 98 if (ash::Shell::HasInstance()) | 99 if (ash::Shell::HasInstance()) |
| 99 ash::Shell::DeleteInstance(); | 100 ash::Shell::DeleteInstance(); |
| 100 } | 101 } |
| 101 | 102 |
| 102 } // namespace chrome | 103 } // namespace chrome |
| OLD | NEW |