Chromium Code Reviews| 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" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 switches::kAuraHostWindowUseFullscreen); | 48 switches::kAuraHostWindowUseFullscreen); |
| 49 | 49 |
| 50 #if defined(OS_CHROMEOS) | 50 #if defined(OS_CHROMEOS) |
| 51 if (base::chromeos::IsRunningOnChromeOS()) { | 51 if (base::chromeos::IsRunningOnChromeOS()) { |
| 52 use_fullscreen = true; | 52 use_fullscreen = true; |
| 53 // Hides the cursor outside of the Aura root window. The cursor will be | 53 // Hides the cursor outside of the Aura root window. The cursor will be |
| 54 // drawn within the Aura root window, and it'll remain hidden after the | 54 // drawn within the Aura root window, and it'll remain hidden after the |
| 55 // Aura window is closed. | 55 // Aura window is closed. |
| 56 ui::HideHostCursor(); | 56 ui::HideHostCursor(); |
| 57 } | 57 } |
| 58 | |
| 59 // Hide the mouse cursor completely at boot. | |
| 60 if (!chromeos::UserManager::Get()->IsUserLoggedIn()) | |
| 61 ash::Shell::set_initially_hide_cursor(true); | |
|
Daniel Erat
2012/10/31 13:18:53
Just to double-check, is it still shown as soon as
mazda
2012/11/20 03:30:20
Yes, CompoundEventFilter::SetCursorVisibilityOnEve
| |
| 58 #endif | 62 #endif |
| 59 | 63 |
| 60 if (use_fullscreen) { | 64 if (use_fullscreen) |
| 61 aura::DisplayManager::set_use_fullscreen_host_window(true); | 65 aura::DisplayManager::set_use_fullscreen_host_window(true); |
| 62 #if defined(OS_CHROMEOS) | |
| 63 // Hide the mouse cursor completely at boot. | |
| 64 if (!chromeos::UserManager::Get()->IsUserLoggedIn()) | |
| 65 ash::Shell::set_initially_hide_cursor(true); | |
| 66 #endif | |
| 67 } | |
| 68 | 66 |
| 69 // Its easier to mark all windows as persisting and exclude the ones we care | 67 // Its easier to mark all windows as persisting and exclude the ones we care |
| 70 // about (browser windows), rather than explicitly excluding certain windows. | 68 // about (browser windows), rather than explicitly excluding certain windows. |
| 71 ash::SetDefaultPersistsAcrossAllWorkspaces(true); | 69 ash::SetDefaultPersistsAcrossAllWorkspaces(true); |
| 72 | 70 |
| 73 // Shell takes ownership of ChromeShellDelegate. | 71 // Shell takes ownership of ChromeShellDelegate. |
| 74 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); | 72 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); |
| 75 shell->event_rewriter_filter()->SetEventRewriterDelegate( | 73 shell->event_rewriter_filter()->SetEventRewriterDelegate( |
| 76 scoped_ptr<ash::EventRewriterDelegate>(new EventRewriter).Pass()); | 74 scoped_ptr<ash::EventRewriterDelegate>(new EventRewriter).Pass()); |
| 77 shell->accelerator_controller()->SetScreenshotDelegate( | 75 shell->accelerator_controller()->SetScreenshotDelegate( |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 95 #endif | 93 #endif |
| 96 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); | 94 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); |
| 97 } | 95 } |
| 98 | 96 |
| 99 void CloseAsh() { | 97 void CloseAsh() { |
| 100 if (ash::Shell::HasInstance()) | 98 if (ash::Shell::HasInstance()) |
| 101 ash::Shell::DeleteInstance(); | 99 ash::Shell::DeleteInstance(); |
| 102 } | 100 } |
| 103 | 101 |
| 104 } // namespace chrome | 102 } // namespace chrome |
| OLD | NEW |