Chromium Code Reviews| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 223 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
| 224 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 224 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
| 225 display_controller_.reset(new DisplayController); | 225 display_controller_.reset(new DisplayController); |
| 226 #if defined(OS_CHROMEOS) && defined(USE_X11) | 226 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 227 bool is_panel_fitting_disabled = | 227 bool is_panel_fitting_disabled = |
| 228 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( | 228 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( |
| 229 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); | 229 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); |
| 230 | 230 |
| 231 output_configurator_->Init(!is_panel_fitting_disabled); | 231 output_configurator_->Init(!is_panel_fitting_disabled); |
| 232 | 232 |
| 233 base::MessagePumpX11::Current()->AddDispatcherForRootWindow( | 233 base::MessagePumpX11::Current()->AddDispatcherForRootWindow( |
|
Ben Goodger (Google)
2013/09/17 20:39:04
is this just the result of a rebase?
dnicoara
2013/09/17 21:01:27
Yes.
| |
| 234 output_configurator()); | 234 output_configurator()); |
| 235 // We can't do this with a root window listener because XI_HierarchyChanged | 235 // We can't do this with a root window listener because XI_HierarchyChanged |
| 236 // messages don't have a target window. | 236 // messages don't have a target window. |
| 237 base::MessagePumpX11::Current()->AddObserver(output_configurator()); | 237 base::MessagePumpX11::Current()->AddObserver(output_configurator()); |
| 238 #endif // defined(OS_CHROMEOS) | 238 #endif // defined(OS_CHROMEOS) |
| 239 AddPreTargetHandler(this); | 239 AddPreTargetHandler(this); |
| 240 | 240 |
| 241 #if defined(OS_CHROMEOS) | 241 #if defined(OS_CHROMEOS) |
| 242 internal::PowerStatus::Initialize(); | 242 internal::PowerStatus::Initialize(); |
| 243 #endif | 243 #endif |
| (...skipping 226 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 |