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

Side by Side Diff: remoting/host/mouse_clamping_filter.cc

Issue 11761019: Tiny little refactoring of DesktopEnvironment. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/mouse_clamping_filter.h ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/host/mouse_clamping_filter.h" 5 #include "remoting/host/mouse_clamping_filter.h"
6 6
7 #include "remoting/capturer/video_frame_capturer.h" 7 #include "remoting/host/desktop_environment.h"
8 #include "remoting/proto/event.pb.h" 8 #include "remoting/proto/event.pb.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 MouseClampingFilter::MouseClampingFilter(VideoFrameCapturer* capturer, 12 MouseClampingFilter::MouseClampingFilter(
13 protocol::InputStub* input_stub) 13 DesktopEnvironment* desktop_environment,
14 : MouseInputFilter(input_stub), capturer_(capturer) { 14 protocol::InputStub* input_stub)
15 : MouseInputFilter(input_stub), desktop_environment_(desktop_environment) {
15 } 16 }
16 17
17 MouseClampingFilter::~MouseClampingFilter() { 18 MouseClampingFilter::~MouseClampingFilter() {
18 } 19 }
19 20
20 void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) { 21 void MouseClampingFilter::InjectMouseEvent(const protocol::MouseEvent& event) {
21 // Ensure that the MouseInputFilter is clamping to the current dimensions. 22 // Ensure that the MouseInputFilter is clamping to the current dimensions.
22 set_output_size(capturer_->size_most_recent()); 23 SkISize screen_size = desktop_environment_->GetScreenSize();
23 set_input_size(capturer_->size_most_recent()); 24 set_output_size(screen_size);
25 set_input_size(screen_size);
24 MouseInputFilter::InjectMouseEvent(event); 26 MouseInputFilter::InjectMouseEvent(event);
25 } 27 }
26 28
27 } // namespace remoting 29 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/mouse_clamping_filter.h ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698