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

Side by Side Diff: chrome/browser/chrome_browser_main_extra_parts_ash.cc

Issue 9546013: Move IsRunningOnChromeOS to base/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos_version,sync,cleanup Created 8 years, 9 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 | « base/chromeos/chromeos_version.cc ('k') | chrome/browser/chromeos/audio/audio_mixer_alsa.cc » ('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/chrome_browser_main_extra_parts_ash.h" 5 #include "chrome/browser/chrome_browser_main_extra_parts_ash.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"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" 12 #include "chrome/browser/ui/views/ash/caps_lock_handler.h"
13 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" 13 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
14 #include "chrome/browser/ui/views/ash/screen_orientation_listener.h" 14 #include "chrome/browser/ui/views/ash/screen_orientation_listener.h"
15 #include "chrome/browser/ui/views/ash/screenshot_taker.h" 15 #include "chrome/browser/ui/views/ash/screenshot_taker.h"
16 #include "chrome/browser/ui/views/ash/status_area_host_aura.h" 16 #include "chrome/browser/ui/views/ash/status_area_host_aura.h"
17 #include "ui/aura/env.h" 17 #include "ui/aura/env.h"
18 #include "ui/aura/aura_switches.h" 18 #include "ui/aura/aura_switches.h"
19 #include "ui/aura/root_window.h" 19 #include "ui/aura/root_window.h"
20 #include "ui/gfx/compositor/compositor_setup.h" 20 #include "ui/gfx/compositor/compositor_setup.h"
21 21
22 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
23 #include "base/chromeos/chromeos_version.h"
23 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h" 24 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h"
24 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h" 25 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h"
25 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h" 26 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h"
26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 27 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
27 #include "chrome/browser/chromeos/login/user_manager.h" 28 #include "chrome/browser/chromeos/login/user_manager.h"
28 #include "chrome/browser/chromeos/system/runtime_environment.h"
29 #endif 29 #endif
30 30
31 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() 31 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh()
32 : ChromeBrowserMainExtraParts() { 32 : ChromeBrowserMainExtraParts() {
33 } 33 }
34 34
35 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() { 35 void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
36 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
37 if (chromeos::system::runtime_environment::IsRunningOnChromeOS() || 37 if (base::chromeos::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()->IsUserLoggedIn()) 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
(...skipping 23 matching lines...) Expand all
71 // Add the status area buttons after Profile has been initialized. 71 // Add the status area buttons after Profile has been initialized.
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 ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 78 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
79 ash::Shell::DeleteInstance(); 79 ash::Shell::DeleteInstance();
80 } 80 }
OLDNEW
« no previous file with comments | « base/chromeos/chromeos_version.cc ('k') | chrome/browser/chromeos/audio/audio_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698