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/host/ash_window_tree_host_platform.h" | 5 #include "ash/host/ash_window_tree_host_platform.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/host/root_window_transformer.h" | 9 #include "ash/host/root_window_transformer.h" |
10 #include "ash/host/transformer_helper.h" | 10 #include "ash/host/transformer_helper.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 return this; | 68 return this; |
69 } | 69 } |
70 | 70 |
71 void AshWindowTreeHostPlatform::PrepareForShutdown() { | 71 void AshWindowTreeHostPlatform::PrepareForShutdown() { |
72 // Block the root window from dispatching events because it is weird for a | 72 // Block the root window from dispatching events because it is weird for a |
73 // ScreenPositionClient not to be attached to the root window and for | 73 // ScreenPositionClient not to be attached to the root window and for |
74 // ui::EventHandlers to be unable to convert the event's location to screen | 74 // ui::EventHandlers to be unable to convert the event's location to screen |
75 // coordinates. | 75 // coordinates. |
76 window()->SetEventTargeter( | 76 window()->SetEventTargeter( |
77 std::unique_ptr<ui::EventTargeter>(new ui::NullEventTargeter)); | 77 std::unique_ptr<ui::EventTargeter>(new ui::NullEventTargeter)); |
| 78 |
| 79 // Do anything platform specific necessary before shutdown (eg. stop |
| 80 // listening for configuration XEvents). |
| 81 platform_window()->PrepareForShutdown(); |
78 } | 82 } |
79 | 83 |
80 void AshWindowTreeHostPlatform::SetRootTransform( | 84 void AshWindowTreeHostPlatform::SetRootTransform( |
81 const gfx::Transform& transform) { | 85 const gfx::Transform& transform) { |
82 transformer_helper_.SetTransform(transform); | 86 transformer_helper_.SetTransform(transform); |
83 } | 87 } |
84 | 88 |
85 gfx::Transform AshWindowTreeHostPlatform::GetRootTransform() const { | 89 gfx::Transform AshWindowTreeHostPlatform::GetRootTransform() const { |
86 return transformer_helper_.GetTransform(); | 90 return transformer_helper_.GetTransform(); |
87 } | 91 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 #if defined(USE_OZONE) | 129 #if defined(USE_OZONE) |
126 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController()); | 130 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController()); |
127 | 131 |
128 // Temporarily pause tap-to-click when the cursor is hidden. | 132 // Temporarily pause tap-to-click when the cursor is hidden. |
129 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused( | 133 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused( |
130 state); | 134 state); |
131 #endif | 135 #endif |
132 } | 136 } |
133 | 137 |
134 } // namespace ash | 138 } // namespace ash |
OLD | NEW |