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

Side by Side Diff: remoting/host/clipboard_mac.mm

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, 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
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/config_file_watcher.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/clipboard.h" 5 #include "remoting/host/clipboard.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 10 matching lines...) Expand all
21 // Clipboard polling interval in milliseconds. 21 // Clipboard polling interval in milliseconds.
22 const int64 kClipboardPollingIntervalMs = 500; 22 const int64 kClipboardPollingIntervalMs = 500;
23 23
24 } // namespace 24 } // namespace
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 class ClipboardMac : public Clipboard { 28 class ClipboardMac : public Clipboard {
29 public: 29 public:
30 ClipboardMac(); 30 ClipboardMac();
31 virtual ~ClipboardMac(); 31 ~ClipboardMac() override;
32 32
33 // Must be called on the UI thread. 33 // Must be called on the UI thread.
34 virtual void Start( 34 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
35 scoped_ptr<protocol::ClipboardStub> client_clipboard) override; 35 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
36 virtual void InjectClipboardEvent( 36 void Stop() override;
37 const protocol::ClipboardEvent& event) override;
38 virtual void Stop() override;
39 37
40 private: 38 private:
41 void CheckClipboardForChanges(); 39 void CheckClipboardForChanges();
42 40
43 scoped_ptr<protocol::ClipboardStub> client_clipboard_; 41 scoped_ptr<protocol::ClipboardStub> client_clipboard_;
44 scoped_ptr<base::RepeatingTimer<ClipboardMac> > clipboard_polling_timer_; 42 scoped_ptr<base::RepeatingTimer<ClipboardMac> > clipboard_polling_timer_;
45 NSInteger current_change_count_; 43 NSInteger current_change_count_;
46 44
47 DISALLOW_COPY_AND_ASSIGN(ClipboardMac); 45 DISALLOW_COPY_AND_ASSIGN(ClipboardMac);
48 }; 46 };
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 event.set_mime_type(kMimeTypeTextUtf8); 112 event.set_mime_type(kMimeTypeTextUtf8);
115 event.set_data(base::SysNSStringToUTF8(data)); 113 event.set_data(base::SysNSStringToUTF8(data));
116 client_clipboard_->InjectClipboardEvent(event); 114 client_clipboard_->InjectClipboardEvent(event);
117 } 115 }
118 116
119 scoped_ptr<Clipboard> Clipboard::Create() { 117 scoped_ptr<Clipboard> Clipboard::Create() {
120 return make_scoped_ptr(new ClipboardMac()); 118 return make_scoped_ptr(new ClipboardMac());
121 } 119 }
122 120
123 } // namespace remoting 121 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.h ('k') | remoting/host/config_file_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698