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

Unified Diff: remoting/host/clipboard_x11.cc

Issue 930403002: Remove remoting::Clipboard::Stop(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: remoting/host/clipboard_x11.cc
diff --git a/remoting/host/clipboard_x11.cc b/remoting/host/clipboard_x11.cc
index dc0bd988c5924cd4fda404f4a5559e46368de82d..5a960da05c7aa14a62535a372ce814cd062ee4a5 100644
--- a/remoting/host/clipboard_x11.cc
+++ b/remoting/host/clipboard_x11.cc
@@ -25,7 +25,6 @@ class ClipboardX11 : public Clipboard,
// Clipboard interface.
void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
void InjectClipboardEvent(const protocol::ClipboardEvent& event) override;
- void Stop() override;
// MessageLoopForIO::Watcher interface.
void OnFileCanReadWithoutBlocking(int fd) override;
@@ -56,7 +55,13 @@ ClipboardX11::ClipboardX11()
}
ClipboardX11::~ClipboardX11() {
- Stop();
+ client_clipboard_.reset();
Lambros 2015/02/17 21:37:33 Don't need?
Sergey Ulanov 2015/02/17 23:51:42 Done.
+ x_connection_watcher_.StopWatchingFileDescriptor();
+
+ if (display_) {
+ XCloseDisplay(display_);
+ display_ = nullptr;
Lambros 2015/02/17 21:37:33 Don't need?
Sergey Ulanov 2015/02/17 23:51:42 Done.
+ }
}
void ClipboardX11::Start(
@@ -87,16 +92,6 @@ void ClipboardX11::InjectClipboardEvent(
x_server_clipboard_.SetClipboard(event.mime_type(), event.data());
}
-void ClipboardX11::Stop() {
- client_clipboard_.reset();
- x_connection_watcher_.StopWatchingFileDescriptor();
-
- if (display_) {
- XCloseDisplay(display_);
- display_ = nullptr;
- }
-}
-
void ClipboardX11::OnFileCanReadWithoutBlocking(int fd) {
PumpXEvents();
}

Powered by Google App Engine
This is Rietveld 408576698