| 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/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 // Install the custom factory first so that views::FocusManagers for Tray, | 465 // Install the custom factory first so that views::FocusManagers for Tray, |
| 466 // Launcher, and WallPaper could be created by the factory. | 466 // Launcher, and WallPaper could be created by the factory. |
| 467 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 467 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
| 468 | 468 |
| 469 env_filter_.reset(new views::corewm::CompoundEventFilter); | 469 env_filter_.reset(new views::corewm::CompoundEventFilter); |
| 470 AddPreTargetHandler(env_filter_.get()); | 470 AddPreTargetHandler(env_filter_.get()); |
| 471 | 471 |
| 472 // Env creates the compositor. Historically it seems to have been implicitly | 472 // Env creates the compositor. Historically it seems to have been implicitly |
| 473 // initialized first by the ActivationController, but now that FocusController | 473 // initialized first by the ActivationController, but now that FocusController |
| 474 // no longer does this we need to do it explicitly. | 474 // no longer does this we need to do it explicitly. |
| 475 aura::Env::GetInstance(); | 475 aura::Env::CreateInstance(); |
| 476 views::corewm::FocusController* focus_controller = | 476 views::corewm::FocusController* focus_controller = |
| 477 new views::corewm::FocusController(new wm::AshFocusRules); | 477 new views::corewm::FocusController(new wm::AshFocusRules); |
| 478 focus_client_.reset(focus_controller); | 478 focus_client_.reset(focus_controller); |
| 479 activation_client_ = focus_controller; | 479 activation_client_ = focus_controller; |
| 480 activation_client_->AddObserver(this); | 480 activation_client_->AddObserver(this); |
| 481 focus_cycler_.reset(new internal::FocusCycler()); | 481 focus_cycler_.reset(new internal::FocusCycler()); |
| 482 | 482 |
| 483 screen_position_controller_.reset(new internal::ScreenPositionController); | 483 screen_position_controller_.reset(new internal::ScreenPositionController); |
| 484 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory()); | 484 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory()); |
| 485 | 485 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 //////////////////////////////////////////////////////////////////////////////// | 963 //////////////////////////////////////////////////////////////////////////////// |
| 964 // Shell, aura::client::ActivationChangeObserver implementation: | 964 // Shell, aura::client::ActivationChangeObserver implementation: |
| 965 | 965 |
| 966 void Shell::OnWindowActivated(aura::Window* gained_active, | 966 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 967 aura::Window* lost_active) { | 967 aura::Window* lost_active) { |
| 968 if (gained_active) | 968 if (gained_active) |
| 969 target_root_window_ = gained_active->GetRootWindow(); | 969 target_root_window_ = gained_active->GetRootWindow(); |
| 970 } | 970 } |
| 971 | 971 |
| 972 } // namespace ash | 972 } // namespace ash |
| OLD | NEW |