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

Unified Diff: remoting/host/client_session.cc

Issue 7992011: Move us fully from gfx:: over to skia types for consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for bad DEPS Created 9 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 | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 341606904f43fafa5fef2f96c183664bbf0fa5bf..36bb89cb5348cd09f3b29ccd12ae091f05701650 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -94,10 +94,10 @@ void ClientSession::InjectMouseEvent(const MouseEvent& event) {
// the event to lie within the current screen area. This is better than
// simply discarding the event, which might lose a button-up event at the
// end of a drag'n'drop (or cause other related problems).
- gfx::Point pos(event.x(), event.y());
- const gfx::Size& screen = capturer_->size_most_recent();
- pos.set_x(std::max(0, std::min(screen.width() - 1, pos.x())));
- pos.set_y(std::max(0, std::min(screen.height() - 1, pos.y())));
+ SkIPoint pos(SkIPoint::Make(event.x(), event.y()));
+ const SkISize& screen = capturer_->size_most_recent();
+ pos.setX(std::max(0, std::min(screen.width() - 1, pos.x())));
+ pos.setY(std::max(0, std::min(screen.height() - 1, pos.y())));
event_to_inject.set_x(pos.x());
event_to_inject.set_y(pos.y());
@@ -121,11 +121,11 @@ void ClientSession::OnDisconnected() {
authenticated_ = false;
}
-void ClientSession::LocalMouseMoved(const gfx::Point& mouse_pos) {
+void ClientSession::LocalMouseMoved(const SkIPoint& 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.
- std::list<gfx::Point>::iterator found_position =
+ std::list<SkIPoint>::iterator found_position =
std::find(injected_mouse_positions_.begin(),
injected_mouse_positions_.end(), mouse_pos);
if (found_position != injected_mouse_positions_.end()) {
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/client_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698