summaryrefslogtreecommitdiffstats
path: root/remoting/host
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 17:42:52 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-31 17:42:52 +0000
commitbd1894fa458295bbe7928325951cd5f07811654d (patch)
tree62ef3b8e6a5bda69092aad82b9934a40f108aee1 /remoting/host
parentca93c2aaee10dacd98b96313390126ba3a526b03 (diff)
downloadchromium_src-bd1894fa458295bbe7928325951cd5f07811654d.zip
chromium_src-bd1894fa458295bbe7928325951cd5f07811654d.tar.gz
chromium_src-bd1894fa458295bbe7928325951cd5f07811654d.tar.bz2
Merge methods of media::SharedBufferFactory interface into media::ScreenCapturer::Delegate. It is useful because both interfaces are implemented by the same class usually while creation of the capturer can be controlled by another (factory) class.
Review URL: https://codereview.chromium.org/12087063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179903 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r--remoting/host/desktop_session_agent.cc2
-rw-r--r--remoting/host/desktop_session_agent.h8
2 files changed, 3 insertions, 7 deletions
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc
index 878ae4f..49d15f2 100644
--- a/remoting/host/desktop_session_agent.cc
+++ b/remoting/host/desktop_session_agent.cc
@@ -486,7 +486,7 @@ void DesktopSessionAgent::StopAudioCapturer() {
void DesktopSessionAgent::StartVideoCapturer() {
DCHECK(video_capture_task_runner()->BelongsToCurrentThread());
- video_capturer_ = media::ScreenCapturer::CreateWithFactory(this);
+ video_capturer_ = media::ScreenCapturer::Create();
if (video_capturer_)
video_capturer_->Start(this);
}
diff --git a/remoting/host/desktop_session_agent.h b/remoting/host/desktop_session_agent.h
index b315b50..0145cb6 100644
--- a/remoting/host/desktop_session_agent.h
+++ b/remoting/host/desktop_session_agent.h
@@ -17,7 +17,6 @@
#include "ipc/ipc_platform_file.h"
#include "media/video/capture/screen/screen_capturer.h"
#include "media/video/capture/screen/shared_buffer.h"
-#include "media/video/capture/screen/shared_buffer_factory.h"
#include "remoting/host/mouse_move_observer.h"
#include "remoting/host/ui_strings.h"
#include "remoting/protocol/clipboard_stub.h"
@@ -49,7 +48,6 @@ class DesktopSessionAgent
: public base::RefCountedThreadSafe<DesktopSessionAgent>,
public IPC::Listener,
public MouseMoveObserver,
- public media::SharedBufferFactory,
public media::ScreenCapturer::Delegate {
public:
class Delegate {
@@ -79,13 +77,11 @@ class DesktopSessionAgent
// MouseMoveObserver implementation.
virtual void OnLocalMouseMoved(const SkIPoint& new_pos) OVERRIDE;
- // SharedBufferFactory implementation.
+ // media::ScreenCapturer::Delegate implementation.
virtual scoped_refptr<media::SharedBuffer> CreateSharedBuffer(
uint32 size) OVERRIDE;
virtual void ReleaseSharedBuffer(
scoped_refptr<media::SharedBuffer> buffer) OVERRIDE;
-
- // media::ScreenCapturer::Delegate implementation.
virtual void OnCaptureCompleted(
scoped_refptr<media::ScreenCaptureData> capture_data) OVERRIDE;
virtual void OnCursorShapeChanged(
@@ -234,7 +230,7 @@ class DesktopSessionAgent
// Next shared buffer ID to be used.
int next_shared_buffer_id_;
- // List of the shared buffers registered via |SharedBufferFactory| interface.
+ // List of the shared buffers.
typedef std::list<scoped_refptr<media::SharedBuffer> > SharedBuffers;
SharedBuffers shared_buffers_;