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

Unified Diff: mojo/services/view_manager/window_tree_host_impl.cc

Issue 474883003: Move focus from the view manager to the window manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/view_manager/window_tree_host_impl.h ('k') | mojo/services/window_manager/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/window_tree_host_impl.cc
diff --git a/mojo/services/view_manager/window_tree_host_impl.cc b/mojo/services/view_manager/window_tree_host_impl.cc
index e2d6747bd4179c26900c1dce91a027affd1d4b99..9f201b0845a6a45905710b4198d6f8791f04d8b0 100644
--- a/mojo/services/view_manager/window_tree_host_impl.cc
+++ b/mojo/services/view_manager/window_tree_host_impl.cc
@@ -69,10 +69,12 @@ WindowTreeHostImpl::WindowTreeHostImpl(
NativeViewportPtr viewport,
const gfx::Rect& bounds,
const Callback<void()>& compositor_created_callback,
- const Callback<void()>& native_viewport_closed_callback)
+ const Callback<void()>& native_viewport_closed_callback,
+ const Callback<void(EventPtr)>& event_received_callback)
: native_viewport_(viewport.Pass()),
compositor_created_callback_(compositor_created_callback),
native_viewport_closed_callback_(native_viewport_closed_callback),
+ event_received_callback_(event_received_callback),
bounds_(bounds) {
native_viewport_.set_client(this);
native_viewport_->Create(Rect::From(bounds));
@@ -185,10 +187,7 @@ void WindowTreeHostImpl::OnDestroyed(const mojo::Callback<void()>& callback) {
void WindowTreeHostImpl::OnEvent(EventPtr event,
const mojo::Callback<void()>& callback) {
- scoped_ptr<ui::Event> ui_event =
- TypeConverter<EventPtr, scoped_ptr<ui::Event> >::ConvertTo(event);
- if (ui_event)
- SendEventToProcessor(ui_event.get());
+ event_received_callback_.Run(event.Pass());
callback.Run();
};
« no previous file with comments | « mojo/services/view_manager/window_tree_host_impl.h ('k') | mojo/services/window_manager/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698