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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 new internal::RootWindowController(root_window); | 414 new internal::RootWindowController(root_window); |
415 root_window_controller->CreateContainers(); | 415 root_window_controller->CreateContainers(); |
416 | 416 |
417 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 417 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
418 | 418 |
419 if (command_line->HasSwitch(switches::kAshTouchHud)) { | 419 if (command_line->HasSwitch(switches::kAshTouchHud)) { |
420 touch_observer_hud_.reset(new internal::TouchObserverHUD); | 420 touch_observer_hud_.reset(new internal::TouchObserverHUD); |
421 AddEnvEventFilter(touch_observer_hud_.get()); | 421 AddEnvEventFilter(touch_observer_hud_.get()); |
422 } | 422 } |
423 | 423 |
| 424 if (internal::DisplayController::IsExtendedDesktopEnabled()) { |
| 425 mouse_cursor_filter_.reset( |
| 426 new internal::MouseCursorEventFilter(display_controller_.get())); |
| 427 AddEnvEventFilter(mouse_cursor_filter_.get()); |
| 428 } |
| 429 |
424 // Create Controllers that may need root window. | 430 // Create Controllers that may need root window. |
425 // TODO(oshima): Move as many controllers before creating | 431 // TODO(oshima): Move as many controllers before creating |
426 // RootWindowController as possible. | 432 // RootWindowController as possible. |
427 stacking_controller_.reset(new internal::StackingController); | 433 stacking_controller_.reset(new internal::StackingController); |
428 visibility_controller_.reset(new internal::VisibilityController); | 434 visibility_controller_.reset(new internal::VisibilityController); |
429 drag_drop_controller_.reset(new internal::DragDropController); | 435 drag_drop_controller_.reset(new internal::DragDropController); |
430 if (delegate_.get()) | 436 if (delegate_.get()) |
431 user_action_client_.reset(delegate_->CreateUserActionClient()); | 437 user_action_client_.reset(delegate_->CreateUserActionClient()); |
432 window_modality_controller_.reset(new internal::WindowModalityController); | 438 window_modality_controller_.reset(new internal::WindowModalityController); |
433 AddEnvEventFilter(window_modality_controller_.get()); | 439 AddEnvEventFilter(window_modality_controller_.get()); |
434 | 440 |
435 magnification_controller_.reset( | 441 magnification_controller_.reset( |
436 internal::MagnificationController::CreateInstance()); | 442 internal::MagnificationController::CreateInstance()); |
437 | 443 |
438 if (internal::DisplayController::IsExtendedDesktopEnabled()) { | |
439 mouse_cursor_filter_.reset( | |
440 new internal::MouseCursorEventFilter(display_controller_.get())); | |
441 AddEnvEventFilter(mouse_cursor_filter_.get()); | |
442 } | |
443 | |
444 high_contrast_controller_.reset(new HighContrastController); | 444 high_contrast_controller_.reset(new HighContrastController); |
445 video_detector_.reset(new VideoDetector); | 445 video_detector_.reset(new VideoDetector); |
446 window_cycle_controller_.reset( | 446 window_cycle_controller_.reset( |
447 new WindowCycleController(activation_controller_.get())); | 447 new WindowCycleController(activation_controller_.get())); |
448 | 448 |
449 tooltip_controller_.reset(new internal::TooltipController( | 449 tooltip_controller_.reset(new internal::TooltipController( |
450 drag_drop_controller_.get())); | 450 drag_drop_controller_.get())); |
451 AddEnvEventFilter(tooltip_controller_.get()); | 451 AddEnvEventFilter(tooltip_controller_.get()); |
452 | 452 |
453 InitRootWindowController(root_window_controller); | 453 InitRootWindowController(root_window_controller); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 } | 779 } |
780 | 780 |
781 void Shell::ShowCursor(bool visible) { | 781 void Shell::ShowCursor(bool visible) { |
782 RootWindowList root_windows = GetAllRootWindows(); | 782 RootWindowList root_windows = GetAllRootWindows(); |
783 for (RootWindowList::iterator iter = root_windows.begin(); | 783 for (RootWindowList::iterator iter = root_windows.begin(); |
784 iter != root_windows.end(); ++iter) | 784 iter != root_windows.end(); ++iter) |
785 (*iter)->ShowCursor(visible); | 785 (*iter)->ShowCursor(visible); |
786 } | 786 } |
787 | 787 |
788 } // namespace ash | 788 } // namespace ash |
OLD | NEW |