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" |
45 #endif | 46 #endif |
46 | 47 |
47 #if defined(USE_OZONE) | 48 #if defined(USE_OZONE) |
48 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" | 49 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" |
49 #include "ui/display/types/native_display_delegate.h" | 50 #include "ui/display/types/native_display_delegate.h" |
50 #include "ui/ozone/public/ozone_platform.h" | 51 #include "ui/ozone/public/ozone_platform.h" |
51 #endif | 52 #endif |
52 | 53 |
53 namespace ash { | 54 namespace ash { |
54 | 55 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 261 |
261 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { | 262 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { |
262 Shell::Get()->window_tree_host_manager()->InitHosts(); | 263 Shell::Get()->window_tree_host_manager()->InitHosts(); |
263 } | 264 } |
264 | 265 |
265 std::unique_ptr<display::NativeDisplayDelegate> | 266 std::unique_ptr<display::NativeDisplayDelegate> |
266 ShellPortClassic::CreateNativeDisplayDelegate() { | 267 ShellPortClassic::CreateNativeDisplayDelegate() { |
267 #if defined(USE_OZONE) | 268 #if defined(USE_OZONE) |
268 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); | 269 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); |
269 #else | 270 #else |
270 return nullptr; | 271 return base::MakeUnique<display::NativeDisplayDelegateX11>(); |
271 #endif | 272 #endif |
272 } | 273 } |
273 | 274 |
274 std::unique_ptr<AcceleratorController> | 275 std::unique_ptr<AcceleratorController> |
275 ShellPortClassic::CreateAcceleratorController() { | 276 ShellPortClassic::CreateAcceleratorController() { |
276 DCHECK(!accelerator_controller_delegate_); | 277 DCHECK(!accelerator_controller_delegate_); |
277 accelerator_controller_delegate_ = | 278 accelerator_controller_delegate_ = |
278 base::MakeUnique<AcceleratorControllerDelegateAura>(); | 279 base::MakeUnique<AcceleratorControllerDelegateAura>(); |
279 return base::MakeUnique<AcceleratorController>( | 280 return base::MakeUnique<AcceleratorController>( |
280 accelerator_controller_delegate_.get(), nullptr); | 281 accelerator_controller_delegate_.get(), nullptr); |
281 } | 282 } |
282 | 283 |
283 void ShellPortClassic::OnDisplayConfigurationChanging() { | 284 void ShellPortClassic::OnDisplayConfigurationChanging() { |
284 for (auto& observer : display_observers_) | 285 for (auto& observer : display_observers_) |
285 observer.OnDisplayConfigurationChanging(); | 286 observer.OnDisplayConfigurationChanging(); |
286 } | 287 } |
287 | 288 |
288 void ShellPortClassic::OnDisplayConfigurationChanged() { | 289 void ShellPortClassic::OnDisplayConfigurationChanged() { |
289 for (auto& observer : display_observers_) | 290 for (auto& observer : display_observers_) |
290 observer.OnDisplayConfigurationChanged(); | 291 observer.OnDisplayConfigurationChanged(); |
291 } | 292 } |
292 | 293 |
293 } // namespace ash | 294 } // namespace ash |
OLD | NEW |