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

Unified Diff: remoting/host/clipboard_x11.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/clipboard_win.cc ('k') | remoting/host/config_file_watcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/clipboard_x11.cc
diff --git a/remoting/host/clipboard_x11.cc b/remoting/host/clipboard_x11.cc
index 94ec094a2445c962c0e6a9c3066b6c01ef919c23..ec9b93ec0812d0ec158d12b8ad251935b787422c 100644
--- a/remoting/host/clipboard_x11.cc
+++ b/remoting/host/clipboard_x11.cc
@@ -5,6 +5,8 @@
#include "remoting/host/clipboard.h"
#include <X11/Xlib.h>
+
+#include "base/memory/ptr_util.h"
#undef Status // Xlib.h #defines this, which breaks protobuf headers.
#include "base/bind.h"
@@ -25,7 +27,8 @@ class ClipboardX11 : public Clipboard,
~ClipboardX11() override;
// Clipboard interface.
- void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
+ void Start(
+ std::unique_ptr<protocol::ClipboardStub> client_clipboard) override;
void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
// MessageLoopForIO::Watcher interface.
@@ -37,7 +40,7 @@ class ClipboardX11 : public Clipboard,
const std::string& data);
void PumpXEvents();
- scoped_ptr<protocol::ClipboardStub> client_clipboard_;
+ std::unique_ptr<protocol::ClipboardStub> client_clipboard_;
// Underlying X11 clipboard implementation.
XServerClipboard x_server_clipboard_;
@@ -62,7 +65,7 @@ ClipboardX11::~ClipboardX11() {
}
void ClipboardX11::Start(
- scoped_ptr<protocol::ClipboardStub> client_clipboard) {
+ std::unique_ptr<protocol::ClipboardStub> client_clipboard) {
// TODO(lambroslambrou): Share the X connection with InputInjector.
display_ = XOpenDisplay(nullptr);
if (!display_) {
@@ -117,8 +120,8 @@ void ClipboardX11::PumpXEvents() {
}
}
-scoped_ptr<Clipboard> Clipboard::Create() {
- return make_scoped_ptr(new ClipboardX11());
+std::unique_ptr<Clipboard> Clipboard::Create() {
+ return base::WrapUnique(new ClipboardX11());
}
} // namespace remoting
« no previous file with comments | « remoting/host/clipboard_win.cc ('k') | remoting/host/config_file_watcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698