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 <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/auto_reset.h" | 11 #include "base/auto_reset.h" |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
19 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
20 #include "content/common/cursors/webcursor.h" | 20 #include "content/common/cursors/webcursor.h" |
21 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 21 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
22 #include "content/common/input/synthetic_gesture_params.h" | 22 #include "content/common/input/synthetic_gesture_params.h" |
23 #include "content/renderer/message_delivery_policy.h" | 23 #include "content/renderer/message_delivery_policy.h" |
24 #include "ipc/ipc_listener.h" | 24 #include "ipc/ipc_listener.h" |
25 #include "ipc/ipc_sender.h" | 25 #include "ipc/ipc_sender.h" |
| 26 #include "third_party/WebKit/public/platform/WebDisplayMode.h" |
26 #include "third_party/WebKit/public/platform/WebRect.h" | 27 #include "third_party/WebKit/public/platform/WebRect.h" |
27 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 28 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
28 #include "third_party/WebKit/public/web/WebInputEvent.h" | 29 #include "third_party/WebKit/public/web/WebInputEvent.h" |
29 #include "third_party/WebKit/public/web/WebPopupType.h" | 30 #include "third_party/WebKit/public/web/WebPopupType.h" |
30 #include "third_party/WebKit/public/web/WebTextDirection.h" | 31 #include "third_party/WebKit/public/web/WebTextDirection.h" |
31 #include "third_party/WebKit/public/web/WebTextInputInfo.h" | 32 #include "third_party/WebKit/public/web/WebTextInputInfo.h" |
32 #include "third_party/WebKit/public/web/WebTouchAction.h" | 33 #include "third_party/WebKit/public/web/WebTouchAction.h" |
33 #include "third_party/WebKit/public/web/WebWidget.h" | 34 #include "third_party/WebKit/public/web/WebWidget.h" |
34 #include "third_party/WebKit/public/web/WebWidgetClient.h" | 35 #include "third_party/WebKit/public/web/WebWidgetClient.h" |
35 #include "third_party/skia/include/core/SkBitmap.h" | 36 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // Creates a WebWidget based on the popup type. | 118 // Creates a WebWidget based on the popup type. |
118 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); | 119 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget); |
119 | 120 |
120 int32 routing_id() const { return routing_id_; } | 121 int32 routing_id() const { return routing_id_; } |
121 int32 surface_id() const { return surface_id_; } | 122 int32 surface_id() const { return surface_id_; } |
122 CompositorDependencies* compositor_deps() const { return compositor_deps_; } | 123 CompositorDependencies* compositor_deps() const { return compositor_deps_; } |
123 blink::WebWidget* webwidget() const { return webwidget_; } | 124 blink::WebWidget* webwidget() const { return webwidget_; } |
124 gfx::Size size() const { return size_; } | 125 gfx::Size size() const { return size_; } |
125 bool has_focus() const { return has_focus_; } | 126 bool has_focus() const { return has_focus_; } |
126 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } | 127 bool is_fullscreen_granted() const { return is_fullscreen_granted_; } |
| 128 blink::WebDisplayMode display_mode() const { return display_mode_; } |
127 bool is_hidden() const { return is_hidden_; } | 129 bool is_hidden() const { return is_hidden_; } |
128 bool handling_input_event() const { return handling_input_event_; } | 130 bool handling_input_event() const { return handling_input_event_; } |
129 // Temporary for debugging purposes... | 131 // Temporary for debugging purposes... |
130 bool closing() const { return closing_; } | 132 bool closing() const { return closing_; } |
131 bool is_swapped_out() { return is_swapped_out_; } | 133 bool is_swapped_out() { return is_swapped_out_; } |
132 ui::MenuSourceType context_menu_source_type() { | 134 ui::MenuSourceType context_menu_source_type() { |
133 return context_menu_source_type_; | 135 return context_menu_source_type_; |
134 } | 136 } |
135 bool has_host_context_menu_location() { | 137 bool has_host_context_menu_location() { |
136 return has_host_context_menu_location_; | 138 return has_host_context_menu_location_; |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 void NotifyOnClose(); | 385 void NotifyOnClose(); |
384 | 386 |
385 // Resizes the render widget. | 387 // Resizes the render widget. |
386 void Resize(const gfx::Size& new_size, | 388 void Resize(const gfx::Size& new_size, |
387 const gfx::Size& physical_backing_size, | 389 const gfx::Size& physical_backing_size, |
388 bool top_controls_shrink_blink_size, | 390 bool top_controls_shrink_blink_size, |
389 float top_controls_height, | 391 float top_controls_height, |
390 const gfx::Size& visible_viewport_size, | 392 const gfx::Size& visible_viewport_size, |
391 const gfx::Rect& resizer_rect, | 393 const gfx::Rect& resizer_rect, |
392 bool is_fullscreen_granted, | 394 bool is_fullscreen_granted, |
| 395 blink::WebDisplayMode display_mode, |
393 ResizeAck resize_ack); | 396 ResizeAck resize_ack); |
394 // Used to force the size of a window when running layout tests. | 397 // Used to force the size of a window when running layout tests. |
395 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); | 398 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); |
396 virtual void SetScreenMetricsEmulationParameters( | 399 virtual void SetScreenMetricsEmulationParameters( |
397 bool enabled, | 400 bool enabled, |
398 const blink::WebDeviceEmulationParams& params); | 401 const blink::WebDeviceEmulationParams& params); |
399 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 402 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
400 void SetExternalPopupOriginAdjustmentsForEmulation( | 403 void SetExternalPopupOriginAdjustmentsForEmulation( |
401 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator); | 404 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator); |
402 #endif | 405 #endif |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 658 |
656 // Indicates that we shouldn't bother generated paint events. | 659 // Indicates that we shouldn't bother generated paint events. |
657 bool is_hidden_; | 660 bool is_hidden_; |
658 | 661 |
659 // Indicates that we are never visible, so never produce graphical output. | 662 // Indicates that we are never visible, so never produce graphical output. |
660 bool never_visible_; | 663 bool never_visible_; |
661 | 664 |
662 // Indicates whether tab-initiated fullscreen was granted. | 665 // Indicates whether tab-initiated fullscreen was granted. |
663 bool is_fullscreen_granted_; | 666 bool is_fullscreen_granted_; |
664 | 667 |
| 668 // Indicates the display mode. |
| 669 blink::WebDisplayMode display_mode_; |
| 670 |
665 // Indicates whether we have been focused/unfocused by the browser. | 671 // Indicates whether we have been focused/unfocused by the browser. |
666 bool has_focus_; | 672 bool has_focus_; |
667 | 673 |
668 // Are we currently handling an input event? | 674 // Are we currently handling an input event? |
669 bool handling_input_event_; | 675 bool handling_input_event_; |
670 | 676 |
671 // Are we currently handling an ime event? | 677 // Are we currently handling an ime event? |
672 bool handling_ime_event_; | 678 bool handling_ime_event_; |
673 | 679 |
674 // Type of the input event we are currently handling. | 680 // Type of the input event we are currently handling. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 ui::MenuSourceType context_menu_source_type_; | 809 ui::MenuSourceType context_menu_source_type_; |
804 bool has_host_context_menu_location_; | 810 bool has_host_context_menu_location_; |
805 gfx::Point host_context_menu_location_; | 811 gfx::Point host_context_menu_location_; |
806 | 812 |
807 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 813 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
808 }; | 814 }; |
809 | 815 |
810 } // namespace content | 816 } // namespace content |
811 | 817 |
812 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 818 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |