Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: content/renderer/render_widget.h

Issue 964403003: Make it possible to set the display mode from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_ &&
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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 void DoDeferredSetWindowRect(const blink::WebRect& pos); 389 void DoDeferredSetWindowRect(const blink::WebRect& pos);
387 390
388 // Resizes the render widget. 391 // Resizes the render widget.
389 void Resize(const gfx::Size& new_size, 392 void Resize(const gfx::Size& new_size,
390 const gfx::Size& physical_backing_size, 393 const gfx::Size& physical_backing_size,
391 bool top_controls_shrink_blink_size, 394 bool top_controls_shrink_blink_size,
392 float top_controls_height, 395 float top_controls_height,
393 const gfx::Size& visible_viewport_size, 396 const gfx::Size& visible_viewport_size,
394 const gfx::Rect& resizer_rect, 397 const gfx::Rect& resizer_rect,
395 bool is_fullscreen, 398 bool is_fullscreen,
399 blink::WebDisplayMode display_mode,
396 ResizeAck resize_ack); 400 ResizeAck resize_ack);
397 // Used to force the size of a window when running layout tests. 401 // Used to force the size of a window when running layout tests.
398 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); 402 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect);
399 virtual void SetScreenMetricsEmulationParameters( 403 virtual void SetScreenMetricsEmulationParameters(
400 float device_scale_factor, 404 float device_scale_factor,
401 const gfx::Point& root_layer_offset, 405 const gfx::Point& root_layer_offset,
402 float root_layer_scale); 406 float root_layer_scale);
403 #if defined(OS_MACOSX) || defined(OS_ANDROID) 407 #if defined(OS_MACOSX) || defined(OS_ANDROID)
404 void SetExternalPopupOriginAdjustmentsForEmulation( 408 void SetExternalPopupOriginAdjustmentsForEmulation(
405 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator); 409 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 661
658 // Indicates that we shouldn't bother generated paint events. 662 // Indicates that we shouldn't bother generated paint events.
659 bool is_hidden_; 663 bool is_hidden_;
660 664
661 // Indicates that we are never visible, so never produce graphical output. 665 // Indicates that we are never visible, so never produce graphical output.
662 bool never_visible_; 666 bool never_visible_;
663 667
664 // Indicates that we are in fullscreen mode. 668 // Indicates that we are in fullscreen mode.
665 bool is_fullscreen_; 669 bool is_fullscreen_;
666 670
671 // The Display mode.
672 blink::WebDisplayMode display_mode_;
673
667 // Indicates whether we have been focused/unfocused by the browser. 674 // Indicates whether we have been focused/unfocused by the browser.
668 bool has_focus_; 675 bool has_focus_;
669 676
670 // Are we currently handling an input event? 677 // Are we currently handling an input event?
671 bool handling_input_event_; 678 bool handling_input_event_;
672 679
673 // Are we currently handling an ime event? 680 // Are we currently handling an ime event?
674 bool handling_ime_event_; 681 bool handling_ime_event_;
675 682
676 // Type of the input event we are currently handling. 683 // Type of the input event we are currently handling.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 ui::MenuSourceType context_menu_source_type_; 812 ui::MenuSourceType context_menu_source_type_;
806 bool has_host_context_menu_location_; 813 bool has_host_context_menu_location_;
807 gfx::Point host_context_menu_location_; 814 gfx::Point host_context_menu_location_;
808 815
809 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 816 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
810 }; 817 };
811 818
812 } // namespace content 819 } // namespace content
813 820
814 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 821 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698