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

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

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: file-move Created 8 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/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 "ash/wm/key_rewriter_event_filter.h" 10 #include "ash/wm/key_rewriter_event_filter.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
14 #include "chrome/browser/ui/views/ash/caps_lock_handler.h" 14 #include "chrome/browser/ui/views/ash/caps_lock_handler.h"
15 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" 15 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
16 #include "chrome/browser/ui/views/ash/key_rewriter.h" 16 #include "chrome/browser/ui/views/ash/key_rewriter.h"
17 #include "chrome/browser/ui/views/ash/screen_orientation_listener.h" 17 #include "chrome/browser/ui/views/ash/screen_orientation_listener.h"
18 #include "chrome/browser/ui/views/ash/screenshot_taker.h" 18 #include "chrome/browser/ui/views/ash/screenshot_taker.h"
19 #include "ui/aura/env.h" 19 #include "ui/aura/env.h"
20 #include "ui/aura/aura_switches.h" 20 #include "ui/aura/aura_switches.h"
21 #include "ui/aura/monitor_manager.h" 21 #include "ui/aura/monitor_manager.h"
22 #include "ui/aura/root_window.h" 22 #include "ui/aura/root_window.h"
23 #include "ui/gfx/compositor/compositor_setup.h" 23 #include "ui/gfx/compositor/compositor_setup.h"
24 24
25 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
26 #include "base/chromeos/chromeos_version.h" 26 #include "base/chromeos/chromeos_version.h"
27 #include "chrome/browser/chromeos/battery_status_provider_chromeos.h"
27 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h" 28 #include "chrome/browser/ui/views/ash/brightness_controller_chromeos.h"
28 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h" 29 #include "chrome/browser/ui/views/ash/ime_controller_chromeos.h"
29 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h" 30 #include "chrome/browser/ui/views/ash/volume_controller_chromeos.h"
30 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 31 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
31 #include "chrome/browser/chromeos/login/user_manager.h" 32 #include "chrome/browser/chromeos/login/user_manager.h"
32 #endif 33 #endif
33 34
34 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh() 35 ChromeBrowserMainExtraPartsAsh::ChromeBrowserMainExtraPartsAsh()
35 : ChromeBrowserMainExtraParts() { 36 : ChromeBrowserMainExtraParts() {
36 } 37 }
(...skipping 30 matching lines...) Expand all
67 shell->accelerator_controller()->SetVolumeControlDelegate( 68 shell->accelerator_controller()->SetVolumeControlDelegate(
68 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass()); 69 scoped_ptr<ash::VolumeControlDelegate>(new VolumeController).Pass());
69 70
70 if (!CommandLine::ForCurrentProcess()->HasSwitch( 71 if (!CommandLine::ForCurrentProcess()->HasSwitch(
71 switches::kDisableZeroBrowsersOpenForTests)) 72 switches::kDisableZeroBrowsersOpenForTests))
72 BrowserList::StartKeepAlive(); 73 BrowserList::StartKeepAlive();
73 #endif 74 #endif
74 75
75 // Make sure the singleton ScreenOrientationListener object is created. 76 // Make sure the singleton ScreenOrientationListener object is created.
76 ScreenOrientationListener::GetInstance(); 77 ScreenOrientationListener::GetInstance();
78
79 #if defined(OS_CHROMEOS)
80 // Make sure the singleton BatteryStatusProviderChromeos object is created.
81 BatteryStatusProviderChromeos::GetInstance();
82 #endif
77 } 83 }
78 84
79 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() { 85 void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
80 } 86 }
81 87
82 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 88 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
83 ash::Shell::DeleteInstance(); 89 ash::Shell::DeleteInstance();
84 } 90 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/battery_status_provider_chromeos.h » ('j') | content/common/battery_status_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698