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

Unified Diff: remoting/host/remote_input_filter.cc

Issue 112453002: Remove dependency on skia from remoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « remoting/host/remote_input_filter.h ('k') | remoting/host/remote_input_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remote_input_filter.cc
diff --git a/remoting/host/remote_input_filter.cc b/remoting/host/remote_input_filter.cc
index 002188e3a673c17da412080dca22f349aed75788..73e98988c2d850c84d83ebb1ac29a5527d9a9b74 100644
--- a/remoting/host/remote_input_filter.cc
+++ b/remoting/host/remote_input_filter.cc
@@ -4,8 +4,6 @@
#include "remoting/host/remote_input_filter.h"
-#include <algorithm>
-
#include "base/logging.h"
#include "remoting/proto/event.pb.h"
@@ -33,14 +31,18 @@ RemoteInputFilter::RemoteInputFilter(protocol::InputEventTracker* event_tracker)
RemoteInputFilter::~RemoteInputFilter() {
}
-void RemoteInputFilter::LocalMouseMoved(const SkIPoint& mouse_pos) {
+void RemoteInputFilter::LocalMouseMoved(
+ const webrtc::DesktopVector& mouse_pos) {
// If this is a genuine local input event (rather than an echo of a remote
// input event that we've just injected), then ignore remote inputs for a
// short time.
if (expect_local_echo_) {
- std::list<SkIPoint>::iterator found_position =
- std::find(injected_mouse_positions_.begin(),
- injected_mouse_positions_.end(), mouse_pos);
+ std::list<webrtc::DesktopVector>::iterator found_position =
+ injected_mouse_positions_.begin();
+ while (found_position != injected_mouse_positions_.end() &&
+ !mouse_pos.equals(*found_position)) {
+ ++found_position;
+ }
if (found_position != injected_mouse_positions_.end()) {
// Remove it from the list, and any positions that were added before it,
// if any. This is because the local input monitor is assumed to receive
@@ -77,7 +79,8 @@ void RemoteInputFilter::InjectMouseEvent(const protocol::MouseEvent& event) {
if (ShouldIgnoreInput())
return;
if (expect_local_echo_ && event.has_x() && event.has_y()) {
- injected_mouse_positions_.push_back(SkIPoint::Make(event.x(), event.y()));
+ injected_mouse_positions_.push_back(
+ webrtc::DesktopVector(event.x(), event.y()));
if (injected_mouse_positions_.size() > kNumRemoteMousePositions) {
VLOG(1) << "Injected mouse positions queue full.";
injected_mouse_positions_.pop_front();
« no previous file with comments | « remoting/host/remote_input_filter.h ('k') | remoting/host/remote_input_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698