Chromium Code Reviews| 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 #include "ui/gfx/x/x11_types.h" // nogncheck | |
|
kylechar
2017/04/27 14:26:30
Is this include used?
sky
2017/04/27 15:09:53
It came from those in shell.cc. I'll see if the bo
| |
| 45 #endif | 47 #endif |
| 46 | 48 |
| 47 #if defined(USE_OZONE) | 49 #if defined(USE_OZONE) |
| 48 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone. h" | 50 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone. h" |
| 49 #include "ui/display/types/native_display_delegate.h" | 51 #include "ui/display/types/native_display_delegate.h" |
| 50 #include "ui/ozone/public/ozone_platform.h" | 52 #include "ui/ozone/public/ozone_platform.h" |
| 51 #endif | 53 #endif |
| 52 | 54 |
| 53 namespace ash { | 55 namespace ash { |
| 54 | 56 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 260 | 262 |
| 261 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { | 263 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { |
| 262 Shell::Get()->window_tree_host_manager()->InitHosts(); | 264 Shell::Get()->window_tree_host_manager()->InitHosts(); |
| 263 } | 265 } |
| 264 | 266 |
| 265 std::unique_ptr<display::NativeDisplayDelegate> | 267 std::unique_ptr<display::NativeDisplayDelegate> |
| 266 ShellPortClassic::CreateNativeDisplayDelegate() { | 268 ShellPortClassic::CreateNativeDisplayDelegate() { |
| 267 #if defined(USE_OZONE) | 269 #if defined(USE_OZONE) |
| 268 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); | 270 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); |
| 269 #else | 271 #else |
| 270 return nullptr; | 272 return base::MakeUnique<display::NativeDisplayDelegateX11>(); |
| 271 #endif | 273 #endif |
| 272 } | 274 } |
| 273 | 275 |
| 274 std::unique_ptr<AcceleratorController> | 276 std::unique_ptr<AcceleratorController> |
| 275 ShellPortClassic::CreateAcceleratorController() { | 277 ShellPortClassic::CreateAcceleratorController() { |
| 276 DCHECK(!accelerator_controller_delegate_); | 278 DCHECK(!accelerator_controller_delegate_); |
| 277 accelerator_controller_delegate_ = | 279 accelerator_controller_delegate_ = |
| 278 base::MakeUnique<AcceleratorControllerDelegateAura>(); | 280 base::MakeUnique<AcceleratorControllerDelegateAura>(); |
| 279 return base::MakeUnique<AcceleratorController>( | 281 return base::MakeUnique<AcceleratorController>( |
| 280 accelerator_controller_delegate_.get(), nullptr); | 282 accelerator_controller_delegate_.get(), nullptr); |
| 281 } | 283 } |
| 282 | 284 |
| 283 void ShellPortClassic::OnDisplayConfigurationChanging() { | 285 void ShellPortClassic::OnDisplayConfigurationChanging() { |
| 284 for (auto& observer : display_observers_) | 286 for (auto& observer : display_observers_) |
| 285 observer.OnDisplayConfigurationChanging(); | 287 observer.OnDisplayConfigurationChanging(); |
| 286 } | 288 } |
| 287 | 289 |
| 288 void ShellPortClassic::OnDisplayConfigurationChanged() { | 290 void ShellPortClassic::OnDisplayConfigurationChanged() { |
| 289 for (auto& observer : display_observers_) | 291 for (auto& observer : display_observers_) |
| 290 observer.OnDisplayConfigurationChanged(); | 292 observer.OnDisplayConfigurationChanged(); |
| 291 } | 293 } |
| 292 | 294 |
| 293 } // namespace ash | 295 } // namespace ash |
| OLD | NEW |