blob: c654047b53a2f443d7534fd53b993a407ca56d8f [file] [log] [blame]
[email protected]9f4f3322012-01-18 22:29:561// Copyright (c) 2012 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]2cff0052011-03-18 16:51:445#ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6#define CONTENT_RENDERER_RENDER_WIDGET_H_
initial.commit09911bf2008-07-26 23:55:297
avi1023d012015-12-25 02:39:148#include <stddef.h>
9#include <stdint.h>
10
[email protected]aa4117f2011-12-09 22:19:2111#include <deque>
[email protected]0e241b4b2012-08-18 09:06:2712#include <map>
[email protected]010ea08a2009-10-11 20:21:3213
[email protected]586871b2014-07-22 17:05:1114#include "base/callback.h"
[email protected]f3112a52011-09-30 23:47:4915#include "base/compiler_specific.h"
avi1023d012015-12-25 02:39:1416#include "base/macros.h"
[email protected]3b63f8f42011-03-28 01:54:1517#include "base/memory/ref_counted.h"
[email protected]8704f89b2011-04-15 00:30:0518#include "base/memory/scoped_ptr.h"
[email protected]bffc8302014-01-23 20:52:1619#include "base/observer_list.h"
[email protected]abb522162013-06-28 01:54:1620#include "base/time/time.h"
avi1023d012015-12-25 02:39:1421#include "build/build_config.h"
[email protected]f3112a52011-09-30 23:47:4922#include "content/common/content_export.h"
[email protected]c2809346d2014-03-20 00:11:0323#include "content/common/cursors/webcursor.h"
[email protected]ed7defa2013-03-12 21:29:5924#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
[email protected]9017d7852013-11-21 17:47:3525#include "content/common/input/synthetic_gesture_params.h"
fsamuel72464894f2015-12-15 06:59:3126#include "content/renderer/input/render_widget_input_handler.h"
27#include "content/renderer/input/render_widget_input_handler_delegate.h"
[email protected]586871b2014-07-22 17:05:1128#include "content/renderer/message_delivery_policy.h"
[email protected]4f86bdb2012-11-10 19:11:1929#include "ipc/ipc_listener.h"
30#include "ipc/ipc_sender.h"
mikhail.pozdnyakovc0e251b2015-04-15 06:51:1231#include "third_party/WebKit/public/platform/WebDisplayMode.h"
[email protected]5c30b5e02013-05-30 03:46:0832#include "third_party/WebKit/public/platform/WebRect.h"
[email protected]2255a9332013-06-17 05:12:3133#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
[email protected]c27dd4f2014-05-22 18:05:1934#include "third_party/WebKit/public/web/WebInputEvent.h"
[email protected]2255a9332013-06-17 05:12:3135#include "third_party/WebKit/public/web/WebPopupType.h"
36#include "third_party/WebKit/public/web/WebTextDirection.h"
37#include "third_party/WebKit/public/web/WebTextInputInfo.h"
[email protected]5d0bbdfa92013-12-10 00:35:5138#include "third_party/WebKit/public/web/WebTouchAction.h"
[email protected]0e45bd02013-07-12 20:20:0239#include "third_party/WebKit/public/web/WebWidget.h"
[email protected]2255a9332013-06-17 05:12:3140#include "third_party/WebKit/public/web/WebWidgetClient.h"
[email protected]d65adb12010-04-28 17:26:4941#include "third_party/skia/include/core/SkBitmap.h"
[email protected]b256eca2013-07-11 10:57:4042#include "ui/base/ime/text_input_mode.h"
[email protected]ad26ef42011-06-17 07:59:4543#include "ui/base/ime/text_input_type.h"
[email protected]a09d53ce2014-01-31 00:46:4244#include "ui/base/ui_base_types.h"
tfarina93bfa912014-12-05 14:23:1545#include "ui/gfx/geometry/rect.h"
46#include "ui/gfx/geometry/vector2d.h"
47#include "ui/gfx/geometry/vector2d_f.h"
[email protected]08397d52011-02-05 01:53:3848#include "ui/gfx/native_widget_types.h"
[email protected]db4fc1e2013-09-06 20:01:5149#include "ui/gfx/range/range.h"
[email protected]d353541f2012-05-03 22:45:4150#include "ui/surface/transport_dib.h"
initial.commit09911bf2008-07-26 23:55:2951
[email protected]0fdd5012013-05-29 08:05:5652struct ViewMsg_Resize_Params;
[email protected]aa4117f2011-12-09 22:19:2153
[email protected]484955942010-08-19 16:13:1854namespace IPC {
55class SyncMessage;
[email protected]586871b2014-07-22 17:05:1156class SyncMessageFilter;
[email protected]484955942010-08-19 16:13:1857}
58
[email protected]180ef242013-11-07 06:50:4659namespace blink {
[email protected]19193682014-04-03 15:01:4360struct WebDeviceEmulationParams;
[email protected]41d86852012-11-07 12:23:2461class WebGestureEvent;
kenrba7199832015-01-22 23:44:5962class WebLocalFrame;
[email protected]6a8ddba52010-09-05 04:38:0663class WebMouseEvent;
donnda070f3c2015-01-16 19:54:1164class WebNode;
65struct WebPoint;
[email protected]526476902011-10-06 20:34:0666}
67
[email protected]586871b2014-07-22 17:05:1168namespace cc {
[email protected]586871b2014-07-22 17:05:1169class OutputSurface;
70class SwapPromise;
71}
[email protected]ba91a792013-02-06 09:48:2872
[email protected]db4fc1e2013-09-06 20:01:5173namespace gfx {
[email protected]4de6d1692011-10-12 08:45:4474class Range;
75}
76
alexclarke7fa93942015-10-21 15:37:1177namespace scheduler {
78class RenderWidgetSchedulingState;
79}
80
[email protected]e9ff79c2012-10-19 21:31:2681namespace content {
danakj6e3bf8012014-12-16 18:27:5382class CompositorDependencies;
[email protected]b2e4c70132013-10-03 02:07:5183class ExternalPopupMenu;
[email protected]586871b2014-07-22 17:05:1184class FrameSwapMessageQueue;
changwanf2a707b2015-10-30 08:22:1685class ImeEventGuard;
[email protected]bffc8302014-01-23 20:52:1686class RenderFrameImpl;
[email protected]e3244ed2014-06-20 20:04:2787class RenderFrameProxy;
[email protected]ba91a792013-02-06 09:48:2888class RenderWidgetCompositor;
[email protected]5b45ad42013-10-25 00:42:0489class ResizingModeSelector;
[email protected]b2e4c70132013-10-03 02:07:5190struct ContextMenuParams;
jddukec05612b2015-06-25 23:13:1891struct DidOverscrollParams;
[email protected]29e2fb42013-07-19 01:13:4792struct WebPluginGeometry;
[email protected]e9ff79c2012-10-19 21:31:2693
initial.commit09911bf2008-07-26 23:55:2994// RenderWidget provides a communication bridge between a WebWidget and
95// a RenderWidgetHost, the latter of which lives in a different process.
dchengd96a27a2015-07-24 20:17:3296//
97// RenderWidget is used to implement:
98// - RenderViewImpl (deprecated)
99// - Fullscreen mode (RenderWidgetFullScreen)
100// - Popup "menus" (like the color chooser and date picker)
101// - Widgets for frames (for out-of-process iframe support)
[email protected]f3112a52011-09-30 23:47:49102class CONTENT_EXPORT RenderWidget
[email protected]c47317e2012-06-20 22:35:31103 : public IPC::Listener,
104 public IPC::Sender,
[email protected]180ef242013-11-07 06:50:46105 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient),
fsamuel72464894f2015-12-15 06:59:31106 public RenderWidgetInputHandlerDelegate,
[email protected]f3112a52011-09-30 23:47:49107 public base::RefCounted<RenderWidget> {
initial.commit09911bf2008-07-26 23:55:29108 public:
109 // Creates a new RenderWidget. The opener_id is the routing ID of the
[email protected]380244092011-10-07 17:26:27110 // RenderView that this widget lives inside.
avi1023d012015-12-25 02:39:14111 static RenderWidget* Create(int32_t opener_id,
danakj6e3bf8012014-12-16 18:27:53112 CompositorDependencies* compositor_deps,
[email protected]180ef242013-11-07 06:50:46113 blink::WebPopupType popup_type,
114 const blink::WebScreenInfo& screen_info);
initial.commit09911bf2008-07-26 23:55:29115
kenrba7199832015-01-22 23:44:59116 // Creates a new RenderWidget that will be attached to a RenderFrame.
117 static RenderWidget* CreateForFrame(int routing_id,
kenrba7199832015-01-22 23:44:59118 bool hidden,
119 const blink::WebScreenInfo& screen_info,
120 CompositorDependencies* compositor_deps,
121 blink::WebLocalFrame* frame);
122
dchengda9b4bb2015-07-20 20:58:08123 // Closes a RenderWidget that was created by |CreateForFrame|.
dcheng3ce04b62015-10-26 23:30:55124 // TODO(avi): De-virtualize this once RenderViewImpl has-a RenderWidget.
125 // https://crbug.com/545684
126 virtual void CloseForFrame();
[email protected]484955942010-08-19 16:13:18127
avi1023d012015-12-25 02:39:14128 int32_t routing_id() const { return routing_id_; }
fsamuele8326c742016-01-12 00:49:39129 void SetRoutingID(int32_t routing_id);
130
danakj6e3bf8012014-12-16 18:27:53131 CompositorDependencies* compositor_deps() const { return compositor_deps_; }
[email protected]180ef242013-11-07 06:50:46132 blink::WebWidget* webwidget() const { return webwidget_; }
[email protected]93b9d692011-04-13 00:44:31133 gfx::Size size() const { return size_; }
mikhail.pozdnyakovf2c902a2015-04-14 08:09:12134 bool is_fullscreen_granted() const { return is_fullscreen_granted_; }
mikhail.pozdnyakovc0e251b2015-04-15 06:51:12135 blink::WebDisplayMode display_mode() const { return display_mode_; }
[email protected]204f1df2012-01-04 20:21:13136 bool is_hidden() const { return is_hidden_; }
[email protected]4ee64622014-03-21 22:34:15137 // Temporary for debugging purposes...
138 bool closing() const { return closing_; }
139 bool is_swapped_out() { return is_swapped_out_; }
simonhong628f9812015-04-27 23:13:20140 bool for_oopif() { return for_oopif_; }
[email protected]be1af0662014-07-29 19:55:51141 bool has_host_context_menu_location() {
142 return has_host_context_menu_location_;
143 }
144 gfx::Point host_context_menu_location() {
145 return host_context_menu_location_;
[email protected]4ee64622014-03-21 22:34:15146 }
[email protected]589621b2010-09-23 22:01:07147
kenrba7199832015-01-22 23:44:59148 // ScreenInfo exposed so it can be passed to subframe RenderWidgets.
149 blink::WebScreenInfo screen_info() const { return screen_info_; }
150
[email protected]bffc8302014-01-23 20:52:16151 // Functions to track out-of-process frames for special notifications.
[email protected]e3244ed2014-06-20 20:04:27152 void RegisterRenderFrameProxy(RenderFrameProxy* proxy);
153 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy);
[email protected]bffc8302014-01-23 20:52:16154
[email protected]de3c5d82014-05-28 22:12:59155 // Functions to track all RenderFrame objects associated with this
156 // RenderWidget.
157 void RegisterRenderFrame(RenderFrameImpl* frame);
158 void UnregisterRenderFrame(RenderFrameImpl* frame);
159
[email protected]a017938b2014-05-27 21:17:17160#if defined(VIDEO_HOLE)
161 void RegisterVideoHoleFrame(RenderFrameImpl* frame);
162 void UnregisterVideoHoleFrame(RenderFrameImpl* frame);
163#endif // defined(VIDEO_HOLE)
164
[email protected]c47317e2012-06-20 22:35:31165 // IPC::Listener
dcheng6d18e402014-10-21 12:32:52166 bool OnMessageReceived(const IPC::Message& msg) override;
initial.commit09911bf2008-07-26 23:55:29167
[email protected]c47317e2012-06-20 22:35:31168 // IPC::Sender
dcheng6d18e402014-10-21 12:32:52169 bool Send(IPC::Message* msg) override;
initial.commit09911bf2008-07-26 23:55:29170
fsamuel72464894f2015-12-15 06:59:31171 // RenderWidgetInputHandlerDelegate
172 void FocusChangeComplete() override;
173 bool HasTouchEventHandlersAt(const gfx::Point& point) const override;
174 void ObserveWheelEventAndResult(const blink::WebMouseWheelEvent& wheel_event,
175 const gfx::Vector2dF& wheel_unused_delta,
176 bool event_processed) override;
177 void OnDidHandleKeyEvent() override;
178 void OnDidOverscroll(const DidOverscrollParams& params) override;
179 void OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) override;
fsamuele8326c742016-01-12 00:49:39180 void SetInputHandler(RenderWidgetInputHandler* input_handler) override;
fsamuel72464894f2015-12-15 06:59:31181 void UpdateTextInputState(ShowIme show_ime,
182 ChangeSource change_source) override;
183 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override;
184 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override;
185
[email protected]180ef242013-11-07 06:50:46186 // blink::WebWidgetClient
avi5c77d212015-09-25 20:08:25187 void didAutoResize(const blink::WebSize& new_size) override;
188 void initializeLayerTreeView() override;
189 blink::WebLayerTreeView* layerTreeView() override;
dglazkovf0e1d6d2015-10-10 02:13:48190 void didMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override;
avi5c77d212015-09-25 20:08:25191 void didFocus() override;
avi5c77d212015-09-25 20:08:25192 void didChangeCursor(const blink::WebCursorInfo&) override;
193 void closeWidgetSoon() override;
194 void show(blink::WebNavigationPolicy) override;
195 blink::WebRect windowRect() override;
196 void setToolTipText(const blink::WebString& text,
197 blink::WebTextDirection hint) override;
198 void setWindowRect(const blink::WebRect&) override;
199 blink::WebRect windowResizerRect() override;
200 blink::WebRect rootWindowRect() override;
201 blink::WebScreenInfo screenInfo() override;
avi5c77d212015-09-25 20:08:25202 void resetInputMethod() override;
203 void didHandleGestureEvent(const blink::WebGestureEvent& event,
204 bool event_cancelled) override;
205 void didOverscroll(const blink::WebFloatSize& unusedDelta,
206 const blink::WebFloatSize& accumulatedRootOverScroll,
207 const blink::WebFloatPoint& position,
208 const blink::WebFloatSize& velocity) override;
209 void showImeIfNeeded() override;
oshima581cf3f62015-12-16 20:08:01210 void convertViewportToWindow(blink::WebRect* rect) override;
[email protected]4873c7d2009-07-16 06:36:28211
fsamuel72464894f2015-12-15 06:59:31212 // Override point to obtain that the current input method state and caret
213 // position.
214 virtual ui::TextInputType GetTextInputType();
215 virtual ui::TextInputType WebKitToUiTextInputType(
216 blink::WebTextInputType type);
217
donnda070f3c2015-01-16 19:54:11218#if defined(OS_ANDROID)
219 // Notifies that a tap was not consumed, so showing a UI for the unhandled
220 // tap may be needed.
donnd57e54f52015-02-26 19:03:37221 // Performs various checks on the given WebNode to apply heuristics to
222 // determine if triggering is appropriate.
avi5c77d212015-09-25 20:08:25223 void showUnhandledTapUIIfNeeded(const blink::WebPoint& tapped_position,
224 const blink::WebNode& tapped_node,
225 bool page_changed) override;
donnda070f3c2015-01-16 19:54:11226#endif
227
[email protected]7912e822014-04-16 02:37:03228 // Begins the compositor's scheduler to start producing frames.
229 void StartCompositor();
230
[email protected]aeeedad2014-08-22 18:16:22231 // Stop compositing.
ennef3c58142014-12-09 21:44:38232 void WillCloseLayerTreeView();
[email protected]aeeedad2014-08-22 18:16:22233
[email protected]4873c7d2009-07-16 06:36:28234 // Called when a plugin is moved. These events are queued up and sent with
235 // the next paint or scroll message to the host.
[email protected]29e2fb42013-07-19 01:13:47236 void SchedulePluginMove(const WebPluginGeometry& move);
initial.commit09911bf2008-07-26 23:55:29237
[email protected]268654772009-08-06 23:02:04238 // Called when a plugin window has been destroyed, to make sure the currently
239 // pending moves don't try to reference it.
240 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window);
241
[email protected]24ed0432013-04-24 07:50:31242 RenderWidgetCompositor* compositor() const;
243
fsamuel72464894f2015-12-15 06:59:31244 const RenderWidgetInputHandler& input_handler() const {
fsamuele8326c742016-01-12 00:49:39245 return *input_handler_;
fsamuel72464894f2015-12-15 06:59:31246 }
247
248 void SetHandlingInputEventForTesting(bool handling_input_event);
249
250 // When paused in debugger, we send ack for mouse event early. This ensures
251 // that we continue receiving mouse moves and pass them to debugger. Returns
252 // whether we are paused in mouse move event and have sent the ack.
253 bool SendAckForMouseMoveFromDebugger();
254
255 // When resumed from pause in debugger while handling mouse move,
256 // we should not send an extra ack (see SendAckForMouseMoveFromDebugger).
257 void IgnoreAckForMouseMoveFromDebugger();
258
[email protected]ebc0e1df2013-08-01 02:46:22259 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback);
[email protected]ba91a792013-02-06 09:48:28260
[email protected]79fa22e2013-08-23 15:18:12261 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll).
262 typedef base::Callback<void()> SyntheticGestureCompletionCallback;
[email protected]0e241b4b2012-08-18 09:06:27263
[email protected]9017d7852013-11-21 17:47:35264 // Send a synthetic gesture to the browser to be queued to the synthetic
265 // gesture controller.
266 void QueueSyntheticGesture(
267 scoped_ptr<SyntheticGestureParams> gesture_params,
268 const SyntheticGestureCompletionCallback& callback);
[email protected]1e1dd182013-09-12 01:51:15269
[email protected]586871b2014-07-22 17:05:11270 // Deliveres |message| together with compositor state change updates. The
271 // exact behavior depends on |policy|.
272 // This mechanism is not a drop-in replacement for IPC: messages sent this way
273 // will not be automatically available to BrowserMessageFilter, for example.
274 // FIFO ordering is preserved between messages enqueued with the same
275 // |policy|, the ordering between messages enqueued for different policies is
276 // undefined.
277 //
278 // |msg| message to send, ownership of |msg| is transferred.
279 // |policy| see the comment on MessageDeliveryPolicy.
280 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
281
changwanf2a707b2015-10-30 08:22:16282 // Handle start and finish of IME event guard.
283 void OnImeEventGuardStart(ImeEventGuard* guard);
284 void OnImeEventGuardFinish(ImeEventGuard* guard);
[email protected]66fca5bc2013-05-23 06:58:29285
[email protected]4ee64622014-03-21 22:34:15286 // Returns whether we currently should handle an IME event.
287 bool ShouldHandleImeEvent();
288
rouslanf7ebd8832015-01-22 01:54:14289 // Called by the compositor when page scale animation completed.
290 virtual void DidCompletePageScaleAnimation() {}
291
[email protected]b2e4c70132013-10-03 02:07:51292 // ScreenMetricsEmulator class manages screen emulation inside a render
293 // widget. This includes resizing, placing view on the screen at desired
294 // position, changing device scale factor, and scaling down the whole
295 // widget if required to fit into the browser window.
296 class ScreenMetricsEmulator;
297
[email protected]b2e4c70132013-10-03 02:07:51298 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator);
[email protected]2d6836f42014-07-02 17:25:31299 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor);
[email protected]b2e4c70132013-10-03 02:07:51300
jdduke491a3f0c2015-06-15 23:30:26301 // Indicates that the compositor is about to begin a frame. This is primarily
302 // to signal to flow control mechanisms that a frame is beginning, not to
303 // perform actual painting work.
304 void WillBeginCompositorFrame();
305
306 // Notifies about a compositor frame commit operation having finished.
307 virtual void DidCommitCompositorFrame();
308
309 // Notifies that the draw commands for a committed frame have been issued.
310 void DidCommitAndDrawCompositorFrame();
311
312 // Notifies that the compositor has posted a swapbuffers operation to the GPU
313 // process.
314 void DidCompleteSwapBuffers();
315
316 void ScheduleComposite();
[email protected]7d08a9352013-10-15 08:24:56317 void ScheduleCompositeWithForcedRedraw();
318
[email protected]4d7e46a2013-11-08 05:33:40319 // Called by the compositor in single-threaded mode when a swap is posted,
320 // completes or is aborted.
321 void OnSwapBuffersPosted();
322 void OnSwapBuffersComplete();
323 void OnSwapBuffersAborted();
324
[email protected]7a4e2532013-12-02 21:30:02325 // Checks if the selection bounds have been changed. If they are changed,
326 // the new value will be sent to the browser process.
327 void UpdateSelectionBounds();
328
dtrainor5ef644e2015-11-19 00:12:47329 // Called by the compositor to forward a proto that represents serialized
330 // compositor state.
331 void ForwardCompositorProto(const std::vector<uint8_t>& proto);
332
[email protected]e5e438d62014-03-27 21:47:16333 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
334
[email protected]a09d53ce2014-01-31 00:46:42335 void OnShowHostContextMenu(ContextMenuParams* params);
[email protected]7a4e2532013-12-02 21:30:02336
[email protected]7a4e2532013-12-02 21:30:02337 // Checks if the composition range or composition character bounds have been
338 // changed. If they are changed, the new value will be sent to the browser
yukawa5f21c6a2014-10-27 17:09:30339 // process. This method does nothing when the browser process is not able to
340 // handle composition range and composition character bounds.
[email protected]7a4e2532013-12-02 21:30:02341 void UpdateCompositionInfo(bool should_update_range);
[email protected]7a4e2532013-12-02 21:30:02342
ennef3c58142014-12-09 21:44:38343 bool host_closing() const { return host_closing_; }
344
initial.commit09911bf2008-07-26 23:55:29345 protected:
[email protected]8085dbc82008-09-26 22:53:44346 // Friend RefCounted so that the dtor can be non-public. Using this class
347 // without ref-counting is an error.
348 friend class base::RefCounted<RenderWidget>;
fsamuele8326c742016-01-12 00:49:39349
[email protected]7339cd22010-10-27 00:11:20350 // For unit tests.
[email protected]e9ff79c2012-10-19 21:31:26351 friend class RenderWidgetTest;
[email protected]8085dbc82008-09-26 22:53:44352
[email protected]61e2b3cc2012-03-02 16:13:34353 enum ResizeAck {
354 SEND_RESIZE_ACK,
355 NO_RESIZE_ACK,
356 };
357
dcheng35d31c112015-07-22 00:17:36358 RenderWidget(CompositorDependencies* compositor_deps,
359 blink::WebPopupType popup_type,
[email protected]180ef242013-11-07 06:50:46360 const blink::WebScreenInfo& screen_info,
[email protected]1ac10dca2013-08-20 20:47:04361 bool swapped_out,
[email protected]7912e822014-04-16 02:37:03362 bool hidden,
363 bool never_visible);
[email protected]ce2b28e2012-08-09 15:53:57364
dcheng6d18e402014-10-21 12:32:52365 ~RenderWidget() override;
initial.commit09911bf2008-07-26 23:55:29366
dchengda9b4bb2015-07-20 20:58:08367 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget,
368 blink::WebLocalFrame* frame);
369
370 // Creates a WebWidget based on the popup type.
371 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget);
372
pimanc4af3072015-10-02 03:45:59373 // Initializes this view with the given opener.
avi1023d012015-12-25 02:39:14374 bool Init(int32_t opener_id);
initial.commit09911bf2008-07-26 23:55:29375
[email protected]484955942010-08-19 16:13:18376 // Called by Init and subclasses to perform initialization.
avi1023d012015-12-25 02:39:14377 bool DoInit(int32_t opener_id,
[email protected]180ef242013-11-07 06:50:46378 blink::WebWidget* web_widget,
[email protected]484955942010-08-19 16:13:18379 IPC::SyncMessage* create_widget_message);
380
[email protected]992db4c2011-05-12 15:37:15381 // Sets whether this RenderWidget has been swapped out to be displayed by
382 // a RenderWidget in a different process. If so, no new IPC messages will be
383 // sent (only ACKs) and the process is free to exit when there are no other
384 // active RenderWidgets.
385 void SetSwappedOut(bool is_swapped_out);
386
[email protected]949b6592014-08-20 13:17:52387 // Allows the process to exit once the unload handler has finished, if there
388 // are no other active RenderWidgets.
389 void WasSwappedOut();
390
[email protected]2533ce12009-05-09 00:02:24391 void DoDeferredClose();
dgozmancf9039cd2015-04-06 12:01:31392 void NotifyOnClose();
dchengda9b4bb2015-07-20 20:58:08393
394 // Close the underlying WebWidget.
395 virtual void Close();
initial.commit09911bf2008-07-26 23:55:29396
[email protected]61e2b3cc2012-03-02 16:13:34397 // Resizes the render widget.
398 void Resize(const gfx::Size& new_size,
[email protected]60d47ac2013-03-01 23:42:44399 const gfx::Size& physical_backing_size,
dtrainorcb7779b82014-12-04 01:08:02400 bool top_controls_shrink_blink_size,
401 float top_controls_height,
[email protected]bb6378fe2014-04-28 21:19:44402 const gfx::Size& visible_viewport_size,
[email protected]61e2b3cc2012-03-02 16:13:34403 const gfx::Rect& resizer_rect,
mikhail.pozdnyakovf2c902a2015-04-14 08:09:12404 bool is_fullscreen_granted,
mikhail.pozdnyakovc0e251b2015-04-15 06:51:12405 blink::WebDisplayMode display_mode,
[email protected]61e2b3cc2012-03-02 16:13:34406 ResizeAck resize_ack);
[email protected]92650162013-10-30 03:31:02407 // Used to force the size of a window when running layout tests.
bokanc007c3a2015-02-03 07:15:56408 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect);
[email protected]b2e4c70132013-10-03 02:07:51409 virtual void SetScreenMetricsEmulationParameters(
dgozman9260b0a12015-03-16 13:45:20410 bool enabled,
411 const blink::WebDeviceEmulationParams& params);
[email protected]53907862014-03-25 15:42:40412#if defined(OS_MACOSX) || defined(OS_ANDROID)
[email protected]b2e4c70132013-10-03 02:07:51413 void SetExternalPopupOriginAdjustmentsForEmulation(
414 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator);
[email protected]53907862014-03-25 15:42:40415#endif
[email protected]61e2b3cc2012-03-02 16:13:34416
initial.commit09911bf2008-07-26 23:55:29417 // RenderWidget IPC message handlers
[email protected]180ef242013-11-07 06:50:46418 void OnHandleInputEvent(const blink::WebInputEvent* event,
jdduke0cf1e662015-10-15 22:43:28419 const ui::LatencyInfo& latency_info);
[email protected]34202de2013-05-06 23:36:22420 void OnCursorVisibilityChange(bool is_visible);
[email protected]c084330e02013-04-27 01:08:15421 void OnMouseCaptureLost();
422 virtual void OnSetFocus(bool enable);
naskoc288745f2015-05-01 22:54:21423 void OnClose();
[email protected]fc4404d2012-11-07 19:53:30424 void OnCreatingNewAck();
[email protected]0fdd5012013-05-29 08:05:56425 virtual void OnResize(const ViewMsg_Resize_Params& params);
dgozman9260b0a12015-03-16 13:45:20426 void OnEnableDeviceEmulation(const blink::WebDeviceEmulationParams& params);
427 void OnDisableDeviceEmulation();
noel89949e62014-09-30 01:12:41428 void OnColorProfile(const std::vector<char>& color_profile);
[email protected]b5913d72012-02-07 22:26:54429 void OnChangeResizeRect(const gfx::Rect& resizer_rect);
[email protected]941e4552010-02-01 21:23:43430 virtual void OnWasHidden();
[email protected]3399dd822014-08-09 11:14:24431 virtual void OnWasShown(bool needs_repainting,
432 const ui::LatencyInfo& latency_info);
avi1023d012015-12-25 02:39:14433 void OnCreateVideoAck(int32_t video_id);
434 void OnUpdateVideoAck(int32_t video_id);
[email protected]2533ce12009-05-09 00:02:24435 void OnRequestMoveAck();
[email protected]56ea1a62011-05-30 07:05:57436 virtual void OnImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26437 const base::string16& text,
[email protected]180ef242013-11-07 06:50:46438 const std::vector<blink::WebCompositionUnderline>& underlines,
[email protected]fa7b1dc2010-06-23 17:53:04439 int selection_start,
440 int selection_end);
[email protected]fcf75d42013-12-03 20:11:26441 virtual void OnImeConfirmComposition(const base::string16& text,
[email protected]db4fc1e2013-09-06 20:01:51442 const gfx::Range& replacement_range,
[email protected]0e45bd02013-07-12 20:20:02443 bool keep_selection);
oshimad5279032015-12-16 18:22:33444 // Called when the device scale factor is changed, or the layer tree is
445 // initialized.
446 virtual void OnDeviceScaleFactorChanged();
447
[email protected]0bc1f572013-04-17 01:46:31448 void OnRepaint(gfx::Size size_to_paint);
[email protected]79fa22e2013-08-23 15:18:12449 void OnSyntheticGestureCompleted();
[email protected]180ef242013-11-07 06:50:46450 void OnSetTextDirection(blink::WebTextDirection direction);
[email protected]872ae5b2011-05-26 20:20:50451 void OnGetFPS();
[email protected]80ad8622012-11-07 16:33:03452 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
453 const gfx::Rect& window_screen_rect);
[email protected]2384b6c2013-02-28 23:58:51454 void OnShowImeIfNeeded();
kenrbb4e2a3b2015-05-14 15:05:05455 void OnSetSurfaceIdNamespace(uint32_t surface_id_namespace);
dtrainor5ef644e2015-11-19 00:12:47456 void OnHandleCompositorProto(const std::vector<uint8_t>& proto);
[email protected]0d1ebed12013-08-05 22:01:13457
[email protected]adb362312014-06-28 06:04:24458#if defined(OS_ANDROID)
changwan3a841162015-08-11 02:53:37459 // Called when we send IME event that expects an ACK.
460 void OnImeEventSentForAck(const blink::WebTextInputInfo& info);
[email protected]0d1ebed12013-08-05 22:01:13461
462 // Called by the browser process for every required IME acknowledgement.
463 void OnImeEventAck();
[email protected]105dffb42013-02-20 03:46:21464#endif
[email protected]0d1ebed12013-08-05 22:01:13465
[email protected]847a2582013-03-09 02:29:51466 // Notify the compositor about a change in viewport size. This should be
467 // used only with auto resize mode WebWidgets, as normal WebWidgets should
468 // go through OnResize.
[email protected]97e1bf72013-03-06 14:06:05469 void AutoResizeCompositor();
470
[email protected]468ac582012-11-20 00:53:19471 virtual void SetDeviceScaleFactor(float device_scale_factor);
[email protected]28ed6b32014-06-08 02:16:27472 virtual bool SetDeviceColorProfile(const std::vector<char>& color_profile);
noeldb4df152014-09-16 17:45:20473 virtual void ResetDeviceColorProfileForTesting();
[email protected]468ac582012-11-20 00:53:19474
[email protected]fcdc5642014-05-09 14:32:24475 virtual void OnOrientationChange();
476
[email protected]29ed96a2012-02-04 18:12:16477 // Override points to notify derived classes that a paint has happened.
[email protected]0704ac32013-10-03 15:24:22478 // DidInitiatePaint happens when that has completed, and subsequent rendering
479 // won't affect the painted content. DidFlushPaint happens once we've received
480 // the ACK that the screen has been updated. For a given paint operation,
481 // these overrides will always be called in the order DidInitiatePaint,
482 // DidFlushPaint.
[email protected]00c39612010-03-06 02:53:28483 virtual void DidInitiatePaint() {}
484 virtual void DidFlushPaint() {}
[email protected]a2f6bc112009-06-27 16:27:25485
[email protected]ed7defa2013-03-12 21:29:59486 virtual GURL GetURLForGraphicsContext3D();
[email protected]65225772011-05-12 21:10:24487
[email protected]d54169e92011-01-21 09:19:52488 // Gets the scroll offset of this widget, if this widget has a notion of
489 // scroll offset.
[email protected]ceb36f7d2012-10-31 18:33:24490 virtual gfx::Vector2d GetScrollOffset();
[email protected]d54169e92011-01-21 09:19:52491
[email protected]bee16aab2009-08-26 15:55:03492 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should
493 // use this method so that we can properly inform the RenderThread of our
494 // state.
495 void SetHidden(bool hidden);
496
[email protected]2b624c562011-10-27 22:58:26497 void DidToggleFullscreen();
498
[email protected]674741932009-02-04 23:44:46499 bool next_paint_is_resize_ack() const;
[email protected]674741932009-02-04 23:44:46500 void set_next_paint_is_resize_ack();
[email protected]674741932009-02-04 23:44:46501 void set_next_paint_is_repaint_ack();
[email protected]ec7dc112008-08-06 05:30:12502
[email protected]586871b2014-07-22 17:05:11503 // QueueMessage implementation extracted into a static method for easy
504 // testing.
505 static scoped_ptr<cc::SwapPromise> QueueMessageImpl(
506 IPC::Message* msg,
507 MessageDeliveryPolicy policy,
508 FrameSwapMessageQueue* frame_swap_message_queue,
509 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
[email protected]586871b2014-07-22 17:05:11510 int source_frame_number);
511
[email protected]58b48a0d2012-06-13 07:01:35512 // Override point to obtain that the current composition character bounds.
513 // In the case of surrogate pairs, the character is treated as two characters:
514 // the bounds for first character is actual one, and the bounds for second
515 // character is zero width rectangle.
516 virtual void GetCompositionCharacterBounds(
517 std::vector<gfx::Rect>* character_bounds);
518
[email protected]88dbe32f2013-06-20 23:31:36519 // Returns the range of the text that is being composed or the selection if
520 // the composition does not exist.
[email protected]db4fc1e2013-09-06 20:01:51521 virtual void GetCompositionRange(gfx::Range* range);
[email protected]88dbe32f2013-06-20 23:31:36522
[email protected]58b48a0d2012-06-13 07:01:35523 // Returns true if the composition range or composition character bounds
524 // should be sent to the browser process.
525 bool ShouldUpdateCompositionInfo(
[email protected]db4fc1e2013-09-06 20:01:51526 const gfx::Range& range,
[email protected]58b48a0d2012-06-13 07:01:35527 const std::vector<gfx::Rect>& bounds);
528
[email protected]ad26ef42011-06-17 07:59:45529 // Override point to obtain that the current input method state about
530 // composition text.
531 virtual bool CanComposeInline();
[email protected]56ea1a62011-05-30 07:05:57532
[email protected]2533ce12009-05-09 00:02:24533 // Set the pending window rect.
534 // Because the real render_widget is hosted in another process, there is
535 // a time period where we may have set a new window rect which has not yet
536 // been processed by the browser. So we maintain a pending window rect
537 // size. If JS code sets the WindowRect, and then immediately calls
538 // GetWindowRect() we'll use this pending window rect as the size.
[email protected]180ef242013-11-07 06:50:46539 void SetPendingWindowRect(const blink::WebRect& r);
[email protected]2533ce12009-05-09 00:02:24540
[email protected]ce6689f2013-03-29 12:52:55541 // Check whether the WebWidget has any touch event handlers registered.
avi5c77d212015-09-25 20:08:25542 void hasTouchEventHandlers(bool has_handlers) override;
[email protected]ce6689f2013-03-29 12:52:55543
[email protected]5d0bbdfa92013-12-10 00:35:51544 // Tell the browser about the actions permitted for a new touch point.
avi5c77d212015-09-25 20:08:25545 void setTouchAction(blink::WebTouchAction touch_action) override;
[email protected]5d0bbdfa92013-12-10 00:35:51546
[email protected]90f24152014-04-09 12:41:36547 // Called when value of focused text field gets dirty, e.g. value is modified
548 // by script, not by user input.
avi5c77d212015-09-25 20:08:25549 void didUpdateTextOfFocusedElementByNonUserInput() override;
[email protected]90f24152014-04-09 12:41:36550
[email protected]ed7defa2013-03-12 21:29:59551 // Creates a 3D context associated with this view.
jbauman5e420d32015-08-05 09:33:01552 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D(
553 bool compositor);
[email protected]ed7defa2013-03-12 21:29:59554
initial.commit09911bf2008-07-26 23:55:29555 // Routing ID that allows us to communicate to the parent browser process
556 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
avi1023d012015-12-25 02:39:14557 int32_t routing_id_;
initial.commit09911bf2008-07-26 23:55:29558
danakj6e3bf8012014-12-16 18:27:53559 // Dependencies for initializing a compositor, including flags for optional
560 // features.
dcheng35d31c112015-07-22 00:17:36561 CompositorDependencies* const compositor_deps_;
danakj6e3bf8012014-12-16 18:27:53562
[email protected]c5b3b5e2009-02-13 06:41:11563 // We are responsible for destroying this object via its Close method.
[email protected]4ee64622014-03-21 22:34:15564 // May be NULL when the window is closing.
[email protected]180ef242013-11-07 06:50:46565 blink::WebWidget* webwidget_;
initial.commit09911bf2008-07-26 23:55:29566
[email protected]8926c602013-01-23 05:32:06567 // This is lazily constructed and must not outlive webwidget_.
[email protected]ba91a792013-02-06 09:48:28568 scoped_ptr<RenderWidgetCompositor> compositor_;
[email protected]8926c602013-01-23 05:32:06569
initial.commit09911bf2008-07-26 23:55:29570 // Set to the ID of the view that initiated creating this view, if any. When
571 // the view was initiated by the browser (the common case), this will be
572 // MSG_ROUTING_NONE. This is used in determining ownership when opening
573 // child tabs. See RenderWidget::createWebViewWithRequest.
574 //
575 // This ID may refer to an invalid view if that view is closed before this
576 // view is.
avi1023d012015-12-25 02:39:14577 int32_t opener_id_;
initial.commit09911bf2008-07-26 23:55:29578
bokanc007c3a2015-02-03 07:15:56579 // The rect where this view should be initially shown.
580 gfx::Rect initial_rect_;
initial.commit09911bf2008-07-26 23:55:29581
initial.commit09911bf2008-07-26 23:55:29582 // We store the current cursor object so we can avoid spamming SetCursor
583 // messages.
584 WebCursor current_cursor_;
[email protected]88efb7ec2009-07-14 16:32:59585
initial.commit09911bf2008-07-26 23:55:29586 // The size of the RenderWidget.
587 gfx::Size size_;
588
[email protected]60d47ac2013-03-01 23:42:44589 // The size of the view's backing surface in non-DPI-adjusted pixels.
590 gfx::Size physical_backing_size_;
591
dtrainorcb7779b82014-12-04 01:08:02592 // Whether or not Blink's viewport size should be shrunk by the height of the
593 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
594 bool top_controls_shrink_blink_size_;
595
596 // The height of the top controls (always 0 on platforms where URL-bar hiding
597 // isn't supported).
598 float top_controls_height_;
[email protected]d9083762013-03-24 01:36:40599
[email protected]bb6378fe2014-04-28 21:19:44600 // The size of the visible viewport in DPI-adjusted pixels.
601 gfx::Size visible_viewport_size_;
602
[email protected]f21c613a2009-02-12 14:46:17603 // The area that must be reserved for drawing the resize corner.
604 gfx::Rect resizer_rect_;
605
[email protected]53d3f302009-12-21 04:42:05606 // Flags for the next ViewHostMsg_UpdateRect message.
initial.commit09911bf2008-07-26 23:55:29607 int next_paint_flags_;
608
[email protected]847a2582013-03-09 02:29:51609 // Whether the WebWidget is in auto resize mode, which is used for example
610 // by extension popups.
611 bool auto_resize_mode_;
612
[email protected]ea3ee0a2012-05-15 03:43:09613 // True if we need to send an UpdateRect message to notify the browser about
614 // an already-completed auto-resize.
615 bool need_update_rect_for_auto_resize_;
616
initial.commit09911bf2008-07-26 23:55:29617 // Set to true if we should ignore RenderWidget::Show calls.
618 bool did_show_;
619
620 // Indicates that we shouldn't bother generated paint events.
621 bool is_hidden_;
622
[email protected]7912e822014-04-16 02:37:03623 // Indicates that we are never visible, so never produce graphical output.
sievers71c62dd52015-10-07 01:44:39624 const bool compositor_never_visible_;
[email protected]7912e822014-04-16 02:37:03625
mikhail.pozdnyakovf2c902a2015-04-14 08:09:12626 // Indicates whether tab-initiated fullscreen was granted.
627 bool is_fullscreen_granted_;
[email protected]ee41e7d22011-10-14 19:34:09628
mikhail.pozdnyakovc0e251b2015-04-15 06:51:12629 // Indicates the display mode.
630 blink::WebDisplayMode display_mode_;
631
changwanf2a707b2015-10-30 08:22:16632 // It is possible that one ImeEventGuard is nested inside another
633 // ImeEventGuard. We keep track of the outermost one, and update it as needed.
634 ImeEventGuard* ime_event_guard_;
[email protected]e8f775f2013-02-14 21:00:50635
initial.commit09911bf2008-07-26 23:55:29636 // True if we have requested this widget be closed. No more messages will
637 // be sent, except for a Close.
638 bool closing_;
639
[email protected]aeeedad2014-08-22 18:16:22640 // True if it is known that the host is in the process of being shut down.
641 bool host_closing_;
642
[email protected]992db4c2011-05-12 15:37:15643 // Whether this RenderWidget is currently swapped out, such that the view is
644 // being rendered by another process. If all RenderWidgets in a process are
645 // swapped out, the process can exit.
646 bool is_swapped_out_;
647
simonhong628f9812015-04-27 23:13:20648 // TODO(simonhong): Remove this when we enable BeginFrame scheduling for
649 // OOPIF(crbug.com/471411).
650 // Whether this RenderWidget is for an out-of-process iframe or not.
651 bool for_oopif_;
652
[email protected]5b739cb2012-08-21 20:35:21653 // Stores information about the current text input.
[email protected]180ef242013-11-07 06:50:46654 blink::WebTextInputInfo text_input_info_;
[email protected]5b739cb2012-08-21 20:35:21655
[email protected]fa7b1dc2010-06-23 17:53:04656 // Stores the current text input type of |webwidget_|.
[email protected]ad26ef42011-06-17 07:59:45657 ui::TextInputType text_input_type_;
658
[email protected]b256eca2013-07-11 10:57:40659 // Stores the current text input mode of |webwidget_|.
660 ui::TextInputMode text_input_mode_;
661
shuchen82ce8c52014-10-23 01:55:20662 // Stores the current text input flags of |webwidget_|.
663 int text_input_flags_;
664
[email protected]86ba5fcb2013-09-04 00:36:53665 // Stores the current type of composition text rendering of |webwidget_|.
666 bool can_compose_inline_;
667
[email protected]e99ef6f2011-10-16 01:13:00668 // Stores the current selection bounds.
[email protected]7c8873e2013-02-05 08:03:01669 gfx::Rect selection_focus_rect_;
670 gfx::Rect selection_anchor_rect_;
initial.commit09911bf2008-07-26 23:55:29671
[email protected]58b48a0d2012-06-13 07:01:35672 // Stores the current composition character bounds.
673 std::vector<gfx::Rect> composition_character_bounds_;
674
675 // Stores the current composition range.
[email protected]db4fc1e2013-09-06 20:01:51676 gfx::Range composition_range_;
[email protected]58b48a0d2012-06-13 07:01:35677
[email protected]3e2b375b2010-04-07 17:03:12678 // The kind of popup this widget represents, NONE if not a popup.
[email protected]180ef242013-11-07 06:50:46679 blink::WebPopupType popup_type_;
[email protected]0ebf3872008-11-07 21:35:03680
initial.commit09911bf2008-07-26 23:55:29681 // Holds all the needed plugin window moves for a scroll.
[email protected]29e2fb42013-07-19 01:13:47682 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector;
[email protected]268654772009-08-06 23:02:04683 WebPluginGeometryVector plugin_window_moves_;
initial.commit09911bf2008-07-26 23:55:29684
[email protected]80ad8622012-11-07 16:33:03685 // While we are waiting for the browser to update window sizes, we track the
686 // pending size temporarily.
[email protected]2533ce12009-05-09 00:02:24687 int pending_window_rect_count_;
[email protected]180ef242013-11-07 06:50:46688 blink::WebRect pending_window_rect_;
[email protected]2533ce12009-05-09 00:02:24689
[email protected]80ad8622012-11-07 16:33:03690 // The screen rects of the view and the window that contains it.
691 gfx::Rect view_screen_rect_;
692 gfx::Rect window_screen_rect_;
693
fsamuele8326c742016-01-12 00:49:39694 scoped_ptr<RenderWidgetInputHandler> input_handler_;
[email protected]12fbad812009-09-01 18:21:24695
[email protected]fd847792013-10-24 17:12:35696 // The time spent in input handlers this frame. Used to throttle input acks.
697 base::TimeDelta total_input_handling_time_this_frame_;
698
[email protected]842f10652012-06-06 01:54:04699 // Properties of the screen hosting this RenderWidget instance.
[email protected]180ef242013-11-07 06:50:46700 blink::WebScreenInfo screen_info_;
[email protected]842f10652012-06-06 01:54:04701
[email protected]f1cccb32012-06-06 18:29:59702 // The device scale factor. This value is computed from the DPI entries in
703 // |screen_info_| on some platforms, and defaults to 1 on other platforms.
[email protected]faec7b12012-06-19 14:42:13704 float device_scale_factor_;
[email protected]f1cccb32012-06-06 18:29:59705
[email protected]28ed6b32014-06-08 02:16:27706 // The device color profile on supported platforms.
707 std::vector<char> device_color_profile_;
708
[email protected]9017d7852013-11-21 17:47:35709 // State associated with synthetic gestures. Synthetic gestures are processed
710 // in-order, so a queue is sufficient to identify the correct state for a
711 // completed gesture.
712 std::queue<SyntheticGestureCompletionCallback>
713 pending_synthetic_gesture_callbacks_;
[email protected]0e241b4b2012-08-18 09:06:27714
avi1023d012015-12-25 02:39:14715 uint32_t next_output_surface_id_;
[email protected]53b4cc12013-07-18 23:02:30716
[email protected]0d1ebed12013-08-05 22:01:13717#if defined(OS_ANDROID)
[email protected]90f24152014-04-09 12:41:36718 // Indicates value in the focused text field is in dirty state, i.e. modified
719 // by script etc., not by user input.
720 bool text_field_is_dirty_;
721
changwan3a841162015-08-11 02:53:37722 // Stores the history of text input infos from the last ACK'ed one from the
723 // current one. The size is the number of pending ACKs plus one, since we
724 // intentionally keep the last ack'd value to know what the browser is
725 // currently aware of.
726 std::deque<blink::WebTextInputInfo> text_input_info_history_;
[email protected]0d1ebed12013-08-05 22:01:13727#endif
728
[email protected]b2e4c70132013-10-03 02:07:51729 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_;
730
731 // Popups may be displaced when screen metrics emulation is enabled.
732 // These values are used to properly adjust popup position.
danakj2ef31b82015-10-21 18:18:02733 gfx::Point popup_view_origin_for_emulation_;
734 gfx::Point popup_screen_origin_for_emulation_;
[email protected]b2e4c70132013-10-03 02:07:51735 float popup_origin_scale_for_emulation_;
736
[email protected]586871b2014-07-22 17:05:11737 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
[email protected]5b45ad42013-10-25 00:42:04738 scoped_ptr<ResizingModeSelector> resizing_mode_selector_;
739
[email protected]e3244ed2014-06-20 20:04:27740 // Lists of RenderFrameProxy objects that need to be notified of
741 // compositing-related events (e.g. DidCommitCompositorFrame).
brettw236d3172015-06-03 16:31:43742 base::ObserverList<RenderFrameProxy> render_frame_proxies_;
[email protected]a017938b2014-05-27 21:17:17743#if defined(VIDEO_HOLE)
brettw236d3172015-06-03 16:31:43744 base::ObserverList<RenderFrameImpl> video_hole_frames_;
[email protected]a017938b2014-05-27 21:17:17745#endif // defined(VIDEO_HOLE)
[email protected]bffc8302014-01-23 20:52:16746
[email protected]de3c5d82014-05-28 22:12:59747 // A list of RenderFrames associated with this RenderWidget. Notifications
748 // are sent to each frame in the list for events such as changing
749 // visibility state for example.
brettw236d3172015-06-03 16:31:43750 base::ObserverList<RenderFrameImpl> render_frames_;
[email protected]de3c5d82014-05-28 22:12:59751
[email protected]be1af0662014-07-29 19:55:51752 bool has_host_context_menu_location_;
753 gfx::Point host_context_menu_location_;
[email protected]a09d53ce2014-01-31 00:46:42754
alexclarke7fa93942015-10-21 15:37:11755 scoped_ptr<scheduler::RenderWidgetSchedulingState>
756 render_widget_scheduling_state_;
757
[email protected]05d478752009-04-08 23:38:16758 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
initial.commit09911bf2008-07-26 23:55:29759};
760
[email protected]e9ff79c2012-10-19 21:31:26761} // namespace content
762
[email protected]2cff0052011-03-18 16:51:44763#endif // CONTENT_RENDERER_RENDER_WIDGET_H_