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

Unified Diff: remoting/host/local_input_monitor_win.cc

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/local_input_monitor_mac.mm ('k') | remoting/host/log_to_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/local_input_monitor_win.cc
diff --git a/remoting/host/local_input_monitor_win.cc b/remoting/host/local_input_monitor_win.cc
index d728a50b5a701536a37205b63f2949d1ebf297bb..94e4d8faa3da2d02be5fcda7c386bac8008d0cff 100644
--- a/remoting/host/local_input_monitor_win.cc
+++ b/remoting/host/local_input_monitor_win.cc
@@ -9,25 +9,24 @@
#include "remoting/host/chromoting_host.h"
#include "remoting/host/local_input_monitor_thread_win.h"
+namespace remoting {
+
namespace {
-class LocalInputMonitorWin : public remoting::LocalInputMonitor {
+class LocalInputMonitorWin : public LocalInputMonitor {
public:
LocalInputMonitorWin();
~LocalInputMonitorWin();
- virtual void Start(remoting::ChromotingHost* host) OVERRIDE;
+ virtual void Start(ChromotingHost* host) OVERRIDE;
virtual void Stop() OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorWin);
- remoting::ChromotingHost* chromoting_host_;
+ ChromotingHost* chromoting_host_;
};
-} // namespace
-
-
LocalInputMonitorWin::LocalInputMonitorWin() : chromoting_host_(NULL) {
}
@@ -35,19 +34,22 @@ LocalInputMonitorWin::~LocalInputMonitorWin() {
DCHECK(chromoting_host_ == NULL);
}
-void LocalInputMonitorWin::Start(remoting::ChromotingHost* host) {
+void LocalInputMonitorWin::Start(ChromotingHost* host) {
DCHECK(chromoting_host_ == NULL);
chromoting_host_ = host;
- remoting::LocalInputMonitorThread::AddHostToInputMonitor(chromoting_host_);
+ LocalInputMonitorThread::AddHostToInputMonitor(chromoting_host_);
}
void LocalInputMonitorWin::Stop() {
DCHECK(chromoting_host_ != NULL);
- remoting::LocalInputMonitorThread::RemoveHostFromInputMonitor(
- chromoting_host_);
+ LocalInputMonitorThread::RemoveHostFromInputMonitor(chromoting_host_);
chromoting_host_ = NULL;
}
-remoting::LocalInputMonitor* remoting::LocalInputMonitor::Create() {
- return new LocalInputMonitorWin;
+} // namespace
+
+scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create() {
+ return scoped_ptr<LocalInputMonitor>(new LocalInputMonitorWin());
}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/local_input_monitor_mac.mm ('k') | remoting/host/log_to_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698