diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-02 22:16:41 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-02 22:16:41 +0000 |
commit | d65e15bdcd7ffe01ec2054177a7e78fa69683a38 (patch) | |
tree | fb05d40a5b8bf2dfd943999b19fcb304e088d08e /remoting/host/capturer_mac.cc | |
parent | 051e71e1b702970eb39302abbe29836239036a3d (diff) | |
download | chromium_src-d65e15bdcd7ffe01ec2054177a7e78fa69683a38.zip chromium_src-d65e15bdcd7ffe01ec2054177a7e78fa69683a38.tar.gz chromium_src-d65e15bdcd7ffe01ec2054177a7e78fa69683a38.tar.bz2 |
[Chromoting] Initial plumbing for cursor shape.
This cl contains:
* protocol for sending cursor shape on control channel from host to client
* cross-platform (Pepper) client code for rendering host cursor
* Linux host support for reading current cursor shape
Separate CLs will follow with Mac and Windows host support.
BUG=116229
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10382184
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/capturer_mac.cc')
-rw-r--r-- | remoting/host/capturer_mac.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/remoting/host/capturer_mac.cc b/remoting/host/capturer_mac.cc index 6c01622..6afbd09 100644 --- a/remoting/host/capturer_mac.cc +++ b/remoting/host/capturer_mac.cc @@ -17,9 +17,10 @@ #include "base/memory/scoped_ptr.h" #include "base/synchronization/waitable_event.h" #include "base/time.h" +#include "remoting/base/capture_data.h" #include "remoting/base/util.h" #include "remoting/host/capturer_helper.h" - +#include "remoting/proto/control.pb.h" namespace remoting { @@ -158,7 +159,7 @@ class CapturerMac : public Capturer { bool Init(); // 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; @@ -206,6 +207,9 @@ class CapturerMac : public Capturer { // recently captured screen. CapturerHelper helper_; + // Callback notified whenever the cursor shape is changed. + CursorShapeChangedCallback cursor_shape_changed_callback_; + // The current buffer with valid data for reading. int current_buffer_; @@ -306,7 +310,10 @@ void CapturerMac::ReleaseBuffers() { } } -void CapturerMac::Start() { +void CapturerMac::Start( + const CursorShapeChangedCallback& callback) { + cursor_shape_changed_callback_ = callback; + // Create power management assertions to wake the display and prevent it from // going to sleep on user idle. IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, |