| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/ws/window_tree.h" | 5 #include "components/mus/ws/window_tree.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 if (success) { | 1212 if (success) { |
| 1213 if (!state.is_null()) | 1213 if (!state.is_null()) |
| 1214 window->SetTextInputState(state.To<ui::TextInputState>()); | 1214 window->SetTextInputState(state.To<ui::TextInputState>()); |
| 1215 | 1215 |
| 1216 Display* display = GetDisplay(window); | 1216 Display* display = GetDisplay(window); |
| 1217 if (display) | 1217 if (display) |
| 1218 display->SetImeVisibility(window, visible); | 1218 display->SetImeVisibility(window, visible); |
| 1219 } | 1219 } |
| 1220 } | 1220 } |
| 1221 | 1221 |
| 1222 void WindowTree::OnWindowInputEventAck(uint32_t event_id, bool handled) { | 1222 void WindowTree::OnWindowInputEventAck(uint32_t event_id, |
| 1223 mojom::EventResult result) { |
| 1223 if (event_ack_id_ == 0 || event_id != event_ack_id_) { | 1224 if (event_ack_id_ == 0 || event_id != event_ack_id_) { |
| 1224 // TODO(sad): Something bad happened. Kill the client? | 1225 // TODO(sad): Something bad happened. Kill the client? |
| 1225 NOTIMPLEMENTED() << "Wrong event acked."; | 1226 NOTIMPLEMENTED() << "Wrong event acked."; |
| 1226 } | 1227 } |
| 1227 event_ack_id_ = 0; | 1228 event_ack_id_ = 0; |
| 1228 | 1229 |
| 1229 WindowManagerState* event_source_wms = event_source_wms_; | 1230 WindowManagerState* event_source_wms = event_source_wms_; |
| 1230 event_source_wms_ = nullptr; | 1231 event_source_wms_ = nullptr; |
| 1231 if (event_source_wms) | 1232 if (event_source_wms) |
| 1232 event_source_wms->OnEventAck(this, handled); | 1233 event_source_wms->OnEventAck(this, result); |
| 1233 | 1234 |
| 1234 if (!event_queue_.empty()) { | 1235 if (!event_queue_.empty()) { |
| 1235 DCHECK(!event_ack_id_); | 1236 DCHECK(!event_ack_id_); |
| 1236 ServerWindow* target = nullptr; | 1237 ServerWindow* target = nullptr; |
| 1237 scoped_ptr<ui::Event> event; | 1238 scoped_ptr<ui::Event> event; |
| 1238 do { | 1239 do { |
| 1239 scoped_ptr<TargetedEvent> targeted_event = | 1240 scoped_ptr<TargetedEvent> targeted_event = |
| 1240 std::move(event_queue_.front()); | 1241 std::move(event_queue_.front()); |
| 1241 event_queue_.pop(); | 1242 event_queue_.pop(); |
| 1242 target = targeted_event->target(); | 1243 target = targeted_event->target(); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 } | 1409 } |
| 1409 | 1410 |
| 1410 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( | 1411 bool WindowTree::IsWindowRootOfAnotherTreeForAccessPolicy( |
| 1411 const ServerWindow* window) const { | 1412 const ServerWindow* window) const { |
| 1412 WindowTree* tree = window_server_->GetTreeWithRoot(window); | 1413 WindowTree* tree = window_server_->GetTreeWithRoot(window); |
| 1413 return tree && tree != this; | 1414 return tree && tree != this; |
| 1414 } | 1415 } |
| 1415 | 1416 |
| 1416 } // namespace ws | 1417 } // namespace ws |
| 1417 } // namespace mus | 1418 } // namespace mus |
| OLD | NEW |