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

Unified Diff: remoting/host/capturer_win.cc

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused vars. Fix Mac Capturer Unittest. Created 8 years, 7 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/capturer_mac_unittest.cc ('k') | remoting/host/host_mock_objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/capturer_win.cc
diff --git a/remoting/host/capturer_win.cc b/remoting/host/capturer_win.cc
index e9b65264b0becc874c0b5ddf30ef0fe1ff2f14f4..6ec2d60bbdf76306ffe069ef4bfde1c7863aede4 100644
--- a/remoting/host/capturer_win.cc
+++ b/remoting/host/capturer_win.cc
@@ -12,10 +12,12 @@
#include "base/native_library.h"
#include "base/string16.h"
#include "base/stringize_macros.h"
+#include "remoting/base/capture_data.h"
#include "remoting/host/capturer_helper.h"
#include "remoting/host/desktop_win.h"
#include "remoting/host/differ.h"
#include "remoting/host/scoped_thread_desktop_win.h"
+#include "remoting/proto/control.pb.h"
namespace remoting {
@@ -39,7 +41,7 @@ class CapturerGdi : public Capturer {
virtual ~CapturerGdi();
// Capturer interface.
- virtual void Start() OVERRIDE;
+ virtual void Start(const CursorShapeChangedCallback& callback) OVERRIDE;
virtual void Stop() OVERRIDE;
virtual void ScreenConfigurationChanged() OVERRIDE;
virtual media::VideoFrame::Format pixel_format() const OVERRIDE;
@@ -96,6 +98,9 @@ class CapturerGdi : public Capturer {
// recently captured screen.
CapturerHelper helper_;
+ // Callback notified whenever the cursor shape is changed.
+ CursorShapeChangedCallback cursor_shape_changed_callback_;
+
// There are two buffers for the screen images, as required by Capturer.
static const int kNumBuffers = 2;
VideoFrameBuffer buffers_[kNumBuffers];
@@ -214,7 +219,10 @@ void CapturerGdi::ReleaseBuffers() {
}
}
-void CapturerGdi::Start() {
+void CapturerGdi::Start(
+ const CursorShapeChangedCallback& callback) {
+ cursor_shape_changed_callback_ = callback;
+
// Load dwmapi.dll dynamically since it is not available on XP.
if (dwmapi_library_ == NULL) {
std::string error;
« no previous file with comments | « remoting/host/capturer_mac_unittest.cc ('k') | remoting/host/host_mock_objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698