Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: ui/views/mus/platform_window_mus.cc

Issue 1571953003: Changes PlatformWindowMus to ack event callback before dispatching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698