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

Side by Side Diff: ash/shell.cc

Issue 822503003: Change AccelerometerReader to a Singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update new dependency Created 5 years, 11 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
« no previous file with comments | « ash/shell.h ('k') | ash/wm/maximize_mode/maximize_mode_controller.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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" 131 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
132 #include "ash/system/chromeos/power/power_event_observer.h" 132 #include "ash/system/chromeos/power/power_event_observer.h"
133 #include "ash/system/chromeos/power/power_status.h" 133 #include "ash/system/chromeos/power/power_status.h"
134 #include "ash/system/chromeos/power/video_activity_notifier.h" 134 #include "ash/system/chromeos/power/video_activity_notifier.h"
135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h" 135 #include "ash/system/chromeos/session/last_window_closed_logout_reminder.h"
136 #include "ash/system/chromeos/session/logout_confirmation_controller.h" 136 #include "ash/system/chromeos/session/logout_confirmation_controller.h"
137 #include "ash/touch/touch_transformer_controller.h" 137 #include "ash/touch/touch_transformer_controller.h"
138 #include "ash/virtual_keyboard_controller.h" 138 #include "ash/virtual_keyboard_controller.h"
139 #include "base/bind_helpers.h" 139 #include "base/bind_helpers.h"
140 #include "base/sys_info.h" 140 #include "base/sys_info.h"
141 #include "chromeos/accelerometer/accelerometer_reader.h"
142 #include "chromeos/dbus/dbus_thread_manager.h" 141 #include "chromeos/dbus/dbus_thread_manager.h"
143 #include "ui/chromeos/user_activity_power_manager_notifier.h" 142 #include "ui/chromeos/user_activity_power_manager_notifier.h"
144 #include "ui/display/chromeos/display_configurator.h" 143 #include "ui/display/chromeos/display_configurator.h"
145 #endif // defined(OS_CHROMEOS) 144 #endif // defined(OS_CHROMEOS)
146 145
147 namespace ash { 146 namespace ash {
148 147
149 namespace { 148 namespace {
150 149
151 using aura::Window; 150 using aura::Window;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 //////////////////////////////////////////////////////////////////////////////// 630 ////////////////////////////////////////////////////////////////////////////////
632 // Shell, private: 631 // Shell, private:
633 632
634 Shell::Shell(ShellDelegate* delegate) 633 Shell::Shell(ShellDelegate* delegate)
635 : target_root_window_(NULL), 634 : target_root_window_(NULL),
636 scoped_target_root_window_(NULL), 635 scoped_target_root_window_(NULL),
637 delegate_(delegate), 636 delegate_(delegate),
638 window_positioner_(new WindowPositioner), 637 window_positioner_(new WindowPositioner),
639 activation_client_(NULL), 638 activation_client_(NULL),
640 #if defined(OS_CHROMEOS) 639 #if defined(OS_CHROMEOS)
641 accelerometer_reader_(new chromeos::AccelerometerReader()),
642 display_configurator_(new ui::DisplayConfigurator()), 640 display_configurator_(new ui::DisplayConfigurator()),
643 #endif // defined(OS_CHROMEOS) 641 #endif // defined(OS_CHROMEOS)
644 native_cursor_manager_(new AshNativeCursorManager), 642 native_cursor_manager_(new AshNativeCursorManager),
645 cursor_manager_( 643 cursor_manager_(
646 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), 644 scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)),
647 simulate_modal_window_open_for_testing_(false), 645 simulate_modal_window_open_for_testing_(false),
648 is_touch_hud_projection_enabled_(false) { 646 is_touch_hud_projection_enabled_(false) {
649 DCHECK(delegate_.get()); 647 DCHECK(delegate_.get());
650 gpu_support_.reset(delegate_->CreateGPUSupport()); 648 gpu_support_.reset(delegate_->CreateGPUSupport());
651 display_manager_.reset(new DisplayManager); 649 display_manager_.reset(new DisplayManager);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 //////////////////////////////////////////////////////////////////////////////// 1165 ////////////////////////////////////////////////////////////////////////////////
1168 // Shell, aura::client::ActivationChangeObserver implementation: 1166 // Shell, aura::client::ActivationChangeObserver implementation:
1169 1167
1170 void Shell::OnWindowActivated(aura::Window* gained_active, 1168 void Shell::OnWindowActivated(aura::Window* gained_active,
1171 aura::Window* lost_active) { 1169 aura::Window* lost_active) {
1172 if (gained_active) 1170 if (gained_active)
1173 target_root_window_ = gained_active->GetRootWindow(); 1171 target_root_window_ = gained_active->GetRootWindow();
1174 } 1172 }
1175 1173
1176 } // namespace ash 1174 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/wm/maximize_mode/maximize_mode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698