| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/aura/shell_port_classic.h" | 5 #include "ash/aura/shell_port_classic.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
| 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 35 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| 36 #include "ash/wm_display_observer.h" | 36 #include "ash/wm_display_observer.h" |
| 37 #include "ash/wm_window.h" | 37 #include "ash/wm_window.h" |
| 38 #include "base/memory/ptr_util.h" | 38 #include "base/memory/ptr_util.h" |
| 39 #include "ui/aura/env.h" | 39 #include "ui/aura/env.h" |
| 40 #include "ui/display/manager/display_manager.h" | 40 #include "ui/display/manager/display_manager.h" |
| 41 #include "ui/display/types/native_display_delegate.h" | 41 #include "ui/display/types/native_display_delegate.h" |
| 42 | 42 |
| 43 #if defined(USE_X11) | 43 #if defined(USE_X11) |
| 44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" | 44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_x11.h" |
| 45 #include "ui/display/manager/chromeos/x11/native_display_delegate_x11.h" | |
| 46 #endif | 45 #endif |
| 47 | 46 |
| 48 #if defined(USE_OZONE) | 47 #if defined(USE_OZONE) |
| 49 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" | 48 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" |
| 50 #include "ui/display/types/native_display_delegate.h" | 49 #include "ui/display/types/native_display_delegate.h" |
| 51 #include "ui/ozone/public/ozone_platform.h" | 50 #include "ui/ozone/public/ozone_platform.h" |
| 52 #endif | 51 #endif |
| 53 | 52 |
| 54 namespace ash { | 53 namespace ash { |
| 55 | 54 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 | 260 |
| 262 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { | 261 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { |
| 263 Shell::Get()->window_tree_host_manager()->InitHosts(); | 262 Shell::Get()->window_tree_host_manager()->InitHosts(); |
| 264 } | 263 } |
| 265 | 264 |
| 266 std::unique_ptr<display::NativeDisplayDelegate> | 265 std::unique_ptr<display::NativeDisplayDelegate> |
| 267 ShellPortClassic::CreateNativeDisplayDelegate() { | 266 ShellPortClassic::CreateNativeDisplayDelegate() { |
| 268 #if defined(USE_OZONE) | 267 #if defined(USE_OZONE) |
| 269 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); | 268 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); |
| 270 #else | 269 #else |
| 271 return base::MakeUnique<display::NativeDisplayDelegateX11>(); | 270 return nullptr; |
| 272 #endif | 271 #endif |
| 273 } | 272 } |
| 274 | 273 |
| 275 std::unique_ptr<AcceleratorController> | 274 std::unique_ptr<AcceleratorController> |
| 276 ShellPortClassic::CreateAcceleratorController() { | 275 ShellPortClassic::CreateAcceleratorController() { |
| 277 DCHECK(!accelerator_controller_delegate_); | 276 DCHECK(!accelerator_controller_delegate_); |
| 278 accelerator_controller_delegate_ = | 277 accelerator_controller_delegate_ = |
| 279 base::MakeUnique<AcceleratorControllerDelegateAura>(); | 278 base::MakeUnique<AcceleratorControllerDelegateAura>(); |
| 280 return base::MakeUnique<AcceleratorController>( | 279 return base::MakeUnique<AcceleratorController>( |
| 281 accelerator_controller_delegate_.get(), nullptr); | 280 accelerator_controller_delegate_.get(), nullptr); |
| 282 } | 281 } |
| 283 | 282 |
| 284 void ShellPortClassic::OnDisplayConfigurationChanging() { | 283 void ShellPortClassic::OnDisplayConfigurationChanging() { |
| 285 for (auto& observer : display_observers_) | 284 for (auto& observer : display_observers_) |
| 286 observer.OnDisplayConfigurationChanging(); | 285 observer.OnDisplayConfigurationChanging(); |
| 287 } | 286 } |
| 288 | 287 |
| 289 void ShellPortClassic::OnDisplayConfigurationChanged() { | 288 void ShellPortClassic::OnDisplayConfigurationChanged() { |
| 290 for (auto& observer : display_observers_) | 289 for (auto& observer : display_observers_) |
| 291 observer.OnDisplayConfigurationChanged(); | 290 observer.OnDisplayConfigurationChanged(); |
| 292 } | 291 } |
| 293 | 292 |
| 294 } // namespace ash | 293 } // namespace ash |
| OLD | NEW |