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

Side by Side Diff: mojo/services/native_viewport/native_viewport_impl.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/native_viewport/native_viewport_impl.h" 5 #include "mojo/services/native_viewport/native_viewport_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 platform_viewport_->ReleaseCapture(); 111 platform_viewport_->ReleaseCapture();
112 break; 112 break;
113 default: 113 default:
114 break; 114 break;
115 } 115 }
116 116
117 if (waiting_for_event_ack_ && IsRateLimitedEventType(ui_event)) 117 if (waiting_for_event_ack_ && IsRateLimitedEventType(ui_event))
118 return false; 118 return false;
119 119
120 client()->OnEvent( 120 client()->OnEvent(
121 TypeConverter<EventPtr, ui::Event>::ConvertFrom(*ui_event), 121 Event::From(*ui_event),
122 base::Bind(&NativeViewportImpl::AckEvent, 122 base::Bind(&NativeViewportImpl::AckEvent, weak_factory_.GetWeakPtr()));
123 weak_factory_.GetWeakPtr()));
124 waiting_for_event_ack_ = true; 123 waiting_for_event_ack_ = true;
125 return false; 124 return false;
126 } 125 }
127 126
128 void NativeViewportImpl::OnDestroyed() { 127 void NativeViewportImpl::OnDestroyed() {
129 client()->OnDestroyed(); 128 client()->OnDestroyed();
130 } 129 }
131 130
132 void NativeViewportImpl::AckEvent() { 131 void NativeViewportImpl::AckEvent() {
133 waiting_for_event_ack_ = false; 132 waiting_for_event_ack_ = false;
134 } 133 }
135 134
136 } // namespace mojo 135 } // namespace mojo
137 136
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/html_document_view.cc ('k') | mojo/services/public/cpp/geometry/geometry_type_converters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698