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

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

Issue 13642007: Rewrite scoped_array<T> to scoped_ptr<T[]> in remoting/, Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Manually rewrite Win files. Created 7 years, 8 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/input_injector_linux.cc ('k') | remoting/host/plugin/host_script_object.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) 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"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 RID_INPUT, 167 RID_INPUT,
168 NULL, 168 NULL,
169 &size, 169 &size,
170 sizeof(RAWINPUTHEADER)); 170 sizeof(RAWINPUTHEADER));
171 if (result == -1) { 171 if (result == -1) {
172 LOG_GETLASTERROR(ERROR) << "GetRawInputData() failed"; 172 LOG_GETLASTERROR(ERROR) << "GetRawInputData() failed";
173 return 0; 173 return 0;
174 } 174 }
175 175
176 // Retrieve the input record itself. 176 // Retrieve the input record itself.
177 scoped_array<uint8> buffer(new uint8[size]); 177 scoped_ptr<uint8[]> buffer(new uint8[size]);
178 RAWINPUT* input = reinterpret_cast<RAWINPUT*>(buffer.get()); 178 RAWINPUT* input = reinterpret_cast<RAWINPUT*>(buffer.get());
179 result = GetRawInputData(input_handle, 179 result = GetRawInputData(input_handle,
180 RID_INPUT, 180 RID_INPUT,
181 buffer.get(), 181 buffer.get(),
182 &size, 182 &size,
183 sizeof(RAWINPUTHEADER)); 183 sizeof(RAWINPUTHEADER));
184 if (result == -1) { 184 if (result == -1) {
185 LOG_GETLASTERROR(ERROR) << "GetRawInputData() failed"; 185 LOG_GETLASTERROR(ERROR) << "GetRawInputData() failed";
186 return 0; 186 return 0;
187 } 187 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 240 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
241 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 241 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
242 base::WeakPtr<ClientSessionControl> client_session_control) { 242 base::WeakPtr<ClientSessionControl> client_session_control) {
243 return scoped_ptr<LocalInputMonitor>( 243 return scoped_ptr<LocalInputMonitor>(
244 new LocalInputMonitorWin(caller_task_runner, 244 new LocalInputMonitorWin(caller_task_runner,
245 ui_task_runner, 245 ui_task_runner,
246 client_session_control)); 246 client_session_control));
247 } 247 }
248 248
249 } // namespace remoting 249 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/input_injector_linux.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698