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

Side by Side Diff: remoting/host/ipc_mouse_cursor_monitor.h

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 unified diff | Download patch
« no previous file with comments | « remoting/host/ipc_input_injector.cc ('k') | remoting/host/ipc_mouse_cursor_monitor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_ 5 #ifndef REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_
6 #define REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_ 6 #define REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 13 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
13 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" 14 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
14 15
15 namespace remoting { 16 namespace remoting {
16 17
17 class DesktopSessionProxy; 18 class DesktopSessionProxy;
18 19
19 // Routes webrtc::MouseCursorMonitor calls through the IPC channel to the 20 // Routes webrtc::MouseCursorMonitor calls through the IPC channel to the
20 // desktop session agent running in the desktop integration process. 21 // desktop session agent running in the desktop integration process.
21 class IpcMouseCursorMonitor : public webrtc::MouseCursorMonitor { 22 class IpcMouseCursorMonitor : public webrtc::MouseCursorMonitor {
22 public: 23 public:
23 explicit IpcMouseCursorMonitor( 24 explicit IpcMouseCursorMonitor(
24 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); 25 scoped_refptr<DesktopSessionProxy> desktop_session_proxy);
25 ~IpcMouseCursorMonitor() override; 26 ~IpcMouseCursorMonitor() override;
26 27
27 // webrtc::MouseCursorMonitor interface. 28 // webrtc::MouseCursorMonitor interface.
28 void Init(Callback* callback, Mode mode) override; 29 void Init(Callback* callback, Mode mode) override;
29 void Capture() override; 30 void Capture() override;
30 31
31 // Called when the cursor shape has changed. 32 // Called when the cursor shape has changed.
32 void OnMouseCursor(scoped_ptr<webrtc::MouseCursor> cursor); 33 void OnMouseCursor(std::unique_ptr<webrtc::MouseCursor> cursor);
33 34
34 private: 35 private:
35 // The callback passed to |webrtc::MouseCursorMonitor::Init()|. 36 // The callback passed to |webrtc::MouseCursorMonitor::Init()|.
36 webrtc::MouseCursorMonitor::Callback* callback_; 37 webrtc::MouseCursorMonitor::Callback* callback_;
37 38
38 // Wraps the IPC channel to the desktop session agent. 39 // Wraps the IPC channel to the desktop session agent.
39 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; 40 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_;
40 41
41 // Used to cancel tasks pending on the capturer when it is stopped. 42 // Used to cancel tasks pending on the capturer when it is stopped.
42 base::WeakPtrFactory<IpcMouseCursorMonitor> weak_factory_; 43 base::WeakPtrFactory<IpcMouseCursorMonitor> weak_factory_;
43 44
44 DISALLOW_COPY_AND_ASSIGN(IpcMouseCursorMonitor); 45 DISALLOW_COPY_AND_ASSIGN(IpcMouseCursorMonitor);
45 }; 46 };
46 47
47 } // namespace remoting 48 } // namespace remoting
48 49
49 #endif // REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_ 50 #endif // REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_
OLDNEW
« no previous file with comments | « remoting/host/ipc_input_injector.cc ('k') | remoting/host/ipc_mouse_cursor_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698