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

Side by Side Diff: remoting/host/event_executor_mac.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, 2 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/event_executor_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "remoting/host/event_executor.h" 5 #include "remoting/host/event_executor.h"
6 6
7 #include <ApplicationServices/ApplicationServices.h> 7 #include <ApplicationServices/ApplicationServices.h>
8 #include <Carbon/Carbon.h> 8 #include <Carbon/Carbon.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 } 225 }
226 226
227 void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) { 227 void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) {
228 if (event.has_x() && event.has_y()) { 228 if (event.has_x() && event.has_y()) {
229 // TODO(wez): Checking the validity of the MouseEvent should be done in core 229 // TODO(wez): Checking the validity of the MouseEvent should be done in core
230 // cross-platform code, not here! 230 // cross-platform code, not here!
231 // TODO(wez): This code assumes that MouseEvent(0,0) (top-left of client vie w) 231 // TODO(wez): This code assumes that MouseEvent(0,0) (top-left of client vie w)
232 // corresponds to local (0,0) (top-left of primary monitor). That won't in 232 // corresponds to local (0,0) (top-left of primary monitor). That won't in
233 // general be true on multi-monitor systems, though. 233 // general be true on multi-monitor systems, though.
234 gfx::Size size = capturer_->size_most_recent(); 234 SkISize size = capturer_->size_most_recent();
235 if (event.x() >= 0 || event.y() >= 0 || 235 if (event.x() >= 0 || event.y() >= 0 ||
236 event.x() < size.width() || event.y() < size.height()) { 236 event.x() < size.width() || event.y() < size.height()) {
237 VLOG(3) << "Moving mouse to " << event.x() << "," << event.y(); 237 VLOG(3) << "Moving mouse to " << event.x() << "," << event.y();
238 last_x_ = event.x(); 238 last_x_ = event.x();
239 last_y_ = event.y(); 239 last_y_ = event.y();
240 } else { 240 } else {
241 VLOG(1) << "Invalid mouse position " << event.x() << "," << event.y(); 241 VLOG(1) << "Invalid mouse position " << event.x() << "," << event.y();
242 } 242 }
243 } 243 }
244 if (event.has_button() && event.has_button_down()) { 244 if (event.has_button() && event.has_button_down()) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 279 }
280 280
281 } // namespace 281 } // namespace
282 282
283 EventExecutor* EventExecutor::Create(MessageLoop* message_loop, 283 EventExecutor* EventExecutor::Create(MessageLoop* message_loop,
284 Capturer* capturer) { 284 Capturer* capturer) {
285 return new EventExecutorMac(message_loop, capturer); 285 return new EventExecutorMac(message_loop, capturer);
286 } 286 }
287 287
288 } // namespace remoting 288 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/event_executor_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698