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

Side by Side Diff: content/renderer/mus/compositor_mus_connection.cc

Issue 1949823002: WIP: Eliminate event.target() usage from TrayEventFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: container delegate Created 4 years, 7 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 | « content/renderer/mus/compositor_mus_connection.h ('k') | mash/wm/root_window_controller.h » ('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 #include "content/renderer/mus/compositor_mus_connection.h" 5 #include "content/renderer/mus/compositor_mus_connection.h"
6 6
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "content/common/input/web_input_event_traits.h" 8 #include "content/common/input/web_input_event_traits.h"
9 #include "content/renderer/input/input_handler_manager.h" 9 #include "content/renderer/input/input_handler_manager.h"
10 #include "content/renderer/mus/render_widget_mus_connection.h" 10 #include "content/renderer/mus/render_widget_mus_connection.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void CompositorMusConnection::OnEmbed(mus::Window* root) { 109 void CompositorMusConnection::OnEmbed(mus::Window* root) {
110 DCHECK(compositor_task_runner_->BelongsToCurrentThread()); 110 DCHECK(compositor_task_runner_->BelongsToCurrentThread());
111 root_ = root; 111 root_ = root;
112 root_->set_input_event_handler(this); 112 root_->set_input_event_handler(this);
113 if (window_surface_binding_) { 113 if (window_surface_binding_) {
114 root->AttachSurface(mus::mojom::SurfaceType::DEFAULT, 114 root->AttachSurface(mus::mojom::SurfaceType::DEFAULT,
115 std::move(window_surface_binding_)); 115 std::move(window_surface_binding_));
116 } 116 }
117 } 117 }
118 118
119 void CompositorMusConnection::OnEventObserved(const ui::Event& event) { 119 void CompositorMusConnection::OnEventObserved(const ui::Event& event,
120 mus::Window* target) {
120 // Compositor does not use SetEventObserver(). 121 // Compositor does not use SetEventObserver().
121 } 122 }
122 123
123 void CompositorMusConnection::OnWindowInputEvent( 124 void CompositorMusConnection::OnWindowInputEvent(
124 mus::Window* window, 125 mus::Window* window,
125 const ui::Event& event, 126 const ui::Event& event,
126 std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback) { 127 std::unique_ptr<base::Callback<void(EventResult)>>* ack_callback) {
127 DCHECK(compositor_task_runner_->BelongsToCurrentThread()); 128 DCHECK(compositor_task_runner_->BelongsToCurrentThread());
128 // TODO(moshayedi): Convert ui::Event directly to blink::WebInputEvent. 129 // TODO(moshayedi): Convert ui::Event directly to blink::WebInputEvent.
129 std::unique_ptr<blink::WebInputEvent> web_event( 130 std::unique_ptr<blink::WebInputEvent> web_event(
(...skipping 20 matching lines...) Expand all
150 this, *ack_callback->get()); 151 this, *ack_callback->get());
151 ack_callback->reset(); 152 ack_callback->reset();
152 } 153 }
153 main_task_runner_->PostTask( 154 main_task_runner_->PostTask(
154 FROM_HERE, 155 FROM_HERE,
155 base::Bind(&CompositorMusConnection::OnWindowInputEventOnMainThread, this, 156 base::Bind(&CompositorMusConnection::OnWindowInputEventOnMainThread, this,
156 base::Passed(std::move(web_event)), ack)); 157 base::Passed(std::move(web_event)), ack));
157 } 158 }
158 159
159 } // namespace content 160 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/mus/compositor_mus_connection.h ('k') | mash/wm/root_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698