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

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

Issue 232133005: ozone: Protect X11-specific code under ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, one more X11 line showed up Created 6 years, 8 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
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/accelerometer/accelerometer_controller.h" 8 #include "ash/accelerometer/accelerometer_controller.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/high_contrast/high_contrast_controller.h" 10 #include "ash/high_contrast/high_contrast_controller.h"
(...skipping 26 matching lines...) Expand all
37 bool ShouldOpenAshOnStartup() { 37 bool ShouldOpenAshOnStartup() {
38 #if defined(OS_CHROMEOS) 38 #if defined(OS_CHROMEOS)
39 return true; 39 return true;
40 #endif 40 #endif
41 // TODO(scottmg): http://crbug.com/133312, will need this for Win8 too. 41 // TODO(scottmg): http://crbug.com/133312, will need this for Win8 too.
42 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh); 42 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kOpenAsh);
43 } 43 }
44 44
45 void OpenAsh() { 45 void OpenAsh() {
46 #if defined(OS_CHROMEOS) 46 #if defined(OS_CHROMEOS)
47 #if defined(USE_X11)
47 if (base::SysInfo::IsRunningOnChromeOS()) { 48 if (base::SysInfo::IsRunningOnChromeOS()) {
48 // Hides the cursor outside of the Aura root window. The cursor will be 49 // Hides the cursor outside of the Aura root window. The cursor will be
49 // drawn within the Aura root window, and it'll remain hidden after the 50 // drawn within the Aura root window, and it'll remain hidden after the
50 // Aura window is closed. 51 // Aura window is closed.
51 ui::HideHostCursor(); 52 ui::HideHostCursor();
52 } 53 }
54 #endif
53 55
54 // Hide the mouse cursor completely at boot. 56 // Hide the mouse cursor completely at boot.
55 if (!chromeos::LoginState::Get()->IsUserLoggedIn()) 57 if (!chromeos::LoginState::Get()->IsUserLoggedIn())
56 ash::Shell::set_initially_hide_cursor(true); 58 ash::Shell::set_initially_hide_cursor(true);
57 #endif 59 #endif
58 60
59 // Shell takes ownership of ChromeShellDelegate. 61 // Shell takes ownership of ChromeShellDelegate.
60 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); 62 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate);
61 shell->accelerator_controller()->SetScreenshotDelegate( 63 shell->accelerator_controller()->SetScreenshotDelegate(
62 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass()); 64 scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass());
(...skipping 25 matching lines...) Expand all
88 #endif 90 #endif
89 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); 91 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show();
90 } 92 }
91 93
92 void CloseAsh() { 94 void CloseAsh() {
93 if (ash::Shell::HasInstance()) 95 if (ash::Shell::HasInstance())
94 ash::Shell::DeleteInstance(); 96 ash::Shell::DeleteInstance();
95 } 97 }
96 98
97 } // namespace chrome 99 } // namespace chrome
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_dispatcher_linux.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698