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

Side by Side Diff: remoting/host/clipboard.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU Created 4 years, 8 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_mac.mm » ('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 #ifndef REMOTING_HOST_CLIPBOARD_H_ 5 #ifndef REMOTING_HOST_CLIPBOARD_H_
6 #define REMOTING_HOST_CLIPBOARD_H_ 6 #define REMOTING_HOST_CLIPBOARD_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 14
15 namespace protocol { 15 namespace protocol {
16 class ClipboardEvent; 16 class ClipboardEvent;
17 class ClipboardStub; 17 class ClipboardStub;
18 } // namespace protocol 18 } // namespace protocol
19 19
20 // All Clipboard methods should be run on the UI thread, so that the Clipboard 20 // All Clipboard methods should be run on the UI thread, so that the Clipboard
21 // can get change notifications. 21 // can get change notifications.
22 class Clipboard { 22 class Clipboard {
23 public: 23 public:
24 virtual ~Clipboard() {} 24 virtual ~Clipboard() {}
25 25
26 // Initialises any objects needed to read from or write to the clipboard. 26 // Initialises any objects needed to read from or write to the clipboard.
27 virtual void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) = 0; 27 virtual void Start(
28 std::unique_ptr<protocol::ClipboardStub> client_clipboard) = 0;
28 29
29 // Writes an item to the clipboard. It must be called after Start(). 30 // Writes an item to the clipboard. It must be called after Start().
30 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0; 31 virtual void InjectClipboardEvent(const protocol::ClipboardEvent& event) = 0;
31 32
32 static scoped_ptr<Clipboard> Create(); 33 static std::unique_ptr<Clipboard> Create();
33 }; 34 };
34 35
35 } // namespace remoting 36 } // namespace remoting
36 37
37 #endif // REMOTING_HOST_CLIPBOARD_H_ 38 #endif // REMOTING_HOST_CLIPBOARD_H_
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/clipboard_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698