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

Unified Diff: mojo/services/window_manager/window_manager_app.cc

Issue 507173003: Change TypeConverter<X,Y>::ConvertFrom and ConvertTo into a single symmetric (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile for real Created 6 years, 3 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/surfaces/surfaces_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/window_manager/window_manager_app.cc
diff --git a/mojo/services/window_manager/window_manager_app.cc b/mojo/services/window_manager/window_manager_app.cc
index a6d57c9b6d219145c3f473c4604f2874f7b3da37..dd3fbdb9afddc25e6c706d9c72a592140ea29a5e 100644
--- a/mojo/services/window_manager/window_manager_app.cc
+++ b/mojo/services/window_manager/window_manager_app.cc
@@ -237,8 +237,7 @@ void WindowManagerApp::Embed(
}
void WindowManagerApp::DispatchEvent(EventPtr event) {
- scoped_ptr<ui::Event> ui_event =
- TypeConverter<EventPtr, scoped_ptr<ui::Event> >::ConvertTo(event);
+ scoped_ptr<ui::Event> ui_event = event.To<scoped_ptr<ui::Event> >();
if (ui_event)
window_tree_host_->SendEventToProcessor(ui_event.get());
}
@@ -301,9 +300,7 @@ void WindowManagerApp::CompositorContentsChanged(const SkBitmap& bitmap) {
void WindowManagerApp::OnEvent(ui::Event* event) {
aura::Window* window = static_cast<aura::Window*>(event->target());
- view_manager_->DispatchEvent(
- GetViewForWindow(window),
- TypeConverter<EventPtr, ui::Event>::ConvertFrom(*event));
+ view_manager_->DispatchEvent(GetViewForWindow(window), Event::From(*event));
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « mojo/services/surfaces/surfaces_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698