| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/views/mus/platform_window_mus.h" | 5 #include "ui/views/mus/platform_window_mus.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "components/mus/public/cpp/property_type_converters.h" | 8 #include "components/mus/public/cpp/property_type_converters.h" |
| 9 #include "components/mus/public/cpp/window_property.h" | 9 #include "components/mus/public/cpp/window_property.h" |
| 10 #include "components/mus/public/interfaces/window_manager.mojom.h" | 10 #include "components/mus/public/interfaces/window_manager.mojom.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 void PlatformWindowMus::OnRequestClose(mus::Window* window) { | 207 void PlatformWindowMus::OnRequestClose(mus::Window* window) { |
| 208 delegate_->OnCloseRequest(); | 208 delegate_->OnCloseRequest(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void PlatformWindowMus::OnWindowInputEvent( | 211 void PlatformWindowMus::OnWindowInputEvent( |
| 212 mus::Window* view, | 212 mus::Window* view, |
| 213 mus::mojom::EventPtr event, | 213 mus::mojom::EventPtr event, |
| 214 scoped_ptr<base::Closure>* ack_callback) { | 214 scoped_ptr<base::Closure>* ack_callback) { |
| 215 // It's possible dispatching the event will spin a nested message loop. Ack |
| 216 // the callback now, otherwise we appear unresponsive for the life of the |
| 217 // nested message loop. |
| 218 (*ack_callback)->Run(); |
| 219 ack_callback->reset(); |
| 215 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); | 220 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); |
| 216 delegate_->DispatchEvent(ui_event.get()); | 221 delegate_->DispatchEvent(ui_event.get()); |
| 217 } | 222 } |
| 218 | 223 |
| 219 } // namespace views | 224 } // namespace views |
| OLD | NEW |