| OLD | NEW |
| 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // We need to reset these flags when we want to repaint the contents of | 433 // We need to reset these flags when we want to repaint the contents of |
| 434 // browser plugin in this RWH. Resetting these flags will ensure we ignore | 434 // browser plugin in this RWH. Resetting these flags will ensure we ignore |
| 435 // any previous pending acks that are not relevant upon repaint. | 435 // any previous pending acks that are not relevant upon repaint. |
| 436 void ResetSizeAndRepaintPendingFlags(); | 436 void ResetSizeAndRepaintPendingFlags(); |
| 437 | 437 |
| 438 void DetachDelegate(); | 438 void DetachDelegate(); |
| 439 | 439 |
| 440 // Update the renderer's cache of the screen rect of the view and window. | 440 // Update the renderer's cache of the screen rect of the view and window. |
| 441 void SendScreenRects(); | 441 void SendScreenRects(); |
| 442 | 442 |
| 443 // Suppreses future char events until a keydown. See | 443 // Suppresses Char and KeyUp events until the next (Raw)KeyDown. See |
| 444 // suppress_next_char_events_. | 444 // suppress_events_until_keydown_. |
| 445 void SuppressNextCharEvents(); | 445 void SuppressEventsUntilKeyDown(); |
| 446 | 446 |
| 447 // Called by the view in response to a flush request. | 447 // Called by the view in response to a flush request. |
| 448 void FlushInput(); | 448 void FlushInput(); |
| 449 | 449 |
| 450 // Request a flush signal from the view. | 450 // Request a flush signal from the view. |
| 451 void SetNeedsFlush(); | 451 void SetNeedsFlush(); |
| 452 | 452 |
| 453 // Indicates whether the renderer drives the RenderWidgetHosts's size or the | 453 // Indicates whether the renderer drives the RenderWidgetHosts's size or the |
| 454 // other way around. | 454 // other way around. |
| 455 bool auto_resize_enabled() { return auto_resize_enabled_; } | 455 bool auto_resize_enabled() { return auto_resize_enabled_; } |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 | 753 |
| 754 // Set when we update the text direction of the selected input element. | 754 // Set when we update the text direction of the selected input element. |
| 755 bool text_direction_updated_; | 755 bool text_direction_updated_; |
| 756 blink::WebTextDirection text_direction_; | 756 blink::WebTextDirection text_direction_; |
| 757 | 757 |
| 758 // Set when we cancel updating the text direction. | 758 // Set when we cancel updating the text direction. |
| 759 // This flag also ignores succeeding update requests until we call | 759 // This flag also ignores succeeding update requests until we call |
| 760 // NotifyTextDirection(). | 760 // NotifyTextDirection(). |
| 761 bool text_direction_canceled_; | 761 bool text_direction_canceled_; |
| 762 | 762 |
| 763 // Indicates if the next sequence of Char events should be suppressed or not. | 763 // Indicates if Char and KeyUp events should be suppressed or not. Usually all |
| 764 // System may translate a RawKeyDown event into zero or more Char events, | 764 // events are sent to the renderer directly in sequence. However, if a |
| 765 // usually we send them to the renderer directly in sequence. However, If a | 765 // RawKeyDown event was handled by PreHandleKeyboardEvent() or |
| 766 // RawKeyDown event was not handled by the renderer but was handled by | 766 // KeyPressListenersHandleEvent(), e.g. as an accelerator key, then the |
| 767 // our UnhandledKeyboardEvent() method, e.g. as an accelerator key, then we | 767 // RawKeyDown event is not sent to the renderer, and the following sequence of |
| 768 // shall not send the following sequence of Char events, which was generated | 768 // Char and KeyUp events should also not be sent. Otherwise the renderer will |
| 769 // by this RawKeyDown event, to the renderer. Otherwise the renderer may | 769 // see only the Char and KeyUp events and cause unexpected behavior. For |
| 770 // handle the Char events and cause unexpected behavior. | 770 // example, pressing alt-2 may let the browser switch to the second tab, but |
| 771 // For example, pressing alt-2 may let the browser switch to the second tab, | 771 // the Char event generated by alt-2 may also activate a HTML element if its |
| 772 // but the Char event generated by alt-2 may also activate a HTML element | 772 // accesskey happens to be "2", then the user may get confused when switching |
| 773 // if its accesskey happens to be "2", then the user may get confused when | 773 // back to the original tab, because the content may already have changed. |
| 774 // switching back to the original tab, because the content may already be | 774 bool suppress_events_until_keydown_; |
| 775 // changed. | |
| 776 bool suppress_next_char_events_; | |
| 777 | 775 |
| 778 bool pending_mouse_lock_request_; | 776 bool pending_mouse_lock_request_; |
| 779 bool allow_privileged_mouse_lock_; | 777 bool allow_privileged_mouse_lock_; |
| 780 | 778 |
| 781 // Keeps track of whether the webpage has any touch event handler. If it does, | 779 // Keeps track of whether the webpage has any touch event handler. If it does, |
| 782 // then touch events are sent to the renderer. Otherwise, the touch events are | 780 // then touch events are sent to the renderer. Otherwise, the touch events are |
| 783 // not sent to the renderer. | 781 // not sent to the renderer. |
| 784 bool has_touch_handler_; | 782 bool has_touch_handler_; |
| 785 | 783 |
| 786 // TODO(wjmaclean) Remove the code for supporting resending gesture events | 784 // TODO(wjmaclean) Remove the code for supporting resending gesture events |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 #endif | 853 #endif |
| 856 | 854 |
| 857 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 855 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 858 | 856 |
| 859 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 857 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 860 }; | 858 }; |
| 861 | 859 |
| 862 } // namespace content | 860 } // namespace content |
| 863 | 861 |
| 864 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 862 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |