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

Unified Diff: remoting/host/input_injector_win.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/input_injector_mac.cc ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/input_injector_win.cc
diff --git a/remoting/host/input_injector_win.cc b/remoting/host/input_injector_win.cc
index 2d1524f9b01b11637d669ddf74f6ad095350302b..ebdf8efbccd293f50077e8b99ee40e5777655e89 100644
--- a/remoting/host/input_injector_win.cc
+++ b/remoting/host/input_injector_win.cc
@@ -14,9 +14,6 @@
#include "remoting/base/util.h"
#include "remoting/host/clipboard.h"
#include "remoting/proto/event.pb.h"
-// SkSize.h assumes that stdint.h-style types are already defined.
-#include "third_party/skia/include/core/SkSize.h"
-#include "third_party/skia/include/core/SkTypes.h"
#include "ui/events/keycodes/dom4/keycode_converter.h"
namespace remoting {
@@ -224,13 +221,13 @@ void InputInjectorWin::Core::HandleMouse(const MouseEvent& event) {
input.mi.dy = event.delta_y();
input.mi.dwFlags |= MOUSEEVENTF_MOVE | MOUSEEVENTF_VIRTUALDESK;
} else if (event.has_x() && event.has_y()) {
- SkISize screen_size(SkISize::Make(GetSystemMetrics(SM_CXVIRTUALSCREEN),
- GetSystemMetrics(SM_CYVIRTUALSCREEN)));
- if ((screen_size.width() > 1) && (screen_size.height() > 1)) {
- int x = std::max(0, std::min(screen_size.width(), event.x()));
- int y = std::max(0, std::min(screen_size.height(), event.y()));
- input.mi.dx = static_cast<int>((x * 65535) / (screen_size.width() - 1));
- input.mi.dy = static_cast<int>((y * 65535) / (screen_size.height() - 1));
+ int width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
+ int height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
+ if (width > 1 && height > 1) {
+ int x = std::max(0, std::min(width, event.x()));
+ int y = std::max(0, std::min(height, event.y()));
+ input.mi.dx = static_cast<int>((x * 65535) / (width - 1));
+ input.mi.dy = static_cast<int>((y * 65535) / (height - 1));
input.mi.dwFlags |=
MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_VIRTUALDESK;
}
« no previous file with comments | « remoting/host/input_injector_mac.cc ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698