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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 delegate_->IsFirstRunAfterBoot()); | 530 delegate_->IsFirstRunAfterBoot()); |
531 | 531 |
532 if (command_line->HasSwitch(ash::switches::kAshDisableNewLockAnimations)) | 532 if (command_line->HasSwitch(ash::switches::kAshDisableNewLockAnimations)) |
533 lock_state_controller_.reset(new SessionStateControllerImpl); | 533 lock_state_controller_.reset(new SessionStateControllerImpl); |
534 else | 534 else |
535 lock_state_controller_.reset(new LockStateControllerImpl2); | 535 lock_state_controller_.reset(new LockStateControllerImpl2); |
536 power_button_controller_.reset(new PowerButtonController( | 536 power_button_controller_.reset(new PowerButtonController( |
537 lock_state_controller_.get())); | 537 lock_state_controller_.get())); |
538 AddShellObserver(lock_state_controller_.get()); | 538 AddShellObserver(lock_state_controller_.get()); |
539 | 539 |
| 540 drag_drop_controller_.reset(new internal::DragDropController); |
540 mouse_cursor_filter_.reset(new internal::MouseCursorEventFilter()); | 541 mouse_cursor_filter_.reset(new internal::MouseCursorEventFilter()); |
541 AddPreTargetHandler(mouse_cursor_filter_.get()); | 542 PrependPreTargetHandler(mouse_cursor_filter_.get()); |
542 | 543 |
543 // Create Controllers that may need root window. | 544 // Create Controllers that may need root window. |
544 // TODO(oshima): Move as many controllers before creating | 545 // TODO(oshima): Move as many controllers before creating |
545 // RootWindowController as possible. | 546 // RootWindowController as possible. |
546 visibility_controller_.reset(new AshVisibilityController); | 547 visibility_controller_.reset(new AshVisibilityController); |
547 drag_drop_controller_.reset(new internal::DragDropController); | |
548 user_action_client_.reset(delegate_->CreateUserActionClient()); | 548 user_action_client_.reset(delegate_->CreateUserActionClient()); |
549 window_modality_controller_.reset( | 549 window_modality_controller_.reset( |
550 new views::corewm::WindowModalityController); | 550 new views::corewm::WindowModalityController); |
551 AddPreTargetHandler(window_modality_controller_.get()); | 551 AddPreTargetHandler(window_modality_controller_.get()); |
552 | 552 |
553 magnification_controller_.reset( | 553 magnification_controller_.reset( |
554 MagnificationController::CreateInstance()); | 554 MagnificationController::CreateInstance()); |
555 | 555 |
556 partial_magnification_controller_.reset( | 556 partial_magnification_controller_.reset( |
557 new PartialMagnificationController()); | 557 new PartialMagnificationController()); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 //////////////////////////////////////////////////////////////////////////////// | 956 //////////////////////////////////////////////////////////////////////////////// |
957 // Shell, aura::client::ActivationChangeObserver implementation: | 957 // Shell, aura::client::ActivationChangeObserver implementation: |
958 | 958 |
959 void Shell::OnWindowActivated(aura::Window* gained_active, | 959 void Shell::OnWindowActivated(aura::Window* gained_active, |
960 aura::Window* lost_active) { | 960 aura::Window* lost_active) { |
961 if (gained_active) | 961 if (gained_active) |
962 active_root_window_ = gained_active->GetRootWindow(); | 962 active_root_window_ = gained_active->GetRootWindow(); |
963 } | 963 } |
964 | 964 |
965 } // namespace ash | 965 } // namespace ash |
OLD | NEW |