| 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/chrome_browser_main_extra_parts_aura.h" | 5 #include "chrome/browser/chrome_browser_main_extra_parts_aura.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/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 } | 33 } |
| 34 | 34 |
| 35 void ChromeBrowserMainExtraPartsAura::PreProfileInit() { | 35 void ChromeBrowserMainExtraPartsAura::PreProfileInit() { |
| 36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
| 37 if (chromeos::system::runtime_environment::IsRunningOnChromeOS() || | 37 if (chromeos::system::runtime_environment::IsRunningOnChromeOS() || |
| 38 CommandLine::ForCurrentProcess()->HasSwitch( | 38 CommandLine::ForCurrentProcess()->HasSwitch( |
| 39 switches::kAuraHostWindowUseFullscreen)) { | 39 switches::kAuraHostWindowUseFullscreen)) { |
| 40 aura::RootWindow::set_use_fullscreen_host_window(true); | 40 aura::RootWindow::set_use_fullscreen_host_window(true); |
| 41 aura::RootWindow::set_hide_host_cursor(true); | 41 aura::RootWindow::set_hide_host_cursor(true); |
| 42 // Hide the mouse cursor completely at boot. | 42 // Hide the mouse cursor completely at boot. |
| 43 if (!chromeos::UserManager::Get()->user_is_logged_in()) | 43 if (!chromeos::UserManager::Get()->IsUserLoggedIn()) |
| 44 ash::Shell::set_initially_hide_cursor(true); | 44 ash::Shell::set_initially_hide_cursor(true); |
| 45 } | 45 } |
| 46 #endif | 46 #endif |
| 47 | 47 |
| 48 // Shell takes ownership of ChromeShellDelegate. | 48 // Shell takes ownership of ChromeShellDelegate. |
| 49 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); | 49 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); |
| 50 shell->accelerator_controller()->SetScreenshotDelegate( | 50 shell->accelerator_controller()->SetScreenshotDelegate( |
| 51 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); | 51 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); |
| 52 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
| 53 shell->accelerator_controller()->SetBrightnessControlDelegate( | 53 shell->accelerator_controller()->SetBrightnessControlDelegate( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 72 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 72 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 73 ash::switches::kAshUberTray)) { | 73 ash::switches::kAshUberTray)) { |
| 74 ChromeShellDelegate::instance()->status_area_host()->AddButtons(); | 74 ChromeShellDelegate::instance()->status_area_host()->AddButtons(); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | 78 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
| 79 ash::Shell::DeleteInstance(); | 79 ash::Shell::DeleteInstance(); |
| 80 aura::Env::DeleteInstance(); | 80 aura::Env::DeleteInstance(); |
| 81 } | 81 } |
| OLD | NEW |