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 |
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 259 |
258 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { | 260 void ShellPortClassic::InitHosts(const ShellInitParams& init_params) { |
259 Shell::Get()->window_tree_host_manager()->InitHosts(); | 261 Shell::Get()->window_tree_host_manager()->InitHosts(); |
260 } | 262 } |
261 | 263 |
262 std::unique_ptr<display::NativeDisplayDelegate> | 264 std::unique_ptr<display::NativeDisplayDelegate> |
263 ShellPortClassic::CreateNativeDisplayDelegate() { | 265 ShellPortClassic::CreateNativeDisplayDelegate() { |
264 #if defined(USE_OZONE) | 266 #if defined(USE_OZONE) |
265 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); | 267 return ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); |
266 #else | 268 #else |
267 return nullptr; | 269 return base::MakeUnique<display::NativeDisplayDelegateX11>(); |
268 #endif | 270 #endif |
269 } | 271 } |
270 | 272 |
271 std::unique_ptr<AcceleratorController> | 273 std::unique_ptr<AcceleratorController> |
272 ShellPortClassic::CreateAcceleratorController() { | 274 ShellPortClassic::CreateAcceleratorController() { |
273 DCHECK(!accelerator_controller_delegate_); | 275 DCHECK(!accelerator_controller_delegate_); |
274 accelerator_controller_delegate_ = | 276 accelerator_controller_delegate_ = |
275 base::MakeUnique<AcceleratorControllerDelegateAura>(); | 277 base::MakeUnique<AcceleratorControllerDelegateAura>(); |
276 return base::MakeUnique<AcceleratorController>( | 278 return base::MakeUnique<AcceleratorController>( |
277 accelerator_controller_delegate_.get(), nullptr); | 279 accelerator_controller_delegate_.get(), nullptr); |
278 } | 280 } |
279 | 281 |
280 void ShellPortClassic::OnDisplayConfigurationChanging() { | 282 void ShellPortClassic::OnDisplayConfigurationChanging() { |
281 for (auto& observer : display_observers_) | 283 for (auto& observer : display_observers_) |
282 observer.OnDisplayConfigurationChanging(); | 284 observer.OnDisplayConfigurationChanging(); |
283 } | 285 } |
284 | 286 |
285 void ShellPortClassic::OnDisplayConfigurationChanged() { | 287 void ShellPortClassic::OnDisplayConfigurationChanged() { |
286 for (auto& observer : display_observers_) | 288 for (auto& observer : display_observers_) |
287 observer.OnDisplayConfigurationChanged(); | 289 observer.OnDisplayConfigurationChanged(); |
288 } | 290 } |
289 | 291 |
290 } // namespace ash | 292 } // namespace ash |
OLD | NEW |