Chromium Code Reviews| Index: remoting/protocol/touch_input_filter.h |
| diff --git a/remoting/protocol/touch_input_filter.h b/remoting/protocol/touch_input_filter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..797ff6fbef718a97979f5be80d9a05eca505b28b |
| --- /dev/null |
| +++ b/remoting/protocol/touch_input_filter.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
|
Wez
2015/01/21 03:08:38
Remove (c) - that's from some ancient license word
Rintaro Kuroiwa
2015/01/28 01:12:30
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_PROTOCOL_TOUCH_INPUT_FILTER_H_ |
| +#define REMOTING_PROTOCOL_TOUCH_INPUT_FILTER_H_ |
| + |
| +#include "base/macros.h" |
|
Wez
2015/01/21 03:08:38
What do we need base/macros.h explicitly pulling i
Rintaro Kuroiwa
2015/01/28 01:12:30
DISALLOW_COPY_AND_ASSIGN is defined there. It stil
|
| +#include "remoting/protocol/input_filter.h" |
| +#include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
| + |
| +namespace remoting { |
| +namespace protocol { |
| + |
| +class TouchEvent; |
| + |
| +// TODO(rkuroiwa): Consider renaming this to TouchInputRescaler. |
|
Wez
2015/01/21 03:08:38
Agreed; suggest TouchInputScaler.
Is this used at
Rintaro Kuroiwa
2015/01/28 01:12:30
Renaming to TouchInputScalar.
Looking at the Mous
|
| +class TouchInputFilter : public InputFilter { |
| + public: |
| + TouchInputFilter(); |
| + explicit TouchInputFilter(InputStub* input_stub); |
| + ~TouchInputFilter() override; |
| + |
| + void set_input_size(const webrtc::DesktopSize& size); |
|
Wez
2015/01/21 03:08:38
These two setters should match the names of the fi
Rintaro Kuroiwa
2015/01/28 01:12:30
Yes, I'm aware of it :) Renaming.
|
| + |
| + void set_output_size(const webrtc::DesktopSize& size); |
| + |
| + // Scales the coordinates to host x,y value. |
|
Wez
2015/01/21 03:08:38
This comment doesn't add anything; this method is
Rintaro Kuroiwa
2015/01/28 01:12:30
Done.
|
| + void InjectTouchEvent(const protocol::TouchEvent& event) override; |
| + |
| + private: |
| + // Sizes for scaling the coordinates. |
| + webrtc::DesktopSize input_max_; |
| + webrtc::DesktopSize output_max_; |
|
Wez
2015/01/21 03:08:38
nit: Why the max_ suffix? Surely we always scale t
Rintaro Kuroiwa
2015/01/28 01:12:30
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(TouchInputFilter); |
| +}; |
| + |
| +} // namespace protocol |
| +} // namespace remoting |
| + |
| +#endif // REMOTING_PROTOCOL_TOUCH_INPUT_FILTER_H_ |