OLD | NEW |
---|---|
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/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 #include "ui/views/widget/widget.h" | 93 #include "ui/views/widget/widget.h" |
94 | 94 |
95 #if !defined(OS_MACOSX) | 95 #if !defined(OS_MACOSX) |
96 #include "ash/accelerators/accelerator_controller.h" | 96 #include "ash/accelerators/accelerator_controller.h" |
97 #include "ash/accelerators/accelerator_filter.h" | 97 #include "ash/accelerators/accelerator_filter.h" |
98 #include "ash/accelerators/nested_dispatcher_controller.h" | 98 #include "ash/accelerators/nested_dispatcher_controller.h" |
99 #endif | 99 #endif |
100 | 100 |
101 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
102 #include "ash/display/output_configurator_animation.h" | 102 #include "ash/display/output_configurator_animation.h" |
103 #include "base/chromeos/chromeos_version.h" | |
Daniel Erat
2012/09/10 23:16:45
nit: are you using this?
mazda
2012/09/11 00:45:09
No. Removed, thanks.
| |
103 #include "base/message_pump_aurax11.h" | 104 #include "base/message_pump_aurax11.h" |
104 #include "chromeos/display/output_configurator.h" | 105 #include "chromeos/display/output_configurator.h" |
105 #endif // defined(OS_CHROMEOS) | 106 #endif // defined(OS_CHROMEOS) |
106 | 107 |
107 namespace ash { | 108 namespace ash { |
108 | 109 |
109 namespace { | 110 namespace { |
110 | 111 |
111 using aura::Window; | 112 using aura::Window; |
112 using views::Widget; | 113 using views::Widget; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
365 focus_manager_.reset(new aura::FocusManager); | 366 focus_manager_.reset(new aura::FocusManager); |
366 activation_controller_.reset( | 367 activation_controller_.reset( |
367 new internal::ActivationController(focus_manager_.get())); | 368 new internal::ActivationController(focus_manager_.get())); |
368 | 369 |
369 screen_position_controller_.reset(new internal::ScreenPositionController); | 370 screen_position_controller_.reset(new internal::ScreenPositionController); |
370 display_controller_.reset(new DisplayController); | 371 display_controller_.reset(new DisplayController); |
371 display_controller_->InitPrimaryDisplay(); | 372 display_controller_->InitPrimaryDisplay(); |
372 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow(); | 373 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow(); |
373 active_root_window_ = root_window; | 374 active_root_window_ = root_window; |
374 | 375 |
376 cursor_manager_.SetDeviceScaleFactor( | |
377 root_window->AsRootWindowHostDelegate()->GetDeviceScaleFactor()); | |
378 | |
375 #if !defined(OS_MACOSX) | 379 #if !defined(OS_MACOSX) |
376 nested_dispatcher_controller_.reset(new NestedDispatcherController); | 380 nested_dispatcher_controller_.reset(new NestedDispatcherController); |
377 accelerator_controller_.reset(new AcceleratorController); | 381 accelerator_controller_.reset(new AcceleratorController); |
378 #endif | 382 #endif |
379 shell_context_menu_.reset(new internal::ShellContextMenu); | 383 shell_context_menu_.reset(new internal::ShellContextMenu); |
380 | 384 |
381 // The order in which event filters are added is significant. | 385 // The order in which event filters are added is significant. |
382 DCHECK(!GetEnvEventFilterCount()); | 386 DCHECK(!GetEnvEventFilterCount()); |
383 user_activity_detector_.reset(new UserActivityDetector); | 387 user_activity_detector_.reset(new UserActivityDetector); |
384 AddEnvEventFilter(user_activity_detector_.get()); | 388 AddEnvEventFilter(user_activity_detector_.get()); |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
769 } | 773 } |
770 | 774 |
771 void Shell::ShowCursor(bool visible) { | 775 void Shell::ShowCursor(bool visible) { |
772 RootWindowList root_windows = GetAllRootWindows(); | 776 RootWindowList root_windows = GetAllRootWindows(); |
773 for (RootWindowList::iterator iter = root_windows.begin(); | 777 for (RootWindowList::iterator iter = root_windows.begin(); |
774 iter != root_windows.end(); ++iter) | 778 iter != root_windows.end(); ++iter) |
775 (*iter)->ShowCursor(visible); | 779 (*iter)->ShowCursor(visible); |
776 } | 780 } |
777 | 781 |
778 } // namespace ash | 782 } // namespace ash |
OLD | NEW |