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

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

Issue 92473002: Use webrtc::MouseCursorMonitor for cursor shapes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a comment. Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_
6 #define REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h"
10 #include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h"
11
12 namespace remoting {
13
14 class DesktopSessionProxy;
15
16 // Routes webrtc::MouseCursorMonitor calls through the IPC channel to the
17 // desktop session agent running in the desktop integration process.
18 class IpcMouseCursorMonitor : public webrtc::MouseCursorMonitor {
19 public:
20 explicit IpcMouseCursorMonitor(
21 scoped_refptr<DesktopSessionProxy> desktop_session_proxy);
22 virtual ~IpcMouseCursorMonitor();
23
24 // webrtc::MouseCursorMonitor interface.
25 virtual void Init(Callback* callback, Mode mode) OVERRIDE;
26 virtual void Capture() OVERRIDE;
27
28 // Called when the cursor shape has changed.
29 void OnMouseCursor(scoped_ptr<webrtc::MouseCursor> cursor);
30
31 private:
32 // The callback passed to |webrtc::MouseCursorMonitor::Init()|.
33 webrtc::MouseCursorMonitor::Callback* callback_;
34
35 // Wraps the IPC channel to the desktop session agent.
36 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_;
37
38 // Used to cancel tasks pending on the capturer when it is stopped.
39 base::WeakPtrFactory<IpcMouseCursorMonitor> weak_factory_;
40
41 DISALLOW_COPY_AND_ASSIGN(IpcMouseCursorMonitor);
42 };
43
44 } // namespace remoting
45
46 #endif // REMOTING_HOST_IPC_MOUSE_CURSOR_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698