| 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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); | 556 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_); |
| 557 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) | 557 if (!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)) |
| 558 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); | 558 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_); |
| 559 display_controller_.reset(new DisplayController); | 559 display_controller_.reset(new DisplayController); |
| 560 #if defined(OS_CHROMEOS) && defined(USE_X11) | 560 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 561 bool is_panel_fitting_disabled = | 561 bool is_panel_fitting_disabled = |
| 562 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( | 562 content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( |
| 563 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); | 563 gpu::GPU_FEATURE_TYPE_PANEL_FITTING); |
| 564 | 564 |
| 565 output_configurator_->Init(!is_panel_fitting_disabled); | 565 output_configurator_->Init(!is_panel_fitting_disabled); |
| 566 periodic_metrics_recorder_.reset(new PeriodicMetricsRecorder); |
| 566 | 567 |
| 567 base::MessagePumpX11::Current()->AddDispatcherForRootWindow( | 568 base::MessagePumpX11::Current()->AddDispatcherForRootWindow( |
| 568 output_configurator()); | 569 output_configurator()); |
| 569 // We can't do this with a root window listener because XI_HierarchyChanged | 570 // We can't do this with a root window listener because XI_HierarchyChanged |
| 570 // messages don't have a target window. | 571 // messages don't have a target window. |
| 571 base::MessagePumpX11::Current()->AddObserver(output_configurator()); | 572 base::MessagePumpX11::Current()->AddObserver(output_configurator()); |
| 572 #endif // defined(OS_CHROMEOS) | 573 #endif // defined(OS_CHROMEOS) |
| 573 | 574 |
| 574 #if defined(OS_CHROMEOS) | 575 #if defined(OS_CHROMEOS) |
| 575 internal::PowerStatus::Initialize(); | 576 internal::PowerStatus::Initialize(); |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 //////////////////////////////////////////////////////////////////////////////// | 990 //////////////////////////////////////////////////////////////////////////////// |
| 990 // Shell, aura::client::ActivationChangeObserver implementation: | 991 // Shell, aura::client::ActivationChangeObserver implementation: |
| 991 | 992 |
| 992 void Shell::OnWindowActivated(aura::Window* gained_active, | 993 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 993 aura::Window* lost_active) { | 994 aura::Window* lost_active) { |
| 994 if (gained_active) | 995 if (gained_active) |
| 995 target_root_window_ = gained_active->GetRootWindow(); | 996 target_root_window_ = gained_active->GetRootWindow(); |
| 996 } | 997 } |
| 997 | 998 |
| 998 } // namespace ash | 999 } // namespace ash |
| OLD | NEW |