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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 | 117 |
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() const { return is_fullscreen_; } | 127 bool is_fullscreen() const { return is_fullscreen_ || |
scheib
2015/03/27 16:50:51
Yikes, if we're fullscreen why isn't is_fullscreen
| |
128 display_mode_ == blink::WebDisplayModeFullscreen; } | |
129 blink::WebDisplayMode display_mode() const { return display_mode_; } | |
127 bool is_hidden() const { return is_hidden_; } | 130 bool is_hidden() const { return is_hidden_; } |
128 bool handling_input_event() const { return handling_input_event_; } | 131 bool handling_input_event() const { return handling_input_event_; } |
129 // Temporary for debugging purposes... | 132 // Temporary for debugging purposes... |
130 bool closing() const { return closing_; } | 133 bool closing() const { return closing_; } |
131 bool is_swapped_out() { return is_swapped_out_; } | 134 bool is_swapped_out() { return is_swapped_out_; } |
132 ui::MenuSourceType context_menu_source_type() { | 135 ui::MenuSourceType context_menu_source_type() { |
133 return context_menu_source_type_; | 136 return context_menu_source_type_; |
134 } | 137 } |
135 bool has_host_context_menu_location() { | 138 bool has_host_context_menu_location() { |
136 return has_host_context_menu_location_; | 139 return has_host_context_menu_location_; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 void DoDeferredSetWindowRect(const blink::WebRect& pos); | 385 void DoDeferredSetWindowRect(const blink::WebRect& pos); |
383 | 386 |
384 // Resizes the render widget. | 387 // Resizes the render widget. |
385 void Resize(const gfx::Size& new_size, | 388 void Resize(const gfx::Size& new_size, |
386 const gfx::Size& physical_backing_size, | 389 const gfx::Size& physical_backing_size, |
387 bool top_controls_shrink_blink_size, | 390 bool top_controls_shrink_blink_size, |
388 float top_controls_height, | 391 float top_controls_height, |
389 const gfx::Size& visible_viewport_size, | 392 const gfx::Size& visible_viewport_size, |
390 const gfx::Rect& resizer_rect, | 393 const gfx::Rect& resizer_rect, |
391 bool is_fullscreen, | 394 bool is_fullscreen, |
395 blink::WebDisplayMode display_mode, | |
392 ResizeAck resize_ack); | 396 ResizeAck resize_ack); |
393 // 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. |
394 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); | 398 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); |
395 virtual void SetScreenMetricsEmulationParameters( | 399 virtual void SetScreenMetricsEmulationParameters( |
396 bool enabled, | 400 bool enabled, |
397 const blink::WebDeviceEmulationParams& params); | 401 const blink::WebDeviceEmulationParams& params); |
398 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 402 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
399 void SetExternalPopupOriginAdjustmentsForEmulation( | 403 void SetExternalPopupOriginAdjustmentsForEmulation( |
400 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator); | 404 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator); |
401 #endif | 405 #endif |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
654 | 658 |
655 // Indicates that we shouldn't bother generated paint events. | 659 // Indicates that we shouldn't bother generated paint events. |
656 bool is_hidden_; | 660 bool is_hidden_; |
657 | 661 |
658 // Indicates that we are never visible, so never produce graphical output. | 662 // Indicates that we are never visible, so never produce graphical output. |
659 bool never_visible_; | 663 bool never_visible_; |
660 | 664 |
661 // Indicates that we are in fullscreen mode. | 665 // Indicates that we are in fullscreen mode. |
662 bool is_fullscreen_; | 666 bool is_fullscreen_; |
663 | 667 |
668 // The Display mode. | |
669 blink::WebDisplayMode display_mode_; | |
670 | |
664 // Indicates whether we have been focused/unfocused by the browser. | 671 // Indicates whether we have been focused/unfocused by the browser. |
665 bool has_focus_; | 672 bool has_focus_; |
666 | 673 |
667 // Are we currently handling an input event? | 674 // Are we currently handling an input event? |
668 bool handling_input_event_; | 675 bool handling_input_event_; |
669 | 676 |
670 // Are we currently handling an ime event? | 677 // Are we currently handling an ime event? |
671 bool handling_ime_event_; | 678 bool handling_ime_event_; |
672 | 679 |
673 // 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... | |
802 ui::MenuSourceType context_menu_source_type_; | 809 ui::MenuSourceType context_menu_source_type_; |
803 bool has_host_context_menu_location_; | 810 bool has_host_context_menu_location_; |
804 gfx::Point host_context_menu_location_; | 811 gfx::Point host_context_menu_location_; |
805 | 812 |
806 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 813 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
807 }; | 814 }; |
808 | 815 |
809 } // namespace content | 816 } // namespace content |
810 | 817 |
811 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 818 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |