| 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 CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
| 6 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 6 #define CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 bool handling_input_event() const { return handling_input_event_; } | 54 bool handling_input_event() const { return handling_input_event_; } |
| 55 void set_handling_input_event(bool handling_input_event) { | 55 void set_handling_input_event(bool handling_input_event) { |
| 56 handling_input_event_ = handling_input_event; | 56 handling_input_event_ = handling_input_event; |
| 57 } | 57 } |
| 58 | 58 |
| 59 blink::WebInputEvent::Type handling_event_type() const { | 59 blink::WebInputEvent::Type handling_event_type() const { |
| 60 return handling_event_type_; | 60 return handling_event_type_; |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool ime_composition_replacement() const { |
| 64 return ime_composition_replacement_; |
| 65 } |
| 66 void set_ime_composition_replacement(bool ime_composition_replacement) { |
| 67 ime_composition_replacement_ = ime_composition_replacement; |
| 68 } |
| 69 |
| 63 private: | 70 private: |
| 64 RenderWidgetInputHandlerDelegate* const delegate_; | 71 RenderWidgetInputHandlerDelegate* const delegate_; |
| 65 | 72 |
| 66 RenderWidget* const widget_; | 73 RenderWidget* const widget_; |
| 67 | 74 |
| 68 // Are we currently handling an input event? | 75 // Are we currently handling an input event? |
| 69 bool handling_input_event_; | 76 bool handling_input_event_; |
| 70 | 77 |
| 71 // Used to intercept overscroll notifications while an event is being | 78 // Used to intercept overscroll notifications while an event is being |
| 72 // handled. If the event causes overscroll, the overscroll metadata can be | 79 // handled. If the event causes overscroll, the overscroll metadata can be |
| 73 // bundled in the event ack, saving an IPC. Note that we must continue | 80 // bundled in the event ack, saving an IPC. Note that we must continue |
| 74 // supporting overscroll IPC notifications due to fling animation updates. | 81 // supporting overscroll IPC notifications due to fling animation updates. |
| 75 std::unique_ptr<ui::DidOverscrollParams>* handling_event_overscroll_; | 82 std::unique_ptr<ui::DidOverscrollParams>* handling_event_overscroll_; |
| 76 | 83 |
| 77 // Type of the input event we are currently handling. | 84 // Type of the input event we are currently handling. |
| 78 blink::WebInputEvent::Type handling_event_type_; | 85 blink::WebInputEvent::Type handling_event_type_; |
| 79 | 86 |
| 80 // Indicates if the next sequence of Char events should be suppressed or not. | 87 // Indicates if the next sequence of Char events should be suppressed or not. |
| 81 bool suppress_next_char_events_; | 88 bool suppress_next_char_events_; |
| 82 | 89 |
| 90 // Used to suppress notification about text selection changes triggered by |
| 91 // IME composition when it replaces text. |
| 92 bool ime_composition_replacement_; |
| 93 |
| 83 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); | 94 DISALLOW_COPY_AND_ASSIGN(RenderWidgetInputHandler); |
| 84 }; | 95 }; |
| 85 | 96 |
| 86 } // namespace content | 97 } // namespace content |
| 87 | 98 |
| 88 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ | 99 #endif // CONTENT_RENDERER_INPUT_RENDER_WIDGET_INPUT_HANDLER_H_ |
| OLD | NEW |