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

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

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/clipboard_win.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/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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 DISALLOW_COPY_AND_ASSIGN(ClipboardMac); 45 DISALLOW_COPY_AND_ASSIGN(ClipboardMac);
46 }; 46 };
47 47
48 ClipboardMac::ClipboardMac() : current_change_count_(0) { 48 ClipboardMac::ClipboardMac() : current_change_count_(0) {
49 } 49 }
50 50
51 ClipboardMac::~ClipboardMac() { 51 ClipboardMac::~ClipboardMac() {
52 // In it2me the destructor is not called in the same thread that the timer is 52 // In it2me the destructor is not called in the same thread that the timer is
53 // created. Thus the timer must have already been destroyed by now. 53 // created. Thus the timer must have already been destroyed by now.
54 DCHECK(clipboard_polling_timer_.get() == NULL); 54 DCHECK(clipboard_polling_timer_.get() == nullptr);
55 } 55 }
56 56
57 void ClipboardMac::Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) { 57 void ClipboardMac::Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) {
58 client_clipboard_.reset(client_clipboard.release()); 58 client_clipboard_.reset(client_clipboard.release());
59 59
60 // Synchronize local change-count with the pasteboard's. The change-count is 60 // Synchronize local change-count with the pasteboard's. The change-count is
61 // used to detect clipboard changes. 61 // used to detect clipboard changes.
62 current_change_count_ = [[NSPasteboard generalPasteboard] changeCount]; 62 current_change_count_ = [[NSPasteboard generalPasteboard] changeCount];
63 63
64 // OS X doesn't provide a clipboard-changed notification. The only way to 64 // OS X doesn't provide a clipboard-changed notification. The only way to
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 event.set_mime_type(kMimeTypeTextUtf8); 112 event.set_mime_type(kMimeTypeTextUtf8);
113 event.set_data(base::SysNSStringToUTF8(data)); 113 event.set_data(base::SysNSStringToUTF8(data));
114 client_clipboard_->InjectClipboardEvent(event); 114 client_clipboard_->InjectClipboardEvent(event);
115 } 115 }
116 116
117 scoped_ptr<Clipboard> Clipboard::Create() { 117 scoped_ptr<Clipboard> Clipboard::Create() {
118 return make_scoped_ptr(new ClipboardMac()); 118 return make_scoped_ptr(new ClipboardMac());
119 } 119 }
120 120
121 } // namespace remoting 121 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698