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

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

Issue 65813002: mac: Prepare most test code for -Wunused-functions too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/host_main.cc ('k') | remoting/host/remoting_me2me_host.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/input_injector.h" 5 #include "remoting/host/input_injector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #include <Carbon/Carbon.h> 9 #include <Carbon/Carbon.h>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "ui/base/keycodes/keycode_converter.h" 25 #include "ui/base/keycodes/keycode_converter.h"
26 26
27 namespace remoting { 27 namespace remoting {
28 28
29 namespace { 29 namespace {
30 30
31 using protocol::ClipboardEvent; 31 using protocol::ClipboardEvent;
32 using protocol::KeyEvent; 32 using protocol::KeyEvent;
33 using protocol::MouseEvent; 33 using protocol::MouseEvent;
34 34
35 // skia/ext/skia_utils_mac.h only defines CGRectToSkRect().
36 SkIRect CGRectToSkIRect(const CGRect& rect) {
37 SkIRect result;
38 gfx::CGRectToSkRect(rect).round(&result);
39 return result;
40 }
41
42 // A class to generate events on Mac. 35 // A class to generate events on Mac.
43 class InputInjectorMac : public InputInjector { 36 class InputInjectorMac : public InputInjector {
44 public: 37 public:
45 explicit InputInjectorMac( 38 explicit InputInjectorMac(
46 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 39 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
47 virtual ~InputInjectorMac(); 40 virtual ~InputInjectorMac();
48 41
49 // ClipboardStub interface. 42 // ClipboardStub interface.
50 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; 43 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE;
51 44
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 278
286 } // namespace 279 } // namespace
287 280
288 scoped_ptr<InputInjector> InputInjector::Create( 281 scoped_ptr<InputInjector> InputInjector::Create(
289 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 282 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
290 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { 283 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
291 return scoped_ptr<InputInjector>(new InputInjectorMac(main_task_runner)); 284 return scoped_ptr<InputInjector>(new InputInjectorMac(main_task_runner));
292 } 285 }
293 286
294 } // namespace remoting 287 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_main.cc ('k') | remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698