diff options
author | dcaiafa@chromium.org <dcaiafa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-08 06:33:50 +0000 |
---|---|---|
committer | dcaiafa@chromium.org <dcaiafa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-08 06:33:50 +0000 |
commit | 74337c37d04ec323c6358a8f5990d0e0d10fd3c8 (patch) | |
tree | 29d381c1c4c464e3c230e983f024312b2adb8cd1 /remoting/host/basic_desktop_environment.cc | |
parent | 563d60211d5f541015ebad2123d717c48ef95fc4 (diff) | |
download | chromium_src-74337c37d04ec323c6358a8f5990d0e0d10fd3c8.zip chromium_src-74337c37d04ec323c6358a8f5990d0e0d10fd3c8.tar.gz chromium_src-74337c37d04ec323c6358a8f5990d0e0d10fd3c8.tar.bz2 |
Use webrtc::MouseCursorMonitor for cursor shapes
Use webrtc::MouseCursorMonitor for cursor shapes instead of
webrtc::VideoFrameCapturer, in preparation for deprecating cursor shape
functionality in the latter.
Fix memory corruption in VideoSchedulerTests_StartAndStop, where a lingering
capture task could trigger a expectation action declared on the stack during
tear down. My changes to the test somehow made the race condition more likely.
BUG=324033
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247689
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=248045
Review URL: https://codereview.chromium.org/92473002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288226 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/basic_desktop_environment.cc')
-rw-r--r-- | remoting/host/basic_desktop_environment.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/remoting/host/basic_desktop_environment.cc b/remoting/host/basic_desktop_environment.cc index 011bf5c..a28b118 100644 --- a/remoting/host/basic_desktop_environment.cc +++ b/remoting/host/basic_desktop_environment.cc @@ -12,6 +12,8 @@ #include "remoting/host/gnubby_auth_handler.h" #include "remoting/host/input_injector.h" #include "remoting/host/screen_controls.h" +#include "third_party/webrtc/modules/desktop_capture/desktop_capture_options.h" +#include "third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor.h" #include "third_party/webrtc/modules/desktop_capture/screen_capturer.h" namespace remoting { @@ -38,6 +40,14 @@ scoped_ptr<ScreenControls> BasicDesktopEnvironment::CreateScreenControls() { return scoped_ptr<ScreenControls>(); } +scoped_ptr<webrtc::MouseCursorMonitor> +BasicDesktopEnvironment::CreateMouseCursorMonitor() { + return scoped_ptr<webrtc::MouseCursorMonitor>( + webrtc::MouseCursorMonitor::CreateForScreen( + *desktop_capture_options_, + webrtc::kFullDesktopScreenId)); +} + std::string BasicDesktopEnvironment::GetCapabilities() const { return std::string(); } @@ -56,7 +66,8 @@ BasicDesktopEnvironment::CreateVideoCapturer() { // The basic desktop environment does not use X DAMAGE, since it is // broken on many systems - see http://crbug.com/73423. - return scoped_ptr<webrtc::ScreenCapturer>(webrtc::ScreenCapturer::Create()); + return scoped_ptr<webrtc::ScreenCapturer>( + webrtc::ScreenCapturer::Create(*desktop_capture_options_)); } BasicDesktopEnvironment::BasicDesktopEnvironment( @@ -65,7 +76,10 @@ BasicDesktopEnvironment::BasicDesktopEnvironment( scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) : caller_task_runner_(caller_task_runner), input_task_runner_(input_task_runner), - ui_task_runner_(ui_task_runner) { + ui_task_runner_(ui_task_runner), + desktop_capture_options_( + new webrtc::DesktopCaptureOptions( + webrtc::DesktopCaptureOptions::CreateDefault())) { DCHECK(caller_task_runner_->BelongsToCurrentThread()); } |