| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 #include "ui/views/focus/focus_manager_factory.h" | 106 #include "ui/views/focus/focus_manager_factory.h" |
| 107 #include "ui/views/widget/native_widget_aura.h" | 107 #include "ui/views/widget/native_widget_aura.h" |
| 108 #include "ui/views/widget/widget.h" | 108 #include "ui/views/widget/widget.h" |
| 109 | 109 |
| 110 #if defined(OS_CHROMEOS) | 110 #if defined(OS_CHROMEOS) |
| 111 #if defined(USE_X11) | 111 #if defined(USE_X11) |
| 112 #include "ash/ash_constants.h" | 112 #include "ash/ash_constants.h" |
| 113 #include "ash/display/display_change_observer_chromeos.h" | 113 #include "ash/display/display_change_observer_chromeos.h" |
| 114 #include "ash/display/display_error_observer_chromeos.h" | 114 #include "ash/display/display_error_observer_chromeos.h" |
| 115 #include "ash/display/output_configurator_animation.h" | 115 #include "ash/display/output_configurator_animation.h" |
| 116 #include "base/chromeos/chromeos_version.h" | |
| 117 #include "base/message_loop/message_pump_x11.h" | 116 #include "base/message_loop/message_pump_x11.h" |
| 117 #include "base/sys_info.h" |
| 118 #include "chromeos/display/output_configurator.h" | 118 #include "chromeos/display/output_configurator.h" |
| 119 #include "content/public/browser/gpu_data_manager.h" | 119 #include "content/public/browser/gpu_data_manager.h" |
| 120 #include "gpu/config/gpu_feature_type.h" | 120 #include "gpu/config/gpu_feature_type.h" |
| 121 #endif // defined(USE_X11) | 121 #endif // defined(USE_X11) |
| 122 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" | 122 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" |
| 123 #include "ash/system/chromeos/power/power_status.h" | 123 #include "ash/system/chromeos/power/power_status.h" |
| 124 #endif // defined(OS_CHROMEOS) | 124 #endif // defined(OS_CHROMEOS) |
| 125 | 125 |
| 126 namespace ash { | 126 namespace ash { |
| 127 | 127 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 void Shell::Init() { | 401 void Shell::Init() { |
| 402 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 402 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 403 | 403 |
| 404 delegate_->PreInit(); | 404 delegate_->PreInit(); |
| 405 bool display_initialized = false; | 405 bool display_initialized = false; |
| 406 #if defined(OS_CHROMEOS) && defined(USE_X11) | 406 #if defined(OS_CHROMEOS) && defined(USE_X11) |
| 407 output_configurator_animation_.reset( | 407 output_configurator_animation_.reset( |
| 408 new internal::OutputConfiguratorAnimation()); | 408 new internal::OutputConfiguratorAnimation()); |
| 409 output_configurator_->AddObserver(output_configurator_animation_.get()); | 409 output_configurator_->AddObserver(output_configurator_animation_.get()); |
| 410 if (base::chromeos::IsRunningOnChromeOS()) { | 410 if (base::SysInfo::IsRunningOnChromeOS()) { |
| 411 display_change_observer_.reset(new internal::DisplayChangeObserver); | 411 display_change_observer_.reset(new internal::DisplayChangeObserver); |
| 412 // Register |display_change_observer_| first so that the rest of | 412 // Register |display_change_observer_| first so that the rest of |
| 413 // observer gets invoked after the root windows are configured. | 413 // observer gets invoked after the root windows are configured. |
| 414 output_configurator_->AddObserver(display_change_observer_.get()); | 414 output_configurator_->AddObserver(display_change_observer_.get()); |
| 415 display_error_observer_.reset(new internal::DisplayErrorObserver()); | 415 display_error_observer_.reset(new internal::DisplayErrorObserver()); |
| 416 output_configurator_->AddObserver(display_error_observer_.get()); | 416 output_configurator_->AddObserver(display_error_observer_.get()); |
| 417 output_configurator_->set_state_controller(display_change_observer_.get()); | 417 output_configurator_->set_state_controller(display_change_observer_.get()); |
| 418 if (!command_line->HasSwitch(ash::switches::kAshDisableSoftwareMirroring)) | 418 if (!command_line->HasSwitch(ash::switches::kAshDisableSoftwareMirroring)) |
| 419 output_configurator_->set_mirroring_controller(display_manager_.get()); | 419 output_configurator_->set_mirroring_controller(display_manager_.get()); |
| 420 output_configurator_->Start( | 420 output_configurator_->Start( |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 //////////////////////////////////////////////////////////////////////////////// | 934 //////////////////////////////////////////////////////////////////////////////// |
| 935 // Shell, aura::client::ActivationChangeObserver implementation: | 935 // Shell, aura::client::ActivationChangeObserver implementation: |
| 936 | 936 |
| 937 void Shell::OnWindowActivated(aura::Window* gained_active, | 937 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 938 aura::Window* lost_active) { | 938 aura::Window* lost_active) { |
| 939 if (gained_active) | 939 if (gained_active) |
| 940 target_root_window_ = gained_active->GetRootWindow(); | 940 target_root_window_ = gained_active->GetRootWindow(); |
| 941 } | 941 } |
| 942 | 942 |
| 943 } // namespace ash | 943 } // namespace ash |
| OLD | NEW |