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

Side by Side Diff: ash/shell.cc

Issue 200643005: Read and expose accelerometer values from cros-ec-accel trigger. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't bind to AccelerometerReader, post to standalone function with scoped_refptr to data structure. Created 6 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 "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"
11 #include "ash/accelerators/accelerator_filter.h" 11 #include "ash/accelerators/accelerator_filter.h"
12 #include "ash/accelerators/focus_manager_factory.h" 12 #include "ash/accelerators/focus_manager_factory.h"
13 #include "ash/accelerators/nested_dispatcher_controller.h" 13 #include "ash/accelerators/nested_dispatcher_controller.h"
14 #include "ash/accelerometer/accelerometer_controller.h"
14 #include "ash/ash_switches.h" 15 #include "ash/ash_switches.h"
15 #include "ash/autoclick/autoclick_controller.h" 16 #include "ash/autoclick/autoclick_controller.h"
16 #include "ash/desktop_background/desktop_background_controller.h" 17 #include "ash/desktop_background/desktop_background_controller.h"
17 #include "ash/desktop_background/desktop_background_view.h" 18 #include "ash/desktop_background/desktop_background_view.h"
18 #include "ash/desktop_background/user_wallpaper_delegate.h" 19 #include "ash/desktop_background/user_wallpaper_delegate.h"
19 #include "ash/display/cursor_window_controller.h" 20 #include "ash/display/cursor_window_controller.h"
20 #include "ash/display/display_controller.h" 21 #include "ash/display/display_controller.h"
21 #include "ash/display/display_manager.h" 22 #include "ash/display/display_manager.h"
22 #include "ash/display/event_transformation_handler.h" 23 #include "ash/display/event_transformation_handler.h"
23 #include "ash/display/mouse_cursor_event_filter.h" 24 #include "ash/display/mouse_cursor_event_filter.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 600
600 //////////////////////////////////////////////////////////////////////////////// 601 ////////////////////////////////////////////////////////////////////////////////
601 // Shell, private: 602 // Shell, private:
602 603
603 Shell::Shell(ShellDelegate* delegate) 604 Shell::Shell(ShellDelegate* delegate)
604 : target_root_window_(NULL), 605 : target_root_window_(NULL),
605 scoped_target_root_window_(NULL), 606 scoped_target_root_window_(NULL),
606 delegate_(delegate), 607 delegate_(delegate),
607 window_positioner_(new WindowPositioner), 608 window_positioner_(new WindowPositioner),
608 activation_client_(NULL), 609 activation_client_(NULL),
610 accelerometer_controller_(new AccelerometerController()),
609 #if defined(OS_CHROMEOS) 611 #if defined(OS_CHROMEOS)
610 output_configurator_(new ui::OutputConfigurator()), 612 output_configurator_(new ui::OutputConfigurator()),
611 #endif // defined(OS_CHROMEOS) 613 #endif // defined(OS_CHROMEOS)
612 native_cursor_manager_(new AshNativeCursorManager), 614 native_cursor_manager_(new AshNativeCursorManager),
613 cursor_manager_( 615 cursor_manager_(
614 scoped_ptr< ::wm::NativeCursorManager>(native_cursor_manager_)), 616 scoped_ptr< ::wm::NativeCursorManager>(native_cursor_manager_)),
615 simulate_modal_window_open_for_testing_(false), 617 simulate_modal_window_open_for_testing_(false),
616 is_touch_hud_projection_enabled_(false) { 618 is_touch_hud_projection_enabled_(false) {
617 DCHECK(delegate_.get()); 619 DCHECK(delegate_.get());
618 gpu_support_.reset(delegate_->CreateGPUSupport()); 620 gpu_support_.reset(delegate_->CreateGPUSupport());
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 //////////////////////////////////////////////////////////////////////////////// 1122 ////////////////////////////////////////////////////////////////////////////////
1121 // Shell, aura::client::ActivationChangeObserver implementation: 1123 // Shell, aura::client::ActivationChangeObserver implementation:
1122 1124
1123 void Shell::OnWindowActivated(aura::Window* gained_active, 1125 void Shell::OnWindowActivated(aura::Window* gained_active,
1124 aura::Window* lost_active) { 1126 aura::Window* lost_active) {
1125 if (gained_active) 1127 if (gained_active)
1126 target_root_window_ = gained_active->GetRootWindow(); 1128 target_root_window_ = gained_active->GetRootWindow();
1127 } 1129 }
1128 1130
1129 } // namespace ash 1131 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698