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 #ifndef CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 5 #ifndef CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
6 #define CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 6 #define CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void AttachSurfaceOnCompositorThread( | 52 void AttachSurfaceOnCompositorThread( |
53 std::unique_ptr<mus::WindowSurfaceBinding> surface_binding); | 53 std::unique_ptr<mus::WindowSurfaceBinding> surface_binding); |
54 | 54 |
55 void CreateWindowTreeConnectionOnCompositorThread( | 55 void CreateWindowTreeConnectionOnCompositorThread( |
56 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request); | 56 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request); |
57 | 57 |
58 void OnConnectionLostOnMainThread(); | 58 void OnConnectionLostOnMainThread(); |
59 | 59 |
60 void OnWindowInputEventOnMainThread( | 60 void OnWindowInputEventOnMainThread( |
61 std::unique_ptr<blink::WebInputEvent> web_event, | 61 std::unique_ptr<blink::WebInputEvent> web_event, |
62 const base::Callback<void(bool)>& ack); | 62 const base::Callback<void(mus::mojom::EventResult)>& ack); |
63 | 63 |
64 void OnWindowInputEventAckOnMainThread(const base::Callback<void(bool)>& ack, | 64 void OnWindowInputEventAckOnMainThread( |
65 bool handled); | 65 const base::Callback<void(mus::mojom::EventResult)>& ack, |
| 66 mus::mojom::EventResult result); |
66 | 67 |
67 // WindowTreeDelegate implementation: | 68 // WindowTreeDelegate implementation: |
68 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 69 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
69 void OnEmbed(mus::Window* root) override; | 70 void OnEmbed(mus::Window* root) override; |
70 | 71 |
71 // InputEventHandler implementation: | 72 // InputEventHandler implementation: |
72 void OnWindowInputEvent( | 73 void OnWindowInputEvent( |
73 mus::Window* window, | 74 mus::Window* window, |
74 const ui::Event& event, | 75 const ui::Event& event, |
75 std::unique_ptr<base::Callback<void(bool)>>* ack_callback) override; | 76 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* |
| 77 ack_callback) override; |
76 | 78 |
77 const int routing_id_; | 79 const int routing_id_; |
78 mus::Window* root_; | 80 mus::Window* root_; |
79 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 81 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
80 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 82 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
81 InputHandlerManager* const input_handler_manager_; | 83 InputHandlerManager* const input_handler_manager_; |
82 std::unique_ptr<mus::WindowSurfaceBinding> window_surface_binding_; | 84 std::unique_ptr<mus::WindowSurfaceBinding> window_surface_binding_; |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); | 86 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); |
85 }; | 87 }; |
86 | 88 |
87 } // namespace content | 89 } // namespace content |
88 | 90 |
89 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 91 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
OLD | NEW |