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

Side by Side Diff: remoting/host/chromeos/clipboard_aura.cc

Issue 2888733002: Adding ThreadChecker validation to d'tors for host classes (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | remoting/host/gcd_state_updater.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 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/chromeos/clipboard_aura.h" 5 #include "remoting/host/chromeos/clipboard_aura.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 12 matching lines...) Expand all
23 23
24 namespace remoting { 24 namespace remoting {
25 25
26 ClipboardAura::ClipboardAura() 26 ClipboardAura::ClipboardAura()
27 : current_change_count_(0), 27 : current_change_count_(0),
28 polling_interval_( 28 polling_interval_(
29 base::TimeDelta::FromMilliseconds(kClipboardPollingIntervalMs)) { 29 base::TimeDelta::FromMilliseconds(kClipboardPollingIntervalMs)) {
30 } 30 }
31 31
32 ClipboardAura::~ClipboardAura() { 32 ClipboardAura::~ClipboardAura() {
33 DCHECK(thread_checker_.CalledOnValidThread());
33 } 34 }
34 35
35 void ClipboardAura::Start( 36 void ClipboardAura::Start(
36 std::unique_ptr<protocol::ClipboardStub> client_clipboard) { 37 std::unique_ptr<protocol::ClipboardStub> client_clipboard) {
37 DCHECK(thread_checker_.CalledOnValidThread()); 38 DCHECK(thread_checker_.CalledOnValidThread());
38 39
39 client_clipboard_ = std::move(client_clipboard); 40 client_clipboard_ = std::move(client_clipboard);
40 41
41 // Aura doesn't provide a clipboard-changed notification. The only way to 42 // Aura doesn't provide a clipboard-changed notification. The only way to
42 // detect clipboard changes is by polling. 43 // detect clipboard changes is by polling.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 event.set_data(data); 90 event.set_data(data);
90 91
91 client_clipboard_->InjectClipboardEvent(event); 92 client_clipboard_->InjectClipboardEvent(event);
92 } 93 }
93 94
94 std::unique_ptr<Clipboard> Clipboard::Create() { 95 std::unique_ptr<Clipboard> Clipboard::Create() {
95 return base::WrapUnique(new ClipboardAura()); 96 return base::WrapUnique(new ClipboardAura());
96 } 97 }
97 98
98 } // namespace remoting 99 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/gcd_state_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698