OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ | 5 #ifndef REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ |
6 #define REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ | 6 #define REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "remoting/proto/event.pb.h" | 11 #include "remoting/proto/event.pb.h" |
9 #include "remoting/protocol/input_filter.h" | 12 #include "remoting/protocol/input_filter.h" |
10 | 13 |
11 namespace remoting { | 14 namespace remoting { |
12 | 15 |
13 // NormalizingInputFilterCros addresses the problems generated by key rewritings | 16 // NormalizingInputFilterCros addresses the problems generated by key rewritings |
14 // such as Down->PageDown, 1->F1, etc, when keys are pressed in combination with | 17 // such as Down->PageDown, 1->F1, etc, when keys are pressed in combination with |
15 // the OSKey (aka Search). Rewriting OSKey+Down, for example, causes us to | 18 // the OSKey (aka Search). Rewriting OSKey+Down, for example, causes us to |
16 // receive the following: | 19 // receive the following: |
17 // | 20 // |
(...skipping 24 matching lines...) Expand all Loading... |
42 // while it is Rewriting, or we are not yet sure whether it is Normal, | 45 // while it is Rewriting, or we are not yet sure whether it is Normal, |
43 // Rewriting or Modifying. The event is sent on if we switch to Modifying, or | 46 // Rewriting or Modifying. The event is sent on if we switch to Modifying, or |
44 // discarded if the OSKey is released while in Rewriting mode. | 47 // discarded if the OSKey is released while in Rewriting mode. |
45 protocol::KeyEvent deferred_keydown_event_; | 48 protocol::KeyEvent deferred_keydown_event_; |
46 | 49 |
47 // True while the |rewrite_keydown_event_| key is Rewriting, i.e. was followed | 50 // True while the |rewrite_keydown_event_| key is Rewriting, i.e. was followed |
48 // by one or more Rewritten key events, and not by any Modified events. | 51 // by one or more Rewritten key events, and not by any Modified events. |
49 bool deferred_key_is_rewriting_; | 52 bool deferred_key_is_rewriting_; |
50 | 53 |
51 // Stores the code of the OSKey while it is pressed for use as a Modifier. | 54 // Stores the code of the OSKey while it is pressed for use as a Modifier. |
52 uint32 modifying_key_; | 55 uint32_t modifying_key_; |
53 | 56 |
54 // True if the left or right Alt keys are pressed, respectively. | 57 // True if the left or right Alt keys are pressed, respectively. |
55 bool left_alt_is_pressed_; | 58 bool left_alt_is_pressed_; |
56 bool right_alt_is_pressed_; | 59 bool right_alt_is_pressed_; |
57 | 60 |
58 // Previous mouse coordinates. | 61 // Previous mouse coordinates. |
59 int previous_mouse_x_; | 62 int previous_mouse_x_; |
60 int previous_mouse_y_; | 63 int previous_mouse_y_; |
61 | 64 |
62 DISALLOW_COPY_AND_ASSIGN(NormalizingInputFilterCros); | 65 DISALLOW_COPY_AND_ASSIGN(NormalizingInputFilterCros); |
63 }; | 66 }; |
64 | 67 |
65 } // namespace remoting | 68 } // namespace remoting |
66 | 69 |
67 #endif // REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ | 70 #endif // REMOTING_CLIENT_NORMALIZING_INPUT_FILTER_CROS_H_ |
OLD | NEW |