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

Unified Diff: remoting/host/mouse_clamping_filter.cc

Issue 11781003: Connect to DesktopEnvironment's stubs only when audio/video schedulers are about to be created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback #2 Created 7 years, 11 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/mouse_clamping_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/mouse_clamping_filter.cc
diff --git a/remoting/host/mouse_clamping_filter.cc b/remoting/host/mouse_clamping_filter.cc
index 04ee46cfe70f4bfb288166dc8252aeba5efa292a..3fdecbdbe192e070152bc6555bf96d832536a647 100644
--- a/remoting/host/mouse_clamping_filter.cc
+++ b/remoting/host/mouse_clamping_filter.cc
@@ -4,24 +4,34 @@
#include "remoting/host/mouse_clamping_filter.h"
-#include "remoting/capturer/video_frame_capturer.h"
#include "remoting/proto/event.pb.h"
+#include "remoting/proto/video.pb.h"
namespace remoting {
-MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer,
- protocol::InputStub* input_stub)
- : MouseInputFilter(input_stub), capturer_(capturer) {
+MouseClampingFilter::MouseClampingFilter(
+ protocol::InputStub* input_stub,
+ protocol::VideoStub* video_stub)
+ : input_filter_(input_stub),
+ video_stub_(video_stub) {
}
MouseClampingFilter::~MouseClampingFilter() {
}
-void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) {
- // Ensure that the MouseInputFilter is clamping to the current dimensions.
- set_output_size(capturer_->size_most_recent());
- set_input_size(capturer_->size_most_recent());
- MouseInputFilter::InjectMouseEvent(event);
+void MouseClampingFilter::ProcessVideoPacket(
+ scoped_ptr<VideoPacket> video_packet,
+ const base::Closure& done) {
+ // Configure the MouseInputFilter to clamp to the video dimensions.
+ if (video_packet->format().has_screen_width() &&
+ video_packet->format().has_screen_height()) {
+ SkISize screen_size = SkISize::Make(video_packet->format().screen_width(),
+ video_packet->format().screen_height());
+ input_filter_.set_input_size(screen_size);
+ input_filter_.set_output_size(screen_size);
+ }
+
+ video_stub_->ProcessVideoPacket(video_packet.Pass(), done);
}
} // namespace remoting
« no previous file with comments | « remoting/host/mouse_clamping_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698