diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 20:31:44 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-20 20:31:44 +0000 |
commit | 3361e1f24a5dd45ae86478af20c617d0b1ce40e0 (patch) | |
tree | 70079ed87a90f8f2322de722e6073ba192931196 /remoting/host/local_input_monitor_linux.cc | |
parent | bd1a64b72240734d1061b7edd95ec9f268792c49 (diff) | |
download | chromium_src-3361e1f24a5dd45ae86478af20c617d0b1ce40e0.zip chromium_src-3361e1f24a5dd45ae86478af20c617d0b1ce40e0.tar.gz chromium_src-3361e1f24a5dd45ae86478af20c617d0b1ce40e0.tar.bz2 |
Use scoped_ptr<> to pass ownership in more places.
Review URL: http://codereview.chromium.org/9720019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/local_input_monitor_linux.cc')
-rw-r--r-- | remoting/host/local_input_monitor_linux.cc | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/remoting/host/local_input_monitor_linux.cc b/remoting/host/local_input_monitor_linux.cc index c6e8037..1785a96 100644 --- a/remoting/host/local_input_monitor_linux.cc +++ b/remoting/host/local_input_monitor_linux.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,23 +8,22 @@ #include "base/compiler_specific.h" #include "base/logging.h" +namespace remoting { + namespace { -class LocalInputMonitorLinux : public remoting::LocalInputMonitor { +class LocalInputMonitorLinux : public LocalInputMonitor { public: LocalInputMonitorLinux(); ~LocalInputMonitorLinux(); - virtual void Start(remoting::ChromotingHost* host) OVERRIDE; + virtual void Start(ChromotingHost* host) OVERRIDE; virtual void Stop() OVERRIDE; private: - remoting::LocalInputMonitorThread* thread_; + LocalInputMonitorThread* thread_; }; -} // namespace - - LocalInputMonitorLinux::LocalInputMonitorLinux() : thread_(NULL) { } @@ -33,9 +32,9 @@ LocalInputMonitorLinux::~LocalInputMonitorLinux() { CHECK(!thread_); } -void LocalInputMonitorLinux::Start(remoting::ChromotingHost* host) { +void LocalInputMonitorLinux::Start(ChromotingHost* host) { CHECK(!thread_); - thread_ = new remoting::LocalInputMonitorThread(host); + thread_ = new LocalInputMonitorThread(host); thread_->Start(); } @@ -47,6 +46,10 @@ void LocalInputMonitorLinux::Stop() { thread_ = 0; } -remoting::LocalInputMonitor* remoting::LocalInputMonitor::Create() { - return new LocalInputMonitorLinux; +} // namespace + +scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create() { + return scoped_ptr<LocalInputMonitor>(new LocalInputMonitorLinux()); } + +} // namespace remoting |