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

Unified Diff: remoting/host/local_input_monitor_mac.mm

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
Index: remoting/host/local_input_monitor_mac.mm
diff --git a/remoting/host/local_input_monitor_mac.mm b/remoting/host/local_input_monitor_mac.mm
index 57c7053ecd0156eb57b61aaee87de57451c29e6d..b25496f9db06d1986176a0dd3b198987577bdf74 100644
--- a/remoting/host/local_input_monitor_mac.mm
+++ b/remoting/host/local_input_monitor_mac.mm
@@ -143,17 +143,19 @@ static CGEventRef LocalMouseMoved(CGEventTapProxy proxy, CGEventType type,
@end
+namespace remoting {
+
namespace {
-class LocalInputMonitorMac : public remoting::LocalInputMonitor {
+class LocalInputMonitorMac : public LocalInputMonitor {
public:
LocalInputMonitorMac() : host_(NULL) {}
virtual ~LocalInputMonitorMac();
- virtual void Start(remoting::ChromotingHost* host) OVERRIDE;
+ virtual void Start(ChromotingHost* host) OVERRIDE;
virtual void Stop() OVERRIDE;
private:
- remoting::ChromotingHost* host_;
+ ChromotingHost* host_;
DISALLOW_COPY_AND_ASSIGN(LocalInputMonitorMac);
};
@@ -166,7 +168,7 @@ LocalInputMonitorMac::~LocalInputMonitorMac() {
Stop();
}
-void LocalInputMonitorMac::Start(remoting::ChromotingHost* host) {
+void LocalInputMonitorMac::Start(ChromotingHost* host) {
base::AutoLock lock(monitor_lock.Get());
if (!local_input_monitor)
local_input_monitor = [[LocalInputMonitorImpl alloc] init];
@@ -184,6 +186,8 @@ void LocalInputMonitorMac::Stop() {
}
}
-remoting::LocalInputMonitor* remoting::LocalInputMonitor::Create() {
- return new LocalInputMonitorMac;
+scoped_ptr<LocalInputMonitor> LocalInputMonitor::Create() {
+ return scoped_ptr<LocalInputMonitor>(new LocalInputMonitorMac());
}
+
+} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698