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

Unified Diff: remoting/host/input_injector_linux.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/host_window_proxy.cc ('k') | remoting/host/input_injector_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/input_injector_linux.cc
diff --git a/remoting/host/input_injector_linux.cc b/remoting/host/input_injector_linux.cc
index 94dcbd321e36d0518d8e31712eed5c3ecf1afffd..f6f80a27d94539f90a8be57f932ceb382033d84c 100644
--- a/remoting/host/input_injector_linux.cc
+++ b/remoting/host/input_injector_linux.cc
@@ -18,7 +18,7 @@
#include "remoting/base/logging.h"
#include "remoting/host/clipboard.h"
#include "remoting/proto/internal.pb.h"
-#include "third_party/skia/include/core/SkPoint.h"
+#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
#include "ui/events/keycodes/dom4/keycode_converter.h"
namespace remoting {
@@ -99,7 +99,7 @@ class InputInjectorLinux : public InputInjector {
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
std::set<int> pressed_keys_;
- SkIPoint latest_mouse_position_;
+ webrtc::DesktopVector latest_mouse_position_;
float wheel_ticks_x_;
float wheel_ticks_y_;
@@ -160,7 +160,7 @@ void InputInjectorLinux::Start(
InputInjectorLinux::Core::Core(
scoped_refptr<base::SingleThreadTaskRunner> task_runner)
: task_runner_(task_runner),
- latest_mouse_position_(SkIPoint::Make(-1, -1)),
+ latest_mouse_position_(-1, -1),
wheel_ticks_x_(0.0f),
wheel_ticks_y_(0.0f),
display_(XOpenDisplay(NULL)),
@@ -299,7 +299,7 @@ void InputInjectorLinux::Core::InjectMouseEvent(const MouseEvent& event) {
if (event.has_delta_x() &&
event.has_delta_y() &&
(event.delta_x() != 0 || event.delta_y() != 0)) {
- latest_mouse_position_ = SkIPoint::Make(-1, -1);
+ latest_mouse_position_.set(-1, -1);
VLOG(3) << "Moving mouse by " << event.delta_x() << "," << event.delta_y();
XTestFakeRelativeMotionEvent(display_,
event.delta_x(), event.delta_y(),
@@ -310,16 +310,16 @@ void InputInjectorLinux::Core::InjectMouseEvent(const MouseEvent& event) {
// a MotionNotify even if the mouse position hasn't changed, which confuses
// apps which assume MotionNotify implies movement. See crbug.com/138075.
bool inject_motion = true;
- SkIPoint new_mouse_position(SkIPoint::Make(event.x(), event.y()));
+ webrtc::DesktopVector new_mouse_position(
+ webrtc::DesktopVector(event.x(), event.y()));
if (event.has_button() && event.has_button_down() && !event.button_down()) {
- if (new_mouse_position == latest_mouse_position_)
+ if (new_mouse_position.equals(latest_mouse_position_))
inject_motion = false;
}
if (inject_motion) {
- latest_mouse_position_ =
- SkIPoint::Make(std::max(0, new_mouse_position.x()),
- std::max(0, new_mouse_position.y()));
+ latest_mouse_position_.set(std::max(0, new_mouse_position.x()),
+ std::max(0, new_mouse_position.y()));
VLOG(3) << "Moving mouse to " << latest_mouse_position_.x()
<< "," << latest_mouse_position_.y();
« no previous file with comments | « remoting/host/host_window_proxy.cc ('k') | remoting/host/input_injector_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698