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

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

Issue 9701002: Aura/ash split: Split the extra parts into ash and aura parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to trunk to try again 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
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_aura.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 "chrome/browser/ui/views/ash/brightness_controller_chromeos.h" 23 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h"
24 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h" 24 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h"
25 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h" 25 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h"
26 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 26 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
27 #include "chrome/browser/chromeos/login/user_manager.h" 27 #include "chrome/browser/chromeos/login/user_manager.h"
28 #include "chrome/browser/chromeos/system/runtime_environment.h" 28 #include "chrome/browser/chromeos/system/runtime_environment.h"
29 #endif 29 #endif
30 30
31 ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura() 31 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh()
32 : ChromeBrowserMainExtraParts() { 32 : ChromeBrowserMainExtraParts() {
33 } 33 }
34 34
35 void ChromeBrowserMainExtraPartsAura::PreProfileInit() { 35 void ChromeBrowserMainExtraPartsAsh::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()->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 }
(...skipping 14 matching lines...) Expand all
60 shell->accelerator_controller()->SetImeControlDelegate( 60 shell->accelerator_controller()->SetImeControlDelegate(
61 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); 61 scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
62 shell->accelerator_controller()->SetVolumeControlDelegate( 62 shell->accelerator_controller()->SetVolumeControlDelegate(
63 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass()); 63 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass());
64 #endif 64 #endif
65 65
66 // Make sure the singleton ScreenOrientationListener object is created. 66 // Make sure the singleton ScreenOrientationListener object is created.
67 ScreenOrientationListener::GetInstance(); 67 ScreenOrientationListener::GetInstance();
68 } 68 }
69 69
70 void ChromeBrowserMainExtraPartsAura::PostProfileInit() { 70 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
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 ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { 78 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
79 ash::Shell::DeleteInstance(); 79 ash::Shell::DeleteInstance();
80 aura::Env::DeleteInstance();
81 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_extra_parts_ash.h ('k') | chrome/browser/chrome_browser_main_extra_parts_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698