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