| 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 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <map> | 12 #include <map> |
| 13 #include <memory> | 13 #include <memory> |
| 14 #include <queue> | 14 #include <queue> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "base/callback.h" | 18 #include "base/callback.h" |
| 19 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
| 20 #include "base/macros.h" | 20 #include "base/macros.h" |
| 21 #include "base/memory/ref_counted.h" | 21 #include "base/memory/ref_counted.h" |
| 22 #include "base/memory/weak_ptr.h" | 22 #include "base/memory/weak_ptr.h" |
| 23 #include "base/observer_list.h" | 23 #include "base/observer_list.h" |
| 24 #include "base/time/time.h" | 24 #include "base/time/time.h" |
| 25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
| 26 #include "cc/input/touch_action.h" |
| 26 #include "content/common/content_export.h" | 27 #include "content/common/content_export.h" |
| 27 #include "content/common/cursors/webcursor.h" | 28 #include "content/common/cursors/webcursor.h" |
| 28 #include "content/common/drag_event_source_info.h" | 29 #include "content/common/drag_event_source_info.h" |
| 29 #include "content/common/edit_command.h" | 30 #include "content/common/edit_command.h" |
| 30 #include "content/common/features.h" | 31 #include "content/common/features.h" |
| 31 #include "content/common/input/synthetic_gesture_params.h" | 32 #include "content/common/input/synthetic_gesture_params.h" |
| 32 #include "content/public/common/drop_data.h" | 33 #include "content/public/common/drop_data.h" |
| 33 #include "content/public/common/screen_info.h" | 34 #include "content/public/common/screen_info.h" |
| 34 #include "content/renderer/devtools/render_widget_screen_metrics_emulator_delega
te.h" | 35 #include "content/renderer/devtools/render_widget_screen_metrics_emulator_delega
te.h" |
| 35 #include "content/renderer/gpu/render_widget_compositor_delegate.h" | 36 #include "content/renderer/gpu/render_widget_compositor_delegate.h" |
| 36 #include "content/renderer/input/main_thread_event_queue.h" | 37 #include "content/renderer/input/main_thread_event_queue.h" |
| 37 #include "content/renderer/input/render_widget_input_handler.h" | 38 #include "content/renderer/input/render_widget_input_handler.h" |
| 38 #include "content/renderer/input/render_widget_input_handler_delegate.h" | 39 #include "content/renderer/input/render_widget_input_handler_delegate.h" |
| 39 #include "content/renderer/message_delivery_policy.h" | 40 #include "content/renderer/message_delivery_policy.h" |
| 40 #include "content/renderer/mouse_lock_dispatcher.h" | 41 #include "content/renderer/mouse_lock_dispatcher.h" |
| 41 #include "content/renderer/render_widget_mouse_lock_dispatcher.h" | 42 #include "content/renderer/render_widget_mouse_lock_dispatcher.h" |
| 42 #include "ipc/ipc_listener.h" | 43 #include "ipc/ipc_listener.h" |
| 43 #include "ipc/ipc_message.h" | 44 #include "ipc/ipc_message.h" |
| 44 #include "ipc/ipc_sender.h" | 45 #include "ipc/ipc_sender.h" |
| 45 #include "third_party/WebKit/public/platform/WebDisplayMode.h" | 46 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
| 46 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 47 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 47 #include "third_party/WebKit/public/platform/WebRect.h" | 48 #include "third_party/WebKit/public/platform/WebRect.h" |
| 48 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 49 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
| 49 #include "third_party/WebKit/public/platform/WebTextInputInfo.h" | 50 #include "third_party/WebKit/public/platform/WebTextInputInfo.h" |
| 50 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 51 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| 51 #include "third_party/WebKit/public/web/WebPopupType.h" | 52 #include "third_party/WebKit/public/web/WebPopupType.h" |
| 52 #include "third_party/WebKit/public/web/WebTextDirection.h" | 53 #include "third_party/WebKit/public/web/WebTextDirection.h" |
| 53 #include "third_party/WebKit/public/web/WebTouchAction.h" | |
| 54 #include "third_party/WebKit/public/web/WebWidget.h" | 54 #include "third_party/WebKit/public/web/WebWidget.h" |
| 55 #include "third_party/WebKit/public/web/WebWidgetClient.h" | 55 #include "third_party/WebKit/public/web/WebWidgetClient.h" |
| 56 #include "ui/base/ime/text_input_mode.h" | 56 #include "ui/base/ime/text_input_mode.h" |
| 57 #include "ui/base/ime/text_input_type.h" | 57 #include "ui/base/ime/text_input_type.h" |
| 58 #include "ui/base/ui_base_types.h" | 58 #include "ui/base/ui_base_types.h" |
| 59 #include "ui/gfx/geometry/rect.h" | 59 #include "ui/gfx/geometry/rect.h" |
| 60 #include "ui/gfx/geometry/vector2d_f.h" | 60 #include "ui/gfx/geometry/vector2d_f.h" |
| 61 #include "ui/gfx/native_widget_types.h" | 61 #include "ui/gfx/native_widget_types.h" |
| 62 #include "ui/gfx/range/range.h" | 62 #include "ui/gfx/range/range.h" |
| 63 #include "ui/surface/transport_dib.h" | 63 #include "ui/surface/transport_dib.h" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 // a time period where we may have set a new window rect which has not yet | 628 // a time period where we may have set a new window rect which has not yet |
| 629 // been processed by the browser. So we maintain a pending window rect | 629 // been processed by the browser. So we maintain a pending window rect |
| 630 // size. If JS code sets the WindowRect, and then immediately calls | 630 // size. If JS code sets the WindowRect, and then immediately calls |
| 631 // GetWindowRect() we'll use this pending window rect as the size. | 631 // GetWindowRect() we'll use this pending window rect as the size. |
| 632 void SetPendingWindowRect(const blink::WebRect& r); | 632 void SetPendingWindowRect(const blink::WebRect& r); |
| 633 | 633 |
| 634 // Check whether the WebWidget has any touch event handlers registered. | 634 // Check whether the WebWidget has any touch event handlers registered. |
| 635 void HasTouchEventHandlers(bool has_handlers) override; | 635 void HasTouchEventHandlers(bool has_handlers) override; |
| 636 | 636 |
| 637 // Tell the browser about the actions permitted for a new touch point. | 637 // Tell the browser about the actions permitted for a new touch point. |
| 638 void SetTouchAction(blink::WebTouchAction touch_action) override; | 638 void SetTouchAction(cc::TouchAction touch_action) override; |
| 639 | 639 |
| 640 // Sends an ACK to the browser process during the next compositor frame. | 640 // Sends an ACK to the browser process during the next compositor frame. |
| 641 void OnWaitNextFrameForTests(int routing_id); | 641 void OnWaitNextFrameForTests(int routing_id); |
| 642 | 642 |
| 643 // Routing ID that allows us to communicate to the parent browser process | 643 // Routing ID that allows us to communicate to the parent browser process |
| 644 // RenderWidgetHost. | 644 // RenderWidgetHost. |
| 645 const int32_t routing_id_; | 645 const int32_t routing_id_; |
| 646 | 646 |
| 647 // Dependencies for initializing a compositor, including flags for optional | 647 // Dependencies for initializing a compositor, including flags for optional |
| 648 // features. | 648 // features. |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 882 scoped_refptr<MainThreadEventQueue> input_event_queue_; | 882 scoped_refptr<MainThreadEventQueue> input_event_queue_; |
| 883 | 883 |
| 884 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; | 884 base::WeakPtrFactory<RenderWidget> weak_ptr_factory_; |
| 885 | 885 |
| 886 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 886 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
| 887 }; | 887 }; |
| 888 | 888 |
| 889 } // namespace content | 889 } // namespace content |
| 890 | 890 |
| 891 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 891 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
| OLD | NEW |