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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 return Shell::Get()->display_manager()->IsInUnifiedMode(); | 105 return Shell::Get()->display_manager()->IsInUnifiedMode(); |
106 } | 106 } |
107 | 107 |
108 bool ShellPortClassic::IsInUnifiedModeIgnoreMirroring() const { | 108 bool ShellPortClassic::IsInUnifiedModeIgnoreMirroring() const { |
109 return Shell::Get() | 109 return Shell::Get() |
110 ->display_manager() | 110 ->display_manager() |
111 ->current_default_multi_display_mode() == | 111 ->current_default_multi_display_mode() == |
112 display::DisplayManager::UNIFIED; | 112 display::DisplayManager::UNIFIED; |
113 } | 113 } |
114 | 114 |
115 void ShellPortClassic::SetDisplayWorkAreaInsets(WmWindow* window, | 115 void ShellPortClassic::SetDisplayWorkAreaInsets(aura::Window* window, |
116 const gfx::Insets& insets) { | 116 const gfx::Insets& insets) { |
117 Shell::Get() | 117 Shell::Get() |
118 ->window_tree_host_manager() | 118 ->window_tree_host_manager() |
119 ->UpdateWorkAreaOfDisplayNearestWindow(window->aura_window(), insets); | 119 ->UpdateWorkAreaOfDisplayNearestWindow(window, insets); |
120 } | 120 } |
121 | 121 |
122 std::unique_ptr<display::TouchTransformSetter> | 122 std::unique_ptr<display::TouchTransformSetter> |
123 ShellPortClassic::CreateTouchTransformDelegate() { | 123 ShellPortClassic::CreateTouchTransformDelegate() { |
124 return base::MakeUnique<display::DefaultTouchTransformSetter>(); | 124 return base::MakeUnique<display::DefaultTouchTransformSetter>(); |
125 } | 125 } |
126 | 126 |
127 void ShellPortClassic::LockCursor() { | 127 void ShellPortClassic::LockCursor() { |
128 Shell::Get()->cursor_manager()->LockCursor(); | 128 Shell::Get()->cursor_manager()->LockCursor(); |
129 } | 129 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 ShellPortClassic::CreateWindowCycleEventFilter() { | 184 ShellPortClassic::CreateWindowCycleEventFilter() { |
185 return base::MakeUnique<WindowCycleEventFilterAura>(); | 185 return base::MakeUnique<WindowCycleEventFilterAura>(); |
186 } | 186 } |
187 | 187 |
188 std::unique_ptr<wm::TabletModeEventHandler> | 188 std::unique_ptr<wm::TabletModeEventHandler> |
189 ShellPortClassic::CreateTabletModeEventHandler() { | 189 ShellPortClassic::CreateTabletModeEventHandler() { |
190 return base::WrapUnique(new wm::TabletModeEventHandlerAura); | 190 return base::WrapUnique(new wm::TabletModeEventHandlerAura); |
191 } | 191 } |
192 | 192 |
193 std::unique_ptr<WorkspaceEventHandler> | 193 std::unique_ptr<WorkspaceEventHandler> |
194 ShellPortClassic::CreateWorkspaceEventHandler(WmWindow* workspace_window) { | 194 ShellPortClassic::CreateWorkspaceEventHandler(aura::Window* workspace_window) { |
195 return base::MakeUnique<WorkspaceEventHandlerAura>(workspace_window); | 195 return base::MakeUnique<WorkspaceEventHandlerAura>(workspace_window); |
196 } | 196 } |
197 | 197 |
198 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> | 198 std::unique_ptr<ScopedDisableInternalMouseAndKeyboard> |
199 ShellPortClassic::CreateScopedDisableInternalMouseAndKeyboard() { | 199 ShellPortClassic::CreateScopedDisableInternalMouseAndKeyboard() { |
200 #if defined(USE_X11) | 200 #if defined(USE_X11) |
201 return base::WrapUnique(new ScopedDisableInternalMouseAndKeyboardX11); | 201 return base::WrapUnique(new ScopedDisableInternalMouseAndKeyboardX11); |
202 #elif defined(USE_OZONE) | 202 #elif defined(USE_OZONE) |
203 return base::WrapUnique(new ScopedDisableInternalMouseAndKeyboardOzone); | 203 return base::WrapUnique(new ScopedDisableInternalMouseAndKeyboardOzone); |
204 #endif | 204 #endif |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 for (auto& observer : display_observers_) | 305 for (auto& observer : display_observers_) |
306 observer.OnDisplayConfigurationChanging(); | 306 observer.OnDisplayConfigurationChanging(); |
307 } | 307 } |
308 | 308 |
309 void ShellPortClassic::OnDisplayConfigurationChanged() { | 309 void ShellPortClassic::OnDisplayConfigurationChanged() { |
310 for (auto& observer : display_observers_) | 310 for (auto& observer : display_observers_) |
311 observer.OnDisplayConfigurationChanged(); | 311 observer.OnDisplayConfigurationChanged(); |
312 } | 312 } |
313 | 313 |
314 } // namespace ash | 314 } // namespace ash |
OLD | NEW |