| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // TODO(oshima): Move as many controllers before creating | 411 // TODO(oshima): Move as many controllers before creating |
| 412 // RootWindowController as possible. | 412 // RootWindowController as possible. |
| 413 stacking_controller_.reset(new internal::StackingController); | 413 stacking_controller_.reset(new internal::StackingController); |
| 414 visibility_controller_.reset(new internal::VisibilityController); | 414 visibility_controller_.reset(new internal::VisibilityController); |
| 415 drag_drop_controller_.reset(new internal::DragDropController); | 415 drag_drop_controller_.reset(new internal::DragDropController); |
| 416 if (delegate_.get()) | 416 if (delegate_.get()) |
| 417 user_action_client_.reset(delegate_->CreateUserActionClient()); | 417 user_action_client_.reset(delegate_->CreateUserActionClient()); |
| 418 window_modality_controller_.reset(new internal::WindowModalityController); | 418 window_modality_controller_.reset(new internal::WindowModalityController); |
| 419 AddEnvEventFilter(window_modality_controller_.get()); | 419 AddEnvEventFilter(window_modality_controller_.get()); |
| 420 | 420 |
| 421 magnification_controller_.reset( |
| 422 internal::MagnificationController::CreateInstance()); |
| 423 |
| 421 if (internal::MonitorController::IsExtendedDesktopEnabled()) { | 424 if (internal::MonitorController::IsExtendedDesktopEnabled()) { |
| 422 mouse_cursor_filter_.reset( | 425 mouse_cursor_filter_.reset( |
| 423 new internal::MouseCursorEventFilter(monitor_controller_.get())); | 426 new internal::MouseCursorEventFilter(monitor_controller_.get())); |
| 424 AddEnvEventFilter(mouse_cursor_filter_.get()); | 427 AddEnvEventFilter(mouse_cursor_filter_.get()); |
| 425 } | 428 } |
| 426 | 429 |
| 427 magnification_controller_.reset(new internal::MagnificationController); | |
| 428 high_contrast_controller_.reset(new HighContrastController); | 430 high_contrast_controller_.reset(new HighContrastController); |
| 429 video_detector_.reset(new VideoDetector); | 431 video_detector_.reset(new VideoDetector); |
| 430 window_cycle_controller_.reset(new WindowCycleController); | 432 window_cycle_controller_.reset(new WindowCycleController); |
| 431 | 433 |
| 432 InitRootWindowController(root_window_controller); | 434 InitRootWindowController(root_window_controller); |
| 433 | 435 |
| 434 // Initialize Primary RootWindow specific items. | 436 // Initialize Primary RootWindow specific items. |
| 435 status_area_widget_ = new internal::StatusAreaWidget(); | 437 status_area_widget_ = new internal::StatusAreaWidget(); |
| 436 status_area_widget_->CreateTrayViews(delegate_.get()); | 438 status_area_widget_->CreateTrayViews(delegate_.get()); |
| 437 status_area_widget_->Show(); | 439 status_area_widget_->Show(); |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 } | 744 } |
| 743 | 745 |
| 744 void Shell::ShowCursor(bool visible) { | 746 void Shell::ShowCursor(bool visible) { |
| 745 RootWindowList root_windows = GetAllRootWindows(); | 747 RootWindowList root_windows = GetAllRootWindows(); |
| 746 for (RootWindowList::iterator iter = root_windows.begin(); | 748 for (RootWindowList::iterator iter = root_windows.begin(); |
| 747 iter != root_windows.end(); ++iter) | 749 iter != root_windows.end(); ++iter) |
| 748 (*iter)->ShowCursor(visible); | 750 (*iter)->ShowCursor(visible); |
| 749 } | 751 } |
| 750 | 752 |
| 751 } // namespace ash | 753 } // namespace ash |
| OLD | NEW |