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

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

Issue 667123002: Standardize usage of virtual/override/final in remoting/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/single_window_input_injector.h" 5 #include "remoting/host/single_window_input_injector.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/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
11 #include "base/mac/scoped_cftyperef.h" 11 #include "base/mac/scoped_cftyperef.h"
12 #include "remoting/proto/event.pb.h" 12 #include "remoting/proto/event.pb.h"
13 #include "third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.h " 13 #include "third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.h "
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 using protocol::ClipboardEvent; 17 using protocol::ClipboardEvent;
18 using protocol::KeyEvent; 18 using protocol::KeyEvent;
19 using protocol::TextEvent; 19 using protocol::TextEvent;
20 using protocol::MouseEvent; 20 using protocol::MouseEvent;
21 21
22 class SingleWindowInputInjectorMac : public SingleWindowInputInjector { 22 class SingleWindowInputInjectorMac : public SingleWindowInputInjector {
23 public: 23 public:
24 SingleWindowInputInjectorMac( 24 SingleWindowInputInjectorMac(
25 webrtc::WindowId window_id, 25 webrtc::WindowId window_id,
26 scoped_ptr<InputInjector> input_injector); 26 scoped_ptr<InputInjector> input_injector);
27 virtual ~SingleWindowInputInjectorMac(); 27 ~SingleWindowInputInjectorMac() override;
28 28
29 // InputInjector interface. 29 // InputInjector interface.
30 virtual void Start( 30 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
31 scoped_ptr<protocol::ClipboardStub> client_clipboard) override; 31 void InjectKeyEvent(const KeyEvent& event) override;
32 virtual void InjectKeyEvent(const KeyEvent& event) override; 32 void InjectTextEvent(const TextEvent& event) override;
33 virtual void InjectTextEvent(const TextEvent& event) override; 33 void InjectMouseEvent(const MouseEvent& event) override;
34 virtual void InjectMouseEvent(const MouseEvent& event) override; 34 void InjectClipboardEvent(const ClipboardEvent& event) override;
35 virtual void InjectClipboardEvent(const ClipboardEvent& event) override;
36 35
37 private: 36 private:
38 CGRect FindCGRectOfWindow(); 37 CGRect FindCGRectOfWindow();
39 38
40 CGWindowID window_id_; 39 CGWindowID window_id_;
41 scoped_ptr<InputInjector> input_injector_; 40 scoped_ptr<InputInjector> input_injector_;
42 41
43 DISALLOW_COPY_AND_ASSIGN(SingleWindowInputInjectorMac); 42 DISALLOW_COPY_AND_ASSIGN(SingleWindowInputInjectorMac);
44 }; 43 };
45 44
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 156
158 scoped_ptr<InputInjector> SingleWindowInputInjector::CreateForWindow( 157 scoped_ptr<InputInjector> SingleWindowInputInjector::CreateForWindow(
159 webrtc::WindowId window_id, 158 webrtc::WindowId window_id,
160 scoped_ptr<InputInjector> input_injector) { 159 scoped_ptr<InputInjector> input_injector) {
161 scoped_ptr<SingleWindowInputInjectorMac> injector( 160 scoped_ptr<SingleWindowInputInjectorMac> injector(
162 new SingleWindowInputInjectorMac(window_id, input_injector.Pass())); 161 new SingleWindowInputInjectorMac(window_id, input_injector.Pass()));
163 return injector.Pass(); 162 return injector.Pass();
164 } 163 }
165 164
166 } // namespace remoting 165 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/single_window_desktop_environment.cc ('k') | remoting/host/token_validator_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698