| 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/bitmap_uploader/bitmap_uploader.h" | 8 #include "components/bitmap_uploader/bitmap_uploader.h" |
| 9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
| 10 #include "components/mus/public/cpp/window_property.h" | 10 #include "components/mus/public/cpp/window_property.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 delegate_->OnWindowStateChanged(state); | 216 delegate_->OnWindowStateChanged(state); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void PlatformWindowMus::OnRequestClose(mus::Window* window) { | 219 void PlatformWindowMus::OnRequestClose(mus::Window* window) { |
| 220 delegate_->OnCloseRequest(); | 220 delegate_->OnCloseRequest(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 void PlatformWindowMus::OnWindowInputEvent( | 223 void PlatformWindowMus::OnWindowInputEvent( |
| 224 mus::Window* view, | 224 mus::Window* view, |
| 225 mus::mojom::EventPtr event, | 225 mus::mojom::EventPtr event, |
| 226 scoped_ptr<base::Closure>* ack_callback) { | 226 scoped_ptr<base::Callback<void(bool)>>* ack_callback) { |
| 227 // It's possible dispatching the event will spin a nested message loop. Ack | 227 // It's possible dispatching the event will spin a nested message loop. Ack |
| 228 // the callback now, otherwise we appear unresponsive for the life of the | 228 // the callback now, otherwise we appear unresponsive for the life of the |
| 229 // nested message loop. | 229 // nested message loop. |
| 230 (*ack_callback)->Run(); | 230 (*ack_callback)->Run(true); |
| 231 ack_callback->reset(); | 231 ack_callback->reset(); |
| 232 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); | 232 scoped_ptr<ui::Event> ui_event(event.To<scoped_ptr<ui::Event>>()); |
| 233 delegate_->DispatchEvent(ui_event.get()); | 233 delegate_->DispatchEvent(ui_event.get()); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace views | 236 } // namespace views |
| OLD | NEW |