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

Side by Side Diff: components/mus/public/cpp/input_event_handler.h

Issue 1749323002: Update WindowTree::OnWindowInputEventAck to include handled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missing Component Build DEPS Created 4 years, 9 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 | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | 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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_INPUT_EVENT_HANDLER_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_INPUT_EVENT_HANDLER_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_INPUT_EVENT_HANDLER_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_INPUT_EVENT_HANDLER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "components/mus/public/interfaces/input_events.mojom.h" 9 #include "components/mus/public/interfaces/input_events.mojom.h"
10 10
11 namespace mus { 11 namespace mus {
12 12
13 class Window; 13 class Window;
14 14
15 // Responsible for processing input events for mus::Window. 15 // Responsible for processing input events for mus::Window.
16 class InputEventHandler { 16 class InputEventHandler {
17 public: 17 public:
18 // The event handler can asynchronously ack the event by taking ownership of 18 // The event handler can asynchronously ack the event by taking ownership of
19 // the |ack_callback|. If the handler does not take ownership of the callback, 19 // the |ack_callback|. The callback takes a bool representing whether the
20 // then WindowTreeClientImpl will ack the event. 20 // handler has consumed the event. If the handler does not take ownership of
21 virtual void OnWindowInputEvent(Window* target, 21 // the callback, then WindowTreeClientImpl will ack the event as not consumed.
22 mojom::EventPtr event, 22 virtual void OnWindowInputEvent(
23 scoped_ptr<base::Closure>* ack_callback) = 0; 23 Window* target,
24 mojom::EventPtr event,
25 scoped_ptr<base::Callback<void(bool)>>* ack_callback) = 0;
26
24 protected: 27 protected:
25 virtual ~InputEventHandler() {} 28 virtual ~InputEventHandler() {}
26 }; 29 };
27 30
28 } // namespace mus 31 } // namespace mus
29 32
30 #endif // COMPONENTS_MUS_PUBLIC_CPP_INPUT_EVENT_HANDLER_H_ 33 #endif // COMPONENTS_MUS_PUBLIC_CPP_INPUT_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/public/cpp/lib/window_tree_client_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698