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

Side by Side Diff: remoting/host/local_input_monitor_chromeos.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-gfx: . Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ui::EventType type = ui::EventTypeFromNative(event); 108 ui::EventType type = ui::EventTypeFromNative(event);
109 if (type == ui::ET_MOUSE_MOVED) { 109 if (type == ui::ET_MOUSE_MOVED) {
110 HandleMouseMove(event); 110 HandleMouseMove(event);
111 } else if (type == ui::ET_KEY_PRESSED) { 111 } else if (type == ui::ET_KEY_PRESSED) {
112 HandleKeyPressed(event); 112 HandleKeyPressed(event);
113 } 113 }
114 } 114 }
115 115
116 void LocalInputMonitorChromeos::Core::HandleMouseMove( 116 void LocalInputMonitorChromeos::Core::HandleMouseMove(
117 const ui::PlatformEvent& event) { 117 const ui::PlatformEvent& event) {
118 gfx::PointF mouse_position = ui::EventLocationFromNative(event); 118 auto mouse_position = gfx::PointF(ui::EventLocationFromNative(event));
119 mouse_position = point_transformer_->FromScreenCoordinates(mouse_position); 119 mouse_position = point_transformer_->FromScreenCoordinates(mouse_position);
120 120
121 caller_task_runner_->PostTask( 121 caller_task_runner_->PostTask(
122 FROM_HERE, 122 FROM_HERE,
123 base::Bind( 123 base::Bind(
124 &ClientSessionControl::OnLocalMouseMoved, client_session_control_, 124 &ClientSessionControl::OnLocalMouseMoved, client_session_control_,
125 webrtc::DesktopVector(mouse_position.x(), mouse_position.y()))); 125 webrtc::DesktopVector(mouse_position.x(), mouse_position.y())));
126 } 126 }
127 127
128 void LocalInputMonitorChromeos::Core::HandleKeyPressed( 128 void LocalInputMonitorChromeos::Core::HandleKeyPressed(
(...skipping 13 matching lines...) Expand all
142 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create( 142 scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create(
143 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, 143 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
144 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 144 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
145 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 145 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
146 base::WeakPtr<ClientSessionControl> client_session_control) { 146 base::WeakPtr<ClientSessionControl> client_session_control) {
147 return make_scoped_ptr(new LocalInputMonitorChromeos( 147 return make_scoped_ptr(new LocalInputMonitorChromeos(
148 caller_task_runner, input_task_runner, client_session_control)); 148 caller_task_runner, input_task_runner, client_session_control));
149 } 149 }
150 150
151 } // namespace remoting 151 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698