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

Side by Side Diff: remoting/host/local_input_monitor_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/local_input_monitor_unittest.cc ('k') | remoting/host/remote_input_filter.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/local_input_monitor.h" 5 #include "remoting/host/local_input_monitor.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
14 #include "base/win/message_window.h" 14 #include "base/win/message_window.h"
15 #include "remoting/host/client_session_control.h" 15 #include "remoting/host/client_session_control.h"
16 #include "third_party/skia/include/core/SkPoint.h" 16 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
17 17
18 namespace remoting { 18 namespace remoting {
19 19
20 namespace { 20 namespace {
21 21
22 const wchar_t kWindowClassFormat[] = L"Chromoting_LocalInputMonitorWin_%p"; 22 const wchar_t kWindowClassFormat[] = L"Chromoting_LocalInputMonitorWin_%p";
23 23
24 // From the HID Usage Tables specification. 24 // From the HID Usage Tables specification.
25 const USHORT kGenericDesktopPage = 1; 25 const USHORT kGenericDesktopPage = 1;
26 const USHORT kMouseUsage = 2; 26 const USHORT kMouseUsage = 2;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 input->header.hDevice != NULL) { 191 input->header.hDevice != NULL) {
192 POINT position; 192 POINT position;
193 if (!GetCursorPos(&position)) { 193 if (!GetCursorPos(&position)) {
194 position.x = 0; 194 position.x = 0;
195 position.y = 0; 195 position.y = 0;
196 } 196 }
197 197
198 caller_task_runner_->PostTask( 198 caller_task_runner_->PostTask(
199 FROM_HERE, base::Bind(&ClientSessionControl::OnLocalMouseMoved, 199 FROM_HERE, base::Bind(&ClientSessionControl::OnLocalMouseMoved,
200 client_session_control_, 200 client_session_control_,
201 SkIPoint::Make(position.x, position.y))); 201 webrtc::DesktopVector(position.x, position.y)));
202 } 202 }
203 203
204 return DefRawInputProc(&input, 1, sizeof(RAWINPUTHEADER)); 204 return DefRawInputProc(&input, 1, sizeof(RAWINPUTHEADER));
205 } 205 }
206 206
207 bool LocalInputMonitorWin::Core::HandleMessage( 207 bool LocalInputMonitorWin::Core::HandleMessage(
208 UINT message, WPARAM wparam, LPARAM lparam, LRESULT* result) { 208 UINT message, WPARAM wparam, LPARAM lparam, LRESULT* result) {
209 switch (message) { 209 switch (message) {
210 case WM_CREATE: { 210 case WM_CREATE: {
211 // Register to receive raw mouse input. 211 // Register to receive raw mouse input.
(...skipping 27 matching lines...) Expand all
239 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 239 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
240 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 240 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
241 base::WeakPtr<ClientSessionControl> client_session_control) { 241 base::WeakPtr<ClientSessionControl> client_session_control) {
242 return scoped_ptr<LocalInputMonitor>( 242 return scoped_ptr<LocalInputMonitor>(
243 new LocalInputMonitorWin(caller_task_runner, 243 new LocalInputMonitorWin(caller_task_runner,
244 ui_task_runner, 244 ui_task_runner,
245 client_session_control)); 245 client_session_control));
246 } 246 }
247 247
248 } // namespace remoting 248 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/local_input_monitor_unittest.cc ('k') | remoting/host/remote_input_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698