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

Side by Side Diff: services/ui/input_manager/input_connection_impl.h

Issue 1776473005: Mozart: Implement basic input event dispatch with hit testing. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-7
Patch Set: 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_INPUT_MANAGER_INPUT_CONNECTION_IMPL_H_
6 #define SERVICES_UI_INPUT_MANAGER_INPUT_CONNECTION_IMPL_H_
7
8 #include "base/macros.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "mojo/services/ui/input/interfaces/input_connection.mojom.h"
12 #include "mojo/services/ui/views/interfaces/views.mojom.h"
13
14 namespace input_manager {
15
16 class InputAssociate;
17
18 // InputConnection implementation.
19 // Binds incoming requests to the relevant view token.
20 class InputConnectionImpl : public mojo::ui::InputConnection {
21 public:
22 InputConnectionImpl(
23 InputAssociate* associate,
24 mojo::ui::ViewTokenPtr view_token,
25 mojo::InterfaceRequest<mojo::ui::InputConnection> request);
26 ~InputConnectionImpl() override;
27
28 const mojo::ui::ViewToken* view_token() const { return view_token_.get(); }
29
30 // Delivers an event to a view.
31 void DeliverEvent(mojo::EventPtr event);
32
33 // |mojo::ui::InputConnection|
34 void SetListener(
35 mojo::InterfaceHandle<mojo::ui::InputListener> listener) override;
36
37 private:
38 void OnEventFinished(bool handled);
39
40 InputAssociate* const associate_;
41 mojo::ui::ViewTokenPtr view_token_;
42 mojo::ui::InputListenerPtr listener_;
43
44 mojo::Binding<mojo::ui::InputConnection> binding_;
45
46 DISALLOW_COPY_AND_ASSIGN(InputConnectionImpl);
47 };
48
49 } // namespace input_manager
50
51 #endif // SERVICES_UI_INPUT_MANAGER_INPUT_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « services/ui/input_manager/input_associate.cc ('k') | services/ui/input_manager/input_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698