| 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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 | 800 |
| 801 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. | 801 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
| 802 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; | 802 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_; |
| 803 | 803 |
| 804 private: | 804 private: |
| 805 // Applies/Removes the DevTools device emulation transformation to/from a | 805 // Applies/Removes the DevTools device emulation transformation to/from a |
| 806 // window rect. | 806 // window rect. |
| 807 void ScreenRectToEmulatedIfNeeded(blink::WebRect* window_rect) const; | 807 void ScreenRectToEmulatedIfNeeded(blink::WebRect* window_rect) const; |
| 808 void EmulatedToScreenRectIfNeeded(blink::WebRect* window_rect) const; | 808 void EmulatedToScreenRectIfNeeded(blink::WebRect* window_rect) const; |
| 809 | 809 |
| 810 bool CreateWidget(int32_t opener_id, |
| 811 blink::WebPopupType popup_type, |
| 812 int32_t* routing_id); |
| 813 |
| 814 // A variant of Send but is fatal if it fails. The browser may |
| 815 // be waiting for this IPC Message and if the send fails the browser will |
| 816 // be left in a state waiting for something that never comes. And if it |
| 817 // never comes then it may later determine this is a hung renderer; so |
| 818 // instead fail right away. |
| 819 void SendOrCrash(IPC::Message* msg); |
| 820 |
| 810 // Indicates whether this widget has focus. | 821 // Indicates whether this widget has focus. |
| 811 bool has_focus_; | 822 bool has_focus_; |
| 812 | 823 |
| 813 #if defined(OS_MACOSX) | 824 #if defined(OS_MACOSX) |
| 814 // Responds to IPCs from TextInputClientMac regarding getting string at given | 825 // Responds to IPCs from TextInputClientMac regarding getting string at given |
| 815 // position or range as well as finding character index at a given position. | 826 // position or range as well as finding character index at a given position. |
| 816 std::unique_ptr<TextInputClientObserver> text_input_client_observer_; | 827 std::unique_ptr<TextInputClientObserver> text_input_client_observer_; |
| 817 #endif | 828 #endif |
| 818 | 829 |
| 819 // This reference is set by the RenderFrame and is used to query the IME- | 830 // This reference is set by the RenderFrame and is used to query the IME- |
| 820 // related state from the plugin to later send to the browser. | 831 // related state from the plugin to later send to the browser. |
| 821 PepperPluginInstanceImpl* focused_pepper_plugin_; | 832 PepperPluginInstanceImpl* focused_pepper_plugin_; |
| 822 | 833 |
| 823 // Stores edit commands associated to the next key event. | 834 // Stores edit commands associated to the next key event. |
| 824 // Will be cleared as soon as the next key event is processed. | 835 // Will be cleared as soon as the next key event is processed. |
| 825 EditCommands edit_commands_; | 836 EditCommands edit_commands_; |
| 826 | 837 |
| 827 // This field stores drag/drop related info for the event that is currently | 838 // This field stores drag/drop related info for the event that is currently |
| 828 // being handled. If the current event results in starting a drag/drop | 839 // being handled. If the current event results in starting a drag/drop |
| 829 // session, this info is sent to the browser along with other drag/drop info. | 840 // session, this info is sent to the browser along with other drag/drop info. |
| 830 DragEventSourceInfo possible_drag_event_info_; | 841 DragEventSourceInfo possible_drag_event_info_; |
| 831 | 842 |
| 832 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 843 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 833 }; | 844 }; |
| 834 | 845 |
| 835 } // namespace content | 846 } // namespace content |
| 836 | 847 |
| 837 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 848 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |