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

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

Issue 1891413002: mash: Convert OnWindowInputEventAck to use an enum for handled status (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed a file Created 4 years, 8 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 | « ui/views/mus/platform_window_mus.h ('k') | 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/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
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 const ui::Event& event, 225 const ui::Event& event,
226 std::unique_ptr<base::Callback<void(bool)>>* ack_callback) { 226 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
227 ack_callback) {
227 // It's possible dispatching the event will spin a nested message loop. Ack 228 // 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 229 // the callback now, otherwise we appear unresponsive for the life of the
229 // nested message loop. 230 // nested message loop.
230 (*ack_callback)->Run(true); 231 (*ack_callback)->Run(mus::mojom::EventResult::HANDLED);
231 ack_callback->reset(); 232 ack_callback->reset();
232 // TODO(moshayedi): Avoid cloning after updating PlatformWindowDelegate to 233 // TODO(moshayedi): Avoid cloning after updating PlatformWindowDelegate to
233 // accept constant pointers. 234 // accept constant pointers.
234 delegate_->DispatchEvent(ui::Event::Clone(event).get()); 235 delegate_->DispatchEvent(ui::Event::Clone(event).get());
235 } 236 }
236 237
237 } // namespace views 238 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/platform_window_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698