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

Unified Diff: chrome/browser/chrome_browser_main_extra_parts_aura.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main_extra_parts_aura.cc
diff --git a/chrome/browser/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
index 9dfce629ce530893afba3ac7db2bf9fb79b3e7f7..48db23e813e6d9c170346ea60dcdf2c35a2dd7aa 100644
--- a/chrome/browser/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
@@ -4,78 +4,12 @@
#include "chrome/browser/chrome_browser_main_extra_parts_aura.h"
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/ash_switches.h"
-#include "ash/shell.h"
-#include "base/command_line.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/browser/ui/views/ash/caps_lock_handler.h"
-#include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
-#include "chrome/browser/ui/views/ash/screen_orientation_listener.h"
-#include "chrome/browser/ui/views/ash/screenshot_taker.h"
-#include "chrome/browser/ui/views/ash/status_area_host_aura.h"
#include "ui/aura/env.h"
-#include "ui/aura/aura_switches.h"
-#include "ui/aura/root_window.h"
-#include "ui/gfx/compositor/compositor_setup.h"
-
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h"
-#include "chrome/browser/ui/views/ash/ime_controller_chromeos.h"
-#include "chrome/browser/ui/views/ash/volume_controller_chromeos.h"
-#include "chrome/browser/chromeos/input_method/input_method_manager.h"
-#include "chrome/browser/chromeos/login/user_manager.h"
-#include "chrome/browser/chromeos/system/runtime_environment.h"
-#endif
ChromeBrowserMainExtraPartsAura::ChromeBrowserMainExtraPartsAura()
: ChromeBrowserMainExtraParts() {
}
-void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
-#if defined(OS_CHROMEOS)
- if (chromeos::system::runtime_environment::IsRunningOnChromeOS() ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAuraHostWindowUseFullscreen)) {
- aura::RootWindow::set_use_fullscreen_host_window(true);
- aura::RootWindow::set_hide_host_cursor(true);
- // Hide the mouse cursor completely at boot.
- if (!chromeos::UserManager::Get()->IsUserLoggedIn())
- ash::Shell::set_initially_hide_cursor(true);
- }
-#endif
-
- // Shell takes ownership of ChromeShellDelegate.
- ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate);
- shell->accelerator_controller()->SetScreenshotDelegate(
- scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass());
-#if defined(OS_CHROMEOS)
- shell->accelerator_controller()->SetBrightnessControlDelegate(
- scoped_ptr<ash::BrightnessControlDelegate>(
- new BrightnessController).Pass());
- chromeos::input_method::XKeyboard* xkeyboard =
- chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard();
- shell->accelerator_controller()->SetCapsLockDelegate(
- scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler(xkeyboard)).Pass());
- shell->accelerator_controller()->SetImeControlDelegate(
- scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass());
- shell->accelerator_controller()->SetVolumeControlDelegate(
- scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass());
-#endif
-
- // Make sure the singleton ScreenOrientationListener object is created.
- ScreenOrientationListener::GetInstance();
-}
-
-void ChromeBrowserMainExtraPartsAura::PostProfileInit() {
- // Add the status area buttons after Profile has been initialized.
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- ash::switches::kAshUberTray)) {
- ChromeShellDelegate::instance()->status_area_host()->AddButtons();
- }
-}
-
void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() {
- ash::Shell::DeleteInstance();
aura::Env::DeleteInstance();
}
« no previous file with comments | « chrome/browser/chrome_browser_main_extra_parts_aura.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698