Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Side by Side Diff: chrome/browser/ui/ash/ash_init.cc

Issue 10919135: Move ash specific cursor code to CursorManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | ui/aura/client/cursor_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 #include "ui/aura/root_window.h" 24 #include "ui/aura/root_window.h"
25 #include "ui/compositor/compositor_setup.h" 25 #include "ui/compositor/compositor_setup.h"
26 26
27 #if defined(OS_CHROMEOS) 27 #if defined(OS_CHROMEOS)
28 #include "base/chromeos/chromeos_version.h" 28 #include "base/chromeos/chromeos_version.h"
29 #include "chrome/browser/chromeos/login/user_manager.h" 29 #include "chrome/browser/chromeos/login/user_manager.h"
30 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h" 30 #include "chrome/browser/ui/ash/brightness_controller_chromeos.h"
31 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" 31 #include "chrome/browser/ui/ash/ime_controller_chromeos.h"
32 #include "chrome/browser/ui/ash/keyboard_brightness_controller_chromeos.h" 32 #include "chrome/browser/ui/ash/keyboard_brightness_controller_chromeos.h"
33 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" 33 #include "chrome/browser/ui/ash/volume_controller_chromeos.h"
34 #include "ui/base/x/x11_util.h"
34 #endif 35 #endif
35 36
36 37
37 namespace chrome { 38 namespace chrome {
38 39
39 bool ShouldOpenAshOnStartup() { 40 bool ShouldOpenAshOnStartup() {
40 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
41 return true; 42 return true;
42 #endif 43 #endif
43 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh); 44 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh);
44 } 45 }
45 46
46 void OpenAsh() { 47 void OpenAsh() {
47 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch( 48 bool use_fullscreen = CommandLine::ForCurrentProcess()->HasSwitch(
48 switches::kAuraHostWindowUseFullscreen); 49 switches::kAuraHostWindowUseFullscreen);
49 50
50 #if defined(OS_CHROMEOS) 51 #if defined(OS_CHROMEOS)
51 if (base::chromeos::IsRunningOnChromeOS()) 52 if (base::chromeos::IsRunningOnChromeOS()) {
52 use_fullscreen = true; 53 use_fullscreen = true;
54 // Hides the cursor outside of the Aura root window. The cursor will be
55 // drawn within the Aura root window, and it'll remain hidden after the
56 // Aura window is closed.
57 ui::HideHostCursor();
58 }
53 #endif 59 #endif
54 60
55 if (use_fullscreen) { 61 if (use_fullscreen) {
56 aura::DisplayManager::set_use_fullscreen_host_window(true); 62 aura::DisplayManager::set_use_fullscreen_host_window(true);
57 #if defined(OS_CHROMEOS) 63 #if defined(OS_CHROMEOS)
58 aura::RootWindow::set_hide_host_cursor(true);
59 // Hide the mouse cursor completely at boot. 64 // Hide the mouse cursor completely at boot.
60 if (!chromeos::UserManager::Get()->IsUserLoggedIn()) 65 if (!chromeos::UserManager::Get()->IsUserLoggedIn())
61 ash::Shell::set_initially_hide_cursor(true); 66 ash::Shell::set_initially_hide_cursor(true);
62 #endif 67 #endif
63 } 68 }
64 69
65 // Its easier to mark all windows as persisting and exclude the ones we care 70 // Its easier to mark all windows as persisting and exclude the ones we care
66 // about (browser windows), rather than explicitly excluding certain windows. 71 // about (browser windows), rather than explicitly excluding certain windows.
67 ash::SetDefaultPersistsAcrossAllWorkspaces(true); 72 ash::SetDefaultPersistsAcrossAllWorkspaces(true);
68 73
(...skipping 25 matching lines...) Expand all
94 #endif 99 #endif
95 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow(); 100 ash::Shell::GetPrimaryRootWindow()->ShowRootWindow();
96 } 101 }
97 102
98 void CloseAsh() { 103 void CloseAsh() {
99 if (ash::Shell::GetInstance()) 104 if (ash::Shell::GetInstance())
100 ash::Shell::DeleteInstance(); 105 ash::Shell::DeleteInstance();
101 } 106 }
102 107
103 } // namespace chrome 108 } // namespace chrome
OLDNEW
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | ui/aura/client/cursor_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698