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

Unified Diff: remoting/host/desktop_session_proxy.cc

Issue 11470028: Move screen capturers to remoting/capturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/desktop_session_proxy.cc
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index d5af3c41f4bf5a0ae3685b069dc438057a1cca9d..bc4114d14673c1dd643043def2fe1289e84a5e8f 100644
--- a/remoting/host/desktop_session_proxy.cc
+++ b/remoting/host/desktop_session_proxy.cc
@@ -10,7 +10,7 @@
#include "base/single_thread_task_runner.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message_macros.h"
-#include "remoting/base/capture_data.h"
+#include "remoting/capturer/capture_data.h"
#include "remoting/host/audio_capturer.h"
#include "remoting/host/chromoting_messages.h"
#include "remoting/host/ipc_video_frame_capturer.h"
@@ -301,9 +301,9 @@ void DesktopSessionProxy::OnCaptureCompleted(
capture_data->set_shared_buffer(shared_buffer);
if (!serialized_data.dirty_region.empty()) {
- capture_data->mutable_dirty_region().setRects(
- &serialized_data.dirty_region[0],
- serialized_data.dirty_region.size());
+ capture_data->mutable_dirty_region().setRects(
+ &serialized_data.dirty_region[0],
+ serialized_data.dirty_region.size());
}
--pending_capture_frame_requests_;
@@ -311,17 +311,9 @@ void DesktopSessionProxy::OnCaptureCompleted(
}
void DesktopSessionProxy::OnCursorShapeChanged(
- const std::string& serialized_cursor_shape) {
+ const MouseCursorShape& cursor_shape) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
-
- scoped_ptr<protocol::CursorShapeInfo> cursor_shape(
- new protocol::CursorShapeInfo());
- if (!cursor_shape->ParseFromString(serialized_cursor_shape)) {
- LOG(ERROR) << "Failed to parse protocol::CursorShapeInfo.";
- return;
- }
-
- PostCursorShape(cursor_shape.Pass());
+ PostCursorShape(cursor_shape);
}
void DesktopSessionProxy::OnInjectClipboardEvent(
@@ -352,16 +344,16 @@ void DesktopSessionProxy::PostCaptureCompleted(
}
void DesktopSessionProxy::PostCursorShape(
- scoped_ptr<protocol::CursorShapeInfo> cursor_shape) {
+ const MouseCursorShape& cursor_shape) {
if (!video_capture_task_runner_->BelongsToCurrentThread()) {
video_capture_task_runner_->PostTask(
FROM_HERE, base::Bind(&DesktopSessionProxy::PostCursorShape,
- this, base::Passed(&cursor_shape)));
+ this, cursor_shape));
return;
}
if (video_capturer_)
- video_capturer_->OnCursorShapeChanged(cursor_shape.Pass());
+ video_capturer_->OnCursorShapeChanged(cursor_shape);
}
void DesktopSessionProxy::SendToDesktop(IPC::Message* message) {

Powered by Google App Engine
This is Rietveld 408576698