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

Unified Diff: remoting/host/mouse_clamping_filter.cc

Issue 11817048: Revert 175648 because it causes http://crbug.com/169126. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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
===================================================================
--- remoting/host/mouse_clamping_filter.cc (revision 176125)
+++ remoting/host/mouse_clamping_filter.cc (working copy)
@@ -4,34 +4,24 @@
#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(
- protocol::InputStub* input_stub,
- protocol::VideoStub* video_stub)
- : input_filter_(input_stub),
- video_stub_(video_stub) {
+MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer,
+ protocol::InputStub* input_stub)
+ : MouseInputFilter(input_stub), capturer_(capturer) {
}
MouseClampingFilter::~MouseClampingFilter() {
}
-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);
+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);
}
} // 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