| 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 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 if (!display_initialized) | 821 if (!display_initialized) |
| 822 display_manager_->InitDefaultDisplay(); | 822 display_manager_->InitDefaultDisplay(); |
| 823 | 823 |
| 824 // Install the custom factory first so that views::FocusManagers for Tray, | 824 // Install the custom factory first so that views::FocusManagers for Tray, |
| 825 // Shelf, and WallPaper could be created by the factory. | 825 // Shelf, and WallPaper could be created by the factory. |
| 826 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 826 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
| 827 | 827 |
| 828 // Env creates the compositor. Historically it seems to have been implicitly | 828 // Env creates the compositor. Historically it seems to have been implicitly |
| 829 // initialized first by the ActivationController, but now that FocusController | 829 // initialized first by the ActivationController, but now that FocusController |
| 830 // no longer does this we need to do it explicitly. | 830 // no longer does this we need to do it explicitly. |
| 831 aura::Env::CreateInstance(); | 831 aura::Env::CreateInstance(true); |
| 832 | 832 |
| 833 // The WindowModalityController needs to be at the front of the input event | 833 // The WindowModalityController needs to be at the front of the input event |
| 834 // pretarget handler list to ensure that it processes input events when modal | 834 // pretarget handler list to ensure that it processes input events when modal |
| 835 // windows are active. | 835 // windows are active. |
| 836 window_modality_controller_.reset( | 836 window_modality_controller_.reset( |
| 837 new ::wm::WindowModalityController(this)); | 837 new ::wm::WindowModalityController(this)); |
| 838 | 838 |
| 839 AddPreTargetHandler(this); | 839 AddPreTargetHandler(this); |
| 840 | 840 |
| 841 env_filter_.reset(new ::wm::CompoundEventFilter); | 841 env_filter_.reset(new ::wm::CompoundEventFilter); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1116 //////////////////////////////////////////////////////////////////////////////// | 1116 //////////////////////////////////////////////////////////////////////////////// |
| 1117 // Shell, aura::client::ActivationChangeObserver implementation: | 1117 // Shell, aura::client::ActivationChangeObserver implementation: |
| 1118 | 1118 |
| 1119 void Shell::OnWindowActivated(aura::Window* gained_active, | 1119 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 1120 aura::Window* lost_active) { | 1120 aura::Window* lost_active) { |
| 1121 if (gained_active) | 1121 if (gained_active) |
| 1122 target_root_window_ = gained_active->GetRootWindow(); | 1122 target_root_window_ = gained_active->GetRootWindow(); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 } // namespace ash | 1125 } // namespace ash |
| OLD | NEW |