blob: d71c16e4009029e723068df8c9676c71b9166903 [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
[email protected]aa4117f2011-12-09 22:19:218#include <deque>
[email protected]0e241b4b2012-08-18 09:06:279#include <map>
[email protected]010ea08a2009-10-11 20:21:3210
initial.commit09911bf2008-07-26 23:55:2911#include "base/basictypes.h"
[email protected]586871b2014-07-22 17:05:1112#include "base/callback.h"
[email protected]f3112a52011-09-30 23:47:4913#include "base/compiler_specific.h"
[email protected]3b63f8f42011-03-28 01:54:1514#include "base/memory/ref_counted.h"
[email protected]8704f89b2011-04-15 00:30:0515#include "base/memory/scoped_ptr.h"
[email protected]bffc8302014-01-23 20:52:1616#include "base/observer_list.h"
[email protected]abb522162013-06-28 01:54:1617#include "base/time/time.h"
[email protected]f3112a52011-09-30 23:47:4918#include "content/common/content_export.h"
[email protected]c2809346d2014-03-20 00:11:0319#include "content/common/cursors/webcursor.h"
[email protected]ed7defa2013-03-12 21:29:5920#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
[email protected]9017d7852013-11-21 17:47:3521#include "content/common/input/synthetic_gesture_params.h"
fsamuel72464894f2015-12-15 06:59:3122#include "content/renderer/input/render_widget_input_handler.h"
23#include "content/renderer/input/render_widget_input_handler_delegate.h"
[email protected]586871b2014-07-22 17:05:1124#include "content/renderer/message_delivery_policy.h"
[email protected]4f86bdb2012-11-10 19:11:1925#include "ipc/ipc_listener.h"
26#include "ipc/ipc_sender.h"
mikhail.pozdnyakovc0e251b2015-04-15 06:51:1227#include "third_party/WebKit/public/platform/WebDisplayMode.h"
[email protected]5c30b5e02013-05-30 03:46:0828#include "third_party/WebKit/public/platform/WebRect.h"
[email protected]2255a9332013-06-17 05:12:3129#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
[email protected]c27dd4f2014-05-22 18:05:1930#include "third_party/WebKit/public/web/WebInputEvent.h"
[email protected]2255a9332013-06-17 05:12:3131#include "third_party/WebKit/public/web/WebPopupType.h"
32#include "third_party/WebKit/public/web/WebTextDirection.h"
33#include "third_party/WebKit/public/web/WebTextInputInfo.h"
[email protected]5d0bbdfa92013-12-10 00:35:5134#include "third_party/WebKit/public/web/WebTouchAction.h"
[email protected]0e45bd02013-07-12 20:20:0235#include "third_party/WebKit/public/web/WebWidget.h"
[email protected]2255a9332013-06-17 05:12:3136#include "third_party/WebKit/public/web/WebWidgetClient.h"
[email protected]d65adb12010-04-28 17:26:4937#include "third_party/skia/include/core/SkBitmap.h"
[email protected]b256eca2013-07-11 10:57:4038#include "ui/base/ime/text_input_mode.h"
[email protected]ad26ef42011-06-17 07:59:4539#include "ui/base/ime/text_input_type.h"
[email protected]a09d53ce2014-01-31 00:46:4240#include "ui/base/ui_base_types.h"
tfarina93bfa912014-12-05 14:23:1541#include "ui/gfx/geometry/rect.h"
42#include "ui/gfx/geometry/vector2d.h"
43#include "ui/gfx/geometry/vector2d_f.h"
[email protected]08397d52011-02-05 01:53:3844#include "ui/gfx/native_widget_types.h"
[email protected]db4fc1e2013-09-06 20:01:5145#include "ui/gfx/range/range.h"
[email protected]d353541f2012-05-03 22:45:4146#include "ui/surface/transport_dib.h"
initial.commit09911bf2008-07-26 23:55:2947
[email protected]aa4117f2011-12-09 22:19:2148struct ViewHostMsg_UpdateRect_Params;
[email protected]0fdd5012013-05-29 08:05:5649struct ViewMsg_Resize_Params;
[email protected]aa4117f2011-12-09 22:19:2150class ViewHostMsg_UpdateRect;
51
[email protected]484955942010-08-19 16:13:1852namespace IPC {
53class SyncMessage;
[email protected]586871b2014-07-22 17:05:1154class SyncMessageFilter;
[email protected]484955942010-08-19 16:13:1855}
56
[email protected]180ef242013-11-07 06:50:4657namespace blink {
[email protected]19193682014-04-03 15:01:4358struct WebDeviceEmulationParams;
kenrba7199832015-01-22 23:44:5959class WebFrameWidget;
[email protected]41d86852012-11-07 12:23:2460class WebGestureEvent;
[email protected]f56c7872013-06-18 12:31:5761class WebKeyboardEvent;
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]2d0f2e92011-10-03 09:02:2466class WebTouchEvent;
kenrba7199832015-01-22 23:44:5967class WebView;
[email protected]526476902011-10-06 20:34:0668}
69
[email protected]586871b2014-07-22 17:05:1170namespace cc {
ccamerond4ba47902014-12-17 07:20:3171struct InputHandlerScrollResult;
[email protected]586871b2014-07-22 17:05:1172class OutputSurface;
73class SwapPromise;
74}
[email protected]ba91a792013-02-06 09:48:2875
[email protected]db4fc1e2013-09-06 20:01:5176namespace gfx {
[email protected]4de6d1692011-10-12 08:45:4477class Range;
78}
79
alexclarke7fa93942015-10-21 15:37:1180namespace scheduler {
81class RenderWidgetSchedulingState;
82}
83
[email protected]e9ff79c2012-10-19 21:31:2684namespace content {
danakj6e3bf8012014-12-16 18:27:5385class CompositorDependencies;
[email protected]b2e4c70132013-10-03 02:07:5186class ExternalPopupMenu;
[email protected]586871b2014-07-22 17:05:1187class FrameSwapMessageQueue;
changwanf2a707b2015-10-30 08:22:1688class ImeEventGuard;
[email protected]adab2332013-07-25 18:04:3289class PepperPluginInstanceImpl;
[email protected]bffc8302014-01-23 20:52:1690class RenderFrameImpl;
[email protected]e3244ed2014-06-20 20:04:2791class RenderFrameProxy;
[email protected]ba91a792013-02-06 09:48:2892class RenderWidgetCompositor;
[email protected]e9ff79c2012-10-19 21:31:2693class RenderWidgetTest;
[email protected]5b45ad42013-10-25 00:42:0494class ResizingModeSelector;
[email protected]b2e4c70132013-10-03 02:07:5195struct ContextMenuParams;
jddukec05612b2015-06-25 23:13:1896struct DidOverscrollParams;
[email protected]29e2fb42013-07-19 01:13:4797struct WebPluginGeometry;
[email protected]e9ff79c2012-10-19 21:31:2698
initial.commit09911bf2008-07-26 23:55:2999// RenderWidget provides a communication bridge between a WebWidget and
100// a RenderWidgetHost, the latter of which lives in a different process.
dchengd96a27a2015-07-24 20:17:32101//
102// RenderWidget is used to implement:
103// - RenderViewImpl (deprecated)
104// - Fullscreen mode (RenderWidgetFullScreen)
105// - Popup "menus" (like the color chooser and date picker)
106// - Widgets for frames (for out-of-process iframe support)
[email protected]f3112a52011-09-30 23:47:49107class CONTENT_EXPORT RenderWidget
[email protected]c47317e2012-06-20 22:35:31108 : public IPC::Listener,
109 public IPC::Sender,
[email protected]180ef242013-11-07 06:50:46110 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient),
fsamuel72464894f2015-12-15 06:59:31111 public RenderWidgetInputHandlerDelegate,
[email protected]f3112a52011-09-30 23:47:49112 public base::RefCounted<RenderWidget> {
initial.commit09911bf2008-07-26 23:55:29113 public:
114 // Creates a new RenderWidget. The opener_id is the routing ID of the
[email protected]380244092011-10-07 17:26:27115 // RenderView that this widget lives inside.
[email protected]0ebf3872008-11-07 21:35:03116 static RenderWidget* Create(int32 opener_id,
danakj6e3bf8012014-12-16 18:27:53117 CompositorDependencies* compositor_deps,
[email protected]180ef242013-11-07 06:50:46118 blink::WebPopupType popup_type,
119 const blink::WebScreenInfo& screen_info);
initial.commit09911bf2008-07-26 23:55:29120
kenrba7199832015-01-22 23:44:59121 // Creates a new RenderWidget that will be attached to a RenderFrame.
122 static RenderWidget* CreateForFrame(int routing_id,
kenrba7199832015-01-22 23:44:59123 bool hidden,
124 const blink::WebScreenInfo& screen_info,
125 CompositorDependencies* compositor_deps,
126 blink::WebLocalFrame* frame);
127
dchengda9b4bb2015-07-20 20:58:08128 // Closes a RenderWidget that was created by |CreateForFrame|.
dcheng3ce04b62015-10-26 23:30:55129 // TODO(avi): De-virtualize this once RenderViewImpl has-a RenderWidget.
130 // https://crbug.com/545684
131 virtual void CloseForFrame();
[email protected]484955942010-08-19 16:13:18132
[email protected]4ee64622014-03-21 22:34:15133 int32 routing_id() const { return routing_id_; }
danakj6e3bf8012014-12-16 18:27:53134 CompositorDependencies* compositor_deps() const { return compositor_deps_; }
[email protected]180ef242013-11-07 06:50:46135 blink::WebWidget* webwidget() const { return webwidget_; }
[email protected]93b9d692011-04-13 00:44:31136 gfx::Size size() const { return size_; }
mikhail.pozdnyakovf2c902a2015-04-14 08:09:12137 bool is_fullscreen_granted() const { return is_fullscreen_granted_; }
mikhail.pozdnyakovc0e251b2015-04-15 06:51:12138 blink::WebDisplayMode display_mode() const { return display_mode_; }
[email protected]204f1df2012-01-04 20:21:13139 bool is_hidden() const { return is_hidden_; }
[email protected]4ee64622014-03-21 22:34:15140 // Temporary for debugging purposes...
141 bool closing() const { return closing_; }
142 bool is_swapped_out() { return is_swapped_out_; }
simonhong628f9812015-04-27 23:13:20143 bool for_oopif() { return for_oopif_; }
[email protected]be1af0662014-07-29 19:55:51144 bool has_host_context_menu_location() {
145 return has_host_context_menu_location_;
146 }
147 gfx::Point host_context_menu_location() {
148 return host_context_menu_location_;
[email protected]4ee64622014-03-21 22:34:15149 }
[email protected]589621b2010-09-23 22:01:07150
kenrba7199832015-01-22 23:44:59151 // ScreenInfo exposed so it can be passed to subframe RenderWidgets.
152 blink::WebScreenInfo screen_info() const { return screen_info_; }
153
[email protected]bffc8302014-01-23 20:52:16154 // Functions to track out-of-process frames for special notifications.
[email protected]e3244ed2014-06-20 20:04:27155 void RegisterRenderFrameProxy(RenderFrameProxy* proxy);
156 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy);
[email protected]bffc8302014-01-23 20:52:16157
[email protected]de3c5d82014-05-28 22:12:59158 // Functions to track all RenderFrame objects associated with this
159 // RenderWidget.
160 void RegisterRenderFrame(RenderFrameImpl* frame);
161 void UnregisterRenderFrame(RenderFrameImpl* frame);
162
[email protected]a017938b2014-05-27 21:17:17163#if defined(VIDEO_HOLE)
164 void RegisterVideoHoleFrame(RenderFrameImpl* frame);
165 void UnregisterVideoHoleFrame(RenderFrameImpl* frame);
166#endif // defined(VIDEO_HOLE)
167
[email protected]c47317e2012-06-20 22:35:31168 // IPC::Listener
dcheng6d18e402014-10-21 12:32:52169 bool OnMessageReceived(const IPC::Message& msg) override;
initial.commit09911bf2008-07-26 23:55:29170
[email protected]c47317e2012-06-20 22:35:31171 // IPC::Sender
dcheng6d18e402014-10-21 12:32:52172 bool Send(IPC::Message* msg) override;
initial.commit09911bf2008-07-26 23:55:29173
fsamuel72464894f2015-12-15 06:59:31174 // RenderWidgetInputHandlerDelegate
175 void FocusChangeComplete() override;
176 bool HasTouchEventHandlersAt(const gfx::Point& point) const override;
177 void ObserveWheelEventAndResult(const blink::WebMouseWheelEvent& wheel_event,
178 const gfx::Vector2dF& wheel_unused_delta,
179 bool event_processed) override;
180 void OnDidHandleKeyEvent() override;
181 void OnDidOverscroll(const DidOverscrollParams& params) override;
182 void OnInputEventAck(scoped_ptr<InputEventAck> input_event_ack) override;
183 void UpdateTextInputState(ShowIme show_ime,
184 ChangeSource change_source) override;
185 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override;
186 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override;
187
[email protected]180ef242013-11-07 06:50:46188 // blink::WebWidgetClient
avi5c77d212015-09-25 20:08:25189 void didAutoResize(const blink::WebSize& new_size) override;
190 void initializeLayerTreeView() override;
191 blink::WebLayerTreeView* layerTreeView() override;
dglazkovf0e1d6d2015-10-10 02:13:48192 void didMeaningfulLayout(blink::WebMeaningfulLayout layout_type) override;
avi5c77d212015-09-25 20:08:25193 void didFocus() override;
avi5c77d212015-09-25 20:08:25194 void didChangeCursor(const blink::WebCursorInfo&) override;
195 void closeWidgetSoon() override;
196 void show(blink::WebNavigationPolicy) override;
197 blink::WebRect windowRect() override;
198 void setToolTipText(const blink::WebString& text,
199 blink::WebTextDirection hint) override;
200 void setWindowRect(const blink::WebRect&) override;
201 blink::WebRect windowResizerRect() override;
202 blink::WebRect rootWindowRect() override;
203 blink::WebScreenInfo screenInfo() override;
avi5c77d212015-09-25 20:08:25204 void resetInputMethod() override;
205 void didHandleGestureEvent(const blink::WebGestureEvent& event,
206 bool event_cancelled) override;
207 void didOverscroll(const blink::WebFloatSize& unusedDelta,
208 const blink::WebFloatSize& accumulatedRootOverScroll,
209 const blink::WebFloatPoint& position,
210 const blink::WebFloatSize& velocity) override;
211 void showImeIfNeeded() override;
[email protected]4873c7d2009-07-16 06:36:28212
fsamuel72464894f2015-12-15 06:59:31213 // Override point to obtain that the current input method state and caret
214 // position.
215 virtual ui::TextInputType GetTextInputType();
216 virtual ui::TextInputType WebKitToUiTextInputType(
217 blink::WebTextInputType type);
218
oshimaf866dab2015-12-05 00:41:54219 // Converts the |rect| from Viewport coordinates to Window coordinates.
220 // See RenderView::convertViewportToWindow for more details.
221 void convertViewportToWindow(blink::WebRect* rect);
222
donnda070f3c2015-01-16 19:54:11223#if defined(OS_ANDROID)
224 // Notifies that a tap was not consumed, so showing a UI for the unhandled
225 // tap may be needed.
donnd57e54f52015-02-26 19:03:37226 // Performs various checks on the given WebNode to apply heuristics to
227 // determine if triggering is appropriate.
avi5c77d212015-09-25 20:08:25228 void showUnhandledTapUIIfNeeded(const blink::WebPoint& tapped_position,
229 const blink::WebNode& tapped_node,
230 bool page_changed) override;
donnda070f3c2015-01-16 19:54:11231#endif
232
[email protected]7912e822014-04-16 02:37:03233 // Begins the compositor's scheduler to start producing frames.
234 void StartCompositor();
235
[email protected]aeeedad2014-08-22 18:16:22236 // Stop compositing.
ennef3c58142014-12-09 21:44:38237 void WillCloseLayerTreeView();
[email protected]aeeedad2014-08-22 18:16:22238
[email protected]4873c7d2009-07-16 06:36:28239 // Called when a plugin is moved. These events are queued up and sent with
240 // the next paint or scroll message to the host.
[email protected]29e2fb42013-07-19 01:13:47241 void SchedulePluginMove(const WebPluginGeometry& move);
initial.commit09911bf2008-07-26 23:55:29242
[email protected]268654772009-08-06 23:02:04243 // Called when a plugin window has been destroyed, to make sure the currently
244 // pending moves don't try to reference it.
245 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window);
246
[email protected]24ed0432013-04-24 07:50:31247 RenderWidgetCompositor* compositor() const;
248
fsamuel72464894f2015-12-15 06:59:31249 const RenderWidgetInputHandler& input_handler() const {
250 return input_handler_;
251 }
252
253 void SetHandlingInputEventForTesting(bool handling_input_event);
254
255 // When paused in debugger, we send ack for mouse event early. This ensures
256 // that we continue receiving mouse moves and pass them to debugger. Returns
257 // whether we are paused in mouse move event and have sent the ack.
258 bool SendAckForMouseMoveFromDebugger();
259
260 // When resumed from pause in debugger while handling mouse move,
261 // we should not send an extra ack (see SendAckForMouseMoveFromDebugger).
262 void IgnoreAckForMouseMoveFromDebugger();
263
[email protected]ebc0e1df2013-08-01 02:46:22264 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback);
[email protected]ba91a792013-02-06 09:48:28265
[email protected]79fa22e2013-08-23 15:18:12266 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll).
267 typedef base::Callback<void()> SyntheticGestureCompletionCallback;
[email protected]0e241b4b2012-08-18 09:06:27268
[email protected]9017d7852013-11-21 17:47:35269 // Send a synthetic gesture to the browser to be queued to the synthetic
270 // gesture controller.
271 void QueueSyntheticGesture(
272 scoped_ptr<SyntheticGestureParams> gesture_params,
273 const SyntheticGestureCompletionCallback& callback);
[email protected]1e1dd182013-09-12 01:51:15274
[email protected]586871b2014-07-22 17:05:11275 // Deliveres |message| together with compositor state change updates. The
276 // exact behavior depends on |policy|.
277 // This mechanism is not a drop-in replacement for IPC: messages sent this way
278 // will not be automatically available to BrowserMessageFilter, for example.
279 // FIFO ordering is preserved between messages enqueued with the same
280 // |policy|, the ordering between messages enqueued for different policies is
281 // undefined.
282 //
283 // |msg| message to send, ownership of |msg| is transferred.
284 // |policy| see the comment on MessageDeliveryPolicy.
285 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
286
changwanf2a707b2015-10-30 08:22:16287 // Handle start and finish of IME event guard.
288 void OnImeEventGuardStart(ImeEventGuard* guard);
289 void OnImeEventGuardFinish(ImeEventGuard* guard);
[email protected]66fca5bc2013-05-23 06:58:29290
[email protected]4ee64622014-03-21 22:34:15291 // Returns whether we currently should handle an IME event.
292 bool ShouldHandleImeEvent();
293
rouslanf7ebd8832015-01-22 01:54:14294 // Called by the compositor when page scale animation completed.
295 virtual void DidCompletePageScaleAnimation() {}
296
[email protected]b2e4c70132013-10-03 02:07:51297 // ScreenMetricsEmulator class manages screen emulation inside a render
298 // widget. This includes resizing, placing view on the screen at desired
299 // position, changing device scale factor, and scaling down the whole
300 // widget if required to fit into the browser window.
301 class ScreenMetricsEmulator;
302
[email protected]b2e4c70132013-10-03 02:07:51303 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator);
[email protected]2d6836f42014-07-02 17:25:31304 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor);
[email protected]b2e4c70132013-10-03 02:07:51305
jdduke491a3f0c2015-06-15 23:30:26306 // Indicates that the compositor is about to begin a frame. This is primarily
307 // to signal to flow control mechanisms that a frame is beginning, not to
308 // perform actual painting work.
309 void WillBeginCompositorFrame();
310
311 // Notifies about a compositor frame commit operation having finished.
312 virtual void DidCommitCompositorFrame();
313
314 // Notifies that the draw commands for a committed frame have been issued.
315 void DidCommitAndDrawCompositorFrame();
316
317 // Notifies that the compositor has posted a swapbuffers operation to the GPU
318 // process.
319 void DidCompleteSwapBuffers();
320
321 void ScheduleComposite();
[email protected]7d08a9352013-10-15 08:24:56322 void ScheduleCompositeWithForcedRedraw();
323
[email protected]4d7e46a2013-11-08 05:33:40324 // Called by the compositor in single-threaded mode when a swap is posted,
325 // completes or is aborted.
326 void OnSwapBuffersPosted();
327 void OnSwapBuffersComplete();
328 void OnSwapBuffersAborted();
329
[email protected]7a4e2532013-12-02 21:30:02330 // Checks if the selection bounds have been changed. If they are changed,
331 // the new value will be sent to the browser process.
332 void UpdateSelectionBounds();
333
dtrainor5ef644e2015-11-19 00:12:47334 // Called by the compositor to forward a proto that represents serialized
335 // compositor state.
336 void ForwardCompositorProto(const std::vector<uint8_t>& proto);
337
[email protected]e5e438d62014-03-27 21:47:16338 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
339
[email protected]a09d53ce2014-01-31 00:46:42340 void OnShowHostContextMenu(ContextMenuParams* params);
[email protected]7a4e2532013-12-02 21:30:02341
[email protected]7a4e2532013-12-02 21:30:02342 // Checks if the composition range or composition character bounds have been
343 // changed. If they are changed, the new value will be sent to the browser
yukawa5f21c6a2014-10-27 17:09:30344 // process. This method does nothing when the browser process is not able to
345 // handle composition range and composition character bounds.
[email protected]7a4e2532013-12-02 21:30:02346 void UpdateCompositionInfo(bool should_update_range);
[email protected]7a4e2532013-12-02 21:30:02347
ennef3c58142014-12-09 21:44:38348 bool host_closing() const { return host_closing_; }
349
initial.commit09911bf2008-07-26 23:55:29350 protected:
[email protected]8085dbc82008-09-26 22:53:44351 // Friend RefCounted so that the dtor can be non-public. Using this class
352 // without ref-counting is an error.
353 friend class base::RefCounted<RenderWidget>;
[email protected]7339cd22010-10-27 00:11:20354 // For unit tests.
[email protected]e9ff79c2012-10-19 21:31:26355 friend class RenderWidgetTest;
[email protected]8085dbc82008-09-26 22:53:44356
[email protected]61e2b3cc2012-03-02 16:13:34357 enum ResizeAck {
358 SEND_RESIZE_ACK,
359 NO_RESIZE_ACK,
360 };
361
dcheng35d31c112015-07-22 00:17:36362 RenderWidget(CompositorDependencies* compositor_deps,
363 blink::WebPopupType popup_type,
[email protected]180ef242013-11-07 06:50:46364 const blink::WebScreenInfo& screen_info,
[email protected]1ac10dca2013-08-20 20:47:04365 bool swapped_out,
[email protected]7912e822014-04-16 02:37:03366 bool hidden,
367 bool never_visible);
[email protected]ce2b28e2012-08-09 15:53:57368
dcheng6d18e402014-10-21 12:32:52369 ~RenderWidget() override;
initial.commit09911bf2008-07-26 23:55:29370
dchengda9b4bb2015-07-20 20:58:08371 static blink::WebWidget* CreateWebFrameWidget(RenderWidget* render_widget,
372 blink::WebLocalFrame* frame);
373
374 // Creates a WebWidget based on the popup type.
375 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget);
376
pimanc4af3072015-10-02 03:45:59377 // Initializes this view with the given opener.
dcheng35d31c112015-07-22 00:17:36378 bool Init(int32 opener_id);
initial.commit09911bf2008-07-26 23:55:29379
[email protected]484955942010-08-19 16:13:18380 // Called by Init and subclasses to perform initialization.
[email protected]a635f942012-12-07 10:34:29381 bool DoInit(int32 opener_id,
[email protected]180ef242013-11-07 06:50:46382 blink::WebWidget* web_widget,
[email protected]484955942010-08-19 16:13:18383 IPC::SyncMessage* create_widget_message);
384
[email protected]992db4c2011-05-12 15:37:15385 // Sets whether this RenderWidget has been swapped out to be displayed by
386 // a RenderWidget in a different process. If so, no new IPC messages will be
387 // sent (only ACKs) and the process is free to exit when there are no other
388 // active RenderWidgets.
389 void SetSwappedOut(bool is_swapped_out);
390
[email protected]949b6592014-08-20 13:17:52391 // Allows the process to exit once the unload handler has finished, if there
392 // are no other active RenderWidgets.
393 void WasSwappedOut();
394
[email protected]2533ce12009-05-09 00:02:24395 void DoDeferredClose();
dgozmancf9039cd2015-04-06 12:01:31396 void NotifyOnClose();
dchengda9b4bb2015-07-20 20:58:08397
398 // Close the underlying WebWidget.
399 virtual void Close();
initial.commit09911bf2008-07-26 23:55:29400
[email protected]61e2b3cc2012-03-02 16:13:34401 // Resizes the render widget.
402 void Resize(const gfx::Size& new_size,
[email protected]60d47ac2013-03-01 23:42:44403 const gfx::Size& physical_backing_size,
dtrainorcb7779b82014-12-04 01:08:02404 bool top_controls_shrink_blink_size,
405 float top_controls_height,
[email protected]bb6378fe2014-04-28 21:19:44406 const gfx::Size& visible_viewport_size,
[email protected]61e2b3cc2012-03-02 16:13:34407 const gfx::Rect& resizer_rect,
mikhail.pozdnyakovf2c902a2015-04-14 08:09:12408 bool is_fullscreen_granted,
mikhail.pozdnyakovc0e251b2015-04-15 06:51:12409 blink::WebDisplayMode display_mode,
[email protected]61e2b3cc2012-03-02 16:13:34410 ResizeAck resize_ack);
[email protected]92650162013-10-30 03:31:02411 // Used to force the size of a window when running layout tests.
bokanc007c3a2015-02-03 07:15:56412 void SetWindowRectSynchronously(const gfx::Rect& new_window_rect);
[email protected]b2e4c70132013-10-03 02:07:51413 virtual void SetScreenMetricsEmulationParameters(
dgozman9260b0a12015-03-16 13:45:20414 bool enabled,
415 const blink::WebDeviceEmulationParams& params);
[email protected]53907862014-03-25 15:42:40416#if defined(OS_MACOSX) || defined(OS_ANDROID)
[email protected]b2e4c70132013-10-03 02:07:51417 void SetExternalPopupOriginAdjustmentsForEmulation(
418 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator);
[email protected]53907862014-03-25 15:42:40419#endif
[email protected]61e2b3cc2012-03-02 16:13:34420
initial.commit09911bf2008-07-26 23:55:29421 // RenderWidget IPC message handlers
[email protected]180ef242013-11-07 06:50:46422 void OnHandleInputEvent(const blink::WebInputEvent* event,
jdduke0cf1e662015-10-15 22:43:28423 const ui::LatencyInfo& latency_info);
[email protected]34202de2013-05-06 23:36:22424 void OnCursorVisibilityChange(bool is_visible);
[email protected]c084330e02013-04-27 01:08:15425 void OnMouseCaptureLost();
426 virtual void OnSetFocus(bool enable);
naskoc288745f2015-05-01 22:54:21427 void OnClose();
[email protected]fc4404d2012-11-07 19:53:30428 void OnCreatingNewAck();
[email protected]0fdd5012013-05-29 08:05:56429 virtual void OnResize(const ViewMsg_Resize_Params& params);
dgozman9260b0a12015-03-16 13:45:20430 void OnEnableDeviceEmulation(const blink::WebDeviceEmulationParams& params);
431 void OnDisableDeviceEmulation();
noel89949e62014-09-30 01:12:41432 void OnColorProfile(const std::vector<char>& color_profile);
[email protected]b5913d72012-02-07 22:26:54433 void OnChangeResizeRect(const gfx::Rect& resizer_rect);
[email protected]941e4552010-02-01 21:23:43434 virtual void OnWasHidden();
[email protected]3399dd822014-08-09 11:14:24435 virtual void OnWasShown(bool needs_repainting,
436 const ui::LatencyInfo& latency_info);
[email protected]8400e032010-02-26 18:50:11437 void OnCreateVideoAck(int32 video_id);
438 void OnUpdateVideoAck(int32 video_id);
[email protected]2533ce12009-05-09 00:02:24439 void OnRequestMoveAck();
[email protected]56ea1a62011-05-30 07:05:57440 virtual void OnImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26441 const base::string16& text,
[email protected]180ef242013-11-07 06:50:46442 const std::vector<blink::WebCompositionUnderline>& underlines,
[email protected]fa7b1dc2010-06-23 17:53:04443 int selection_start,
444 int selection_end);
[email protected]fcf75d42013-12-03 20:11:26445 virtual void OnImeConfirmComposition(const base::string16& text,
[email protected]db4fc1e2013-09-06 20:01:51446 const gfx::Range& replacement_range,
[email protected]0e45bd02013-07-12 20:20:02447 bool keep_selection);
oshimad5279032015-12-16 18:22:33448 // Called when the device scale factor is changed, or the layer tree is
449 // initialized.
450 virtual void OnDeviceScaleFactorChanged();
451
[email protected]0bc1f572013-04-17 01:46:31452 void OnRepaint(gfx::Size size_to_paint);
[email protected]79fa22e2013-08-23 15:18:12453 void OnSyntheticGestureCompleted();
[email protected]180ef242013-11-07 06:50:46454 void OnSetTextDirection(blink::WebTextDirection direction);
[email protected]872ae5b2011-05-26 20:20:50455 void OnGetFPS();
[email protected]80ad8622012-11-07 16:33:03456 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
457 const gfx::Rect& window_screen_rect);
[email protected]2384b6c2013-02-28 23:58:51458 void OnShowImeIfNeeded();
kenrbb4e2a3b2015-05-14 15:05:05459 void OnSetSurfaceIdNamespace(uint32_t surface_id_namespace);
dtrainor5ef644e2015-11-19 00:12:47460 void OnHandleCompositorProto(const std::vector<uint8_t>& proto);
[email protected]0d1ebed12013-08-05 22:01:13461
[email protected]adb362312014-06-28 06:04:24462#if defined(OS_ANDROID)
changwan3a841162015-08-11 02:53:37463 // Called when we send IME event that expects an ACK.
464 void OnImeEventSentForAck(const blink::WebTextInputInfo& info);
[email protected]0d1ebed12013-08-05 22:01:13465
466 // Called by the browser process for every required IME acknowledgement.
467 void OnImeEventAck();
[email protected]105dffb42013-02-20 03:46:21468#endif
[email protected]0d1ebed12013-08-05 22:01:13469
[email protected]847a2582013-03-09 02:29:51470 // Notify the compositor about a change in viewport size. This should be
471 // used only with auto resize mode WebWidgets, as normal WebWidgets should
472 // go through OnResize.
[email protected]97e1bf72013-03-06 14:06:05473 void AutoResizeCompositor();
474
[email protected]468ac582012-11-20 00:53:19475 virtual void SetDeviceScaleFactor(float device_scale_factor);
[email protected]28ed6b32014-06-08 02:16:27476 virtual bool SetDeviceColorProfile(const std::vector<char>& color_profile);
noeldb4df152014-09-16 17:45:20477 virtual void ResetDeviceColorProfileForTesting();
[email protected]468ac582012-11-20 00:53:19478
[email protected]fcdc5642014-05-09 14:32:24479 virtual void OnOrientationChange();
480
[email protected]29ed96a2012-02-04 18:12:16481 // Override points to notify derived classes that a paint has happened.
[email protected]0704ac32013-10-03 15:24:22482 // DidInitiatePaint happens when that has completed, and subsequent rendering
483 // won't affect the painted content. DidFlushPaint happens once we've received
484 // the ACK that the screen has been updated. For a given paint operation,
485 // these overrides will always be called in the order DidInitiatePaint,
486 // DidFlushPaint.
[email protected]00c39612010-03-06 02:53:28487 virtual void DidInitiatePaint() {}
488 virtual void DidFlushPaint() {}
[email protected]a2f6bc112009-06-27 16:27:25489
[email protected]ed7defa2013-03-12 21:29:59490 virtual GURL GetURLForGraphicsContext3D();
[email protected]65225772011-05-12 21:10:24491
[email protected]d54169e92011-01-21 09:19:52492 // Gets the scroll offset of this widget, if this widget has a notion of
493 // scroll offset.
[email protected]ceb36f7d2012-10-31 18:33:24494 virtual gfx::Vector2d GetScrollOffset();
[email protected]d54169e92011-01-21 09:19:52495
[email protected]bee16aab2009-08-26 15:55:03496 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should
497 // use this method so that we can properly inform the RenderThread of our
498 // state.
499 void SetHidden(bool hidden);
500
[email protected]2b624c562011-10-27 22:58:26501 void DidToggleFullscreen();
502
[email protected]674741932009-02-04 23:44:46503 bool next_paint_is_resize_ack() const;
[email protected]674741932009-02-04 23:44:46504 void set_next_paint_is_resize_ack();
[email protected]674741932009-02-04 23:44:46505 void set_next_paint_is_repaint_ack();
[email protected]ec7dc112008-08-06 05:30:12506
[email protected]586871b2014-07-22 17:05:11507 // QueueMessage implementation extracted into a static method for easy
508 // testing.
509 static scoped_ptr<cc::SwapPromise> QueueMessageImpl(
510 IPC::Message* msg,
511 MessageDeliveryPolicy policy,
512 FrameSwapMessageQueue* frame_swap_message_queue,
513 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
[email protected]586871b2014-07-22 17:05:11514 int source_frame_number);
515
[email protected]58b48a0d2012-06-13 07:01:35516 // Override point to obtain that the current composition character bounds.
517 // In the case of surrogate pairs, the character is treated as two characters:
518 // the bounds for first character is actual one, and the bounds for second
519 // character is zero width rectangle.
520 virtual void GetCompositionCharacterBounds(
521 std::vector<gfx::Rect>* character_bounds);
522
[email protected]88dbe32f2013-06-20 23:31:36523 // Returns the range of the text that is being composed or the selection if
524 // the composition does not exist.
[email protected]db4fc1e2013-09-06 20:01:51525 virtual void GetCompositionRange(gfx::Range* range);
[email protected]88dbe32f2013-06-20 23:31:36526
[email protected]58b48a0d2012-06-13 07:01:35527 // Returns true if the composition range or composition character bounds
528 // should be sent to the browser process.
529 bool ShouldUpdateCompositionInfo(
[email protected]db4fc1e2013-09-06 20:01:51530 const gfx::Range& range,
[email protected]58b48a0d2012-06-13 07:01:35531 const std::vector<gfx::Rect>& bounds);
532
[email protected]ad26ef42011-06-17 07:59:45533 // Override point to obtain that the current input method state about
534 // composition text.
535 virtual bool CanComposeInline();
[email protected]56ea1a62011-05-30 07:05:57536
[email protected]2533ce12009-05-09 00:02:24537 // Set the pending window rect.
538 // Because the real render_widget is hosted in another process, there is
539 // a time period where we may have set a new window rect which has not yet
540 // been processed by the browser. So we maintain a pending window rect
541 // size. If JS code sets the WindowRect, and then immediately calls
542 // GetWindowRect() we'll use this pending window rect as the size.
[email protected]180ef242013-11-07 06:50:46543 void SetPendingWindowRect(const blink::WebRect& r);
[email protected]2533ce12009-05-09 00:02:24544
[email protected]ce6689f2013-03-29 12:52:55545 // Check whether the WebWidget has any touch event handlers registered.
avi5c77d212015-09-25 20:08:25546 void hasTouchEventHandlers(bool has_handlers) override;
[email protected]ce6689f2013-03-29 12:52:55547
[email protected]5d0bbdfa92013-12-10 00:35:51548 // Tell the browser about the actions permitted for a new touch point.
avi5c77d212015-09-25 20:08:25549 void setTouchAction(blink::WebTouchAction touch_action) override;
[email protected]5d0bbdfa92013-12-10 00:35:51550
[email protected]90f24152014-04-09 12:41:36551 // Called when value of focused text field gets dirty, e.g. value is modified
552 // by script, not by user input.
avi5c77d212015-09-25 20:08:25553 void didUpdateTextOfFocusedElementByNonUserInput() override;
[email protected]90f24152014-04-09 12:41:36554
[email protected]ed7defa2013-03-12 21:29:59555 // Creates a 3D context associated with this view.
jbauman5e420d32015-08-05 09:33:01556 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D(
557 bool compositor);
[email protected]ed7defa2013-03-12 21:29:59558
initial.commit09911bf2008-07-26 23:55:29559 // Routing ID that allows us to communicate to the parent browser process
560 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
561 int32 routing_id_;
562
danakj6e3bf8012014-12-16 18:27:53563 // Dependencies for initializing a compositor, including flags for optional
564 // features.
dcheng35d31c112015-07-22 00:17:36565 CompositorDependencies* const compositor_deps_;
danakj6e3bf8012014-12-16 18:27:53566
[email protected]c5b3b5e2009-02-13 06:41:11567 // We are responsible for destroying this object via its Close method.
[email protected]4ee64622014-03-21 22:34:15568 // May be NULL when the window is closing.
[email protected]180ef242013-11-07 06:50:46569 blink::WebWidget* webwidget_;
initial.commit09911bf2008-07-26 23:55:29570
[email protected]8926c602013-01-23 05:32:06571 // This is lazily constructed and must not outlive webwidget_.
[email protected]ba91a792013-02-06 09:48:28572 scoped_ptr<RenderWidgetCompositor> compositor_;
[email protected]8926c602013-01-23 05:32:06573
initial.commit09911bf2008-07-26 23:55:29574 // Set to the ID of the view that initiated creating this view, if any. When
575 // the view was initiated by the browser (the common case), this will be
576 // MSG_ROUTING_NONE. This is used in determining ownership when opening
577 // child tabs. See RenderWidget::createWebViewWithRequest.
578 //
579 // This ID may refer to an invalid view if that view is closed before this
580 // view is.
581 int32 opener_id_;
582
bokanc007c3a2015-02-03 07:15:56583 // The rect where this view should be initially shown.
584 gfx::Rect initial_rect_;
initial.commit09911bf2008-07-26 23:55:29585
initial.commit09911bf2008-07-26 23:55:29586 // We store the current cursor object so we can avoid spamming SetCursor
587 // messages.
588 WebCursor current_cursor_;
[email protected]88efb7ec2009-07-14 16:32:59589
initial.commit09911bf2008-07-26 23:55:29590 // The size of the RenderWidget.
591 gfx::Size size_;
592
[email protected]60d47ac2013-03-01 23:42:44593 // The size of the view's backing surface in non-DPI-adjusted pixels.
594 gfx::Size physical_backing_size_;
595
dtrainorcb7779b82014-12-04 01:08:02596 // Whether or not Blink's viewport size should be shrunk by the height of the
597 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
598 bool top_controls_shrink_blink_size_;
599
600 // The height of the top controls (always 0 on platforms where URL-bar hiding
601 // isn't supported).
602 float top_controls_height_;
[email protected]d9083762013-03-24 01:36:40603
[email protected]bb6378fe2014-04-28 21:19:44604 // The size of the visible viewport in DPI-adjusted pixels.
605 gfx::Size visible_viewport_size_;
606
[email protected]f21c613a2009-02-12 14:46:17607 // The area that must be reserved for drawing the resize corner.
608 gfx::Rect resizer_rect_;
609
[email protected]53d3f302009-12-21 04:42:05610 // Flags for the next ViewHostMsg_UpdateRect message.
initial.commit09911bf2008-07-26 23:55:29611 int next_paint_flags_;
612
[email protected]847a2582013-03-09 02:29:51613 // Whether the WebWidget is in auto resize mode, which is used for example
614 // by extension popups.
615 bool auto_resize_mode_;
616
[email protected]ea3ee0a2012-05-15 03:43:09617 // True if we need to send an UpdateRect message to notify the browser about
618 // an already-completed auto-resize.
619 bool need_update_rect_for_auto_resize_;
620
initial.commit09911bf2008-07-26 23:55:29621 // Set to true if we should ignore RenderWidget::Show calls.
622 bool did_show_;
623
624 // Indicates that we shouldn't bother generated paint events.
625 bool is_hidden_;
626
[email protected]7912e822014-04-16 02:37:03627 // Indicates that we are never visible, so never produce graphical output.
sievers71c62dd52015-10-07 01:44:39628 const bool compositor_never_visible_;
[email protected]7912e822014-04-16 02:37:03629
mikhail.pozdnyakovf2c902a2015-04-14 08:09:12630 // Indicates whether tab-initiated fullscreen was granted.
631 bool is_fullscreen_granted_;
[email protected]ee41e7d22011-10-14 19:34:09632
mikhail.pozdnyakovc0e251b2015-04-15 06:51:12633 // Indicates the display mode.
634 blink::WebDisplayMode display_mode_;
635
changwanf2a707b2015-10-30 08:22:16636 // It is possible that one ImeEventGuard is nested inside another
637 // ImeEventGuard. We keep track of the outermost one, and update it as needed.
638 ImeEventGuard* ime_event_guard_;
[email protected]e8f775f2013-02-14 21:00:50639
initial.commit09911bf2008-07-26 23:55:29640 // True if we have requested this widget be closed. No more messages will
641 // be sent, except for a Close.
642 bool closing_;
643
[email protected]aeeedad2014-08-22 18:16:22644 // True if it is known that the host is in the process of being shut down.
645 bool host_closing_;
646
[email protected]992db4c2011-05-12 15:37:15647 // Whether this RenderWidget is currently swapped out, such that the view is
648 // being rendered by another process. If all RenderWidgets in a process are
649 // swapped out, the process can exit.
650 bool is_swapped_out_;
651
simonhong628f9812015-04-27 23:13:20652 // TODO(simonhong): Remove this when we enable BeginFrame scheduling for
653 // OOPIF(crbug.com/471411).
654 // Whether this RenderWidget is for an out-of-process iframe or not.
655 bool for_oopif_;
656
[email protected]5b739cb2012-08-21 20:35:21657 // Stores information about the current text input.
[email protected]180ef242013-11-07 06:50:46658 blink::WebTextInputInfo text_input_info_;
[email protected]5b739cb2012-08-21 20:35:21659
[email protected]fa7b1dc2010-06-23 17:53:04660 // Stores the current text input type of |webwidget_|.
[email protected]ad26ef42011-06-17 07:59:45661 ui::TextInputType text_input_type_;
662
[email protected]b256eca2013-07-11 10:57:40663 // Stores the current text input mode of |webwidget_|.
664 ui::TextInputMode text_input_mode_;
665
shuchen82ce8c52014-10-23 01:55:20666 // Stores the current text input flags of |webwidget_|.
667 int text_input_flags_;
668
[email protected]86ba5fcb2013-09-04 00:36:53669 // Stores the current type of composition text rendering of |webwidget_|.
670 bool can_compose_inline_;
671
[email protected]e99ef6f2011-10-16 01:13:00672 // Stores the current selection bounds.
[email protected]7c8873e2013-02-05 08:03:01673 gfx::Rect selection_focus_rect_;
674 gfx::Rect selection_anchor_rect_;
initial.commit09911bf2008-07-26 23:55:29675
[email protected]58b48a0d2012-06-13 07:01:35676 // Stores the current composition character bounds.
677 std::vector<gfx::Rect> composition_character_bounds_;
678
679 // Stores the current composition range.
[email protected]db4fc1e2013-09-06 20:01:51680 gfx::Range composition_range_;
[email protected]58b48a0d2012-06-13 07:01:35681
[email protected]3e2b375b2010-04-07 17:03:12682 // The kind of popup this widget represents, NONE if not a popup.
[email protected]180ef242013-11-07 06:50:46683 blink::WebPopupType popup_type_;
[email protected]0ebf3872008-11-07 21:35:03684
initial.commit09911bf2008-07-26 23:55:29685 // Holds all the needed plugin window moves for a scroll.
[email protected]29e2fb42013-07-19 01:13:47686 typedef std::vector<WebPluginGeometry> WebPluginGeometryVector;
[email protected]268654772009-08-06 23:02:04687 WebPluginGeometryVector plugin_window_moves_;
initial.commit09911bf2008-07-26 23:55:29688
[email protected]80ad8622012-11-07 16:33:03689 // While we are waiting for the browser to update window sizes, we track the
690 // pending size temporarily.
[email protected]2533ce12009-05-09 00:02:24691 int pending_window_rect_count_;
[email protected]180ef242013-11-07 06:50:46692 blink::WebRect pending_window_rect_;
[email protected]2533ce12009-05-09 00:02:24693
[email protected]80ad8622012-11-07 16:33:03694 // The screen rects of the view and the window that contains it.
695 gfx::Rect view_screen_rect_;
696 gfx::Rect window_screen_rect_;
697
fsamuel72464894f2015-12-15 06:59:31698 RenderWidgetInputHandler input_handler_;
[email protected]12fbad812009-09-01 18:21:24699
[email protected]fd847792013-10-24 17:12:35700 // The time spent in input handlers this frame. Used to throttle input acks.
701 base::TimeDelta total_input_handling_time_this_frame_;
702
[email protected]842f10652012-06-06 01:54:04703 // Properties of the screen hosting this RenderWidget instance.
[email protected]180ef242013-11-07 06:50:46704 blink::WebScreenInfo screen_info_;
[email protected]842f10652012-06-06 01:54:04705
[email protected]f1cccb32012-06-06 18:29:59706 // The device scale factor. This value is computed from the DPI entries in
707 // |screen_info_| on some platforms, and defaults to 1 on other platforms.
[email protected]faec7b12012-06-19 14:42:13708 float device_scale_factor_;
[email protected]f1cccb32012-06-06 18:29:59709
[email protected]28ed6b32014-06-08 02:16:27710 // The device color profile on supported platforms.
711 std::vector<char> device_color_profile_;
712
[email protected]9017d7852013-11-21 17:47:35713 // State associated with synthetic gestures. Synthetic gestures are processed
714 // in-order, so a queue is sufficient to identify the correct state for a
715 // completed gesture.
716 std::queue<SyntheticGestureCompletionCallback>
717 pending_synthetic_gesture_callbacks_;
[email protected]0e241b4b2012-08-18 09:06:27718
[email protected]53b4cc12013-07-18 23:02:30719 uint32 next_output_surface_id_;
720
[email protected]0d1ebed12013-08-05 22:01:13721#if defined(OS_ANDROID)
[email protected]90f24152014-04-09 12:41:36722 // Indicates value in the focused text field is in dirty state, i.e. modified
723 // by script etc., not by user input.
724 bool text_field_is_dirty_;
725
changwan3a841162015-08-11 02:53:37726 // Stores the history of text input infos from the last ACK'ed one from the
727 // current one. The size is the number of pending ACKs plus one, since we
728 // intentionally keep the last ack'd value to know what the browser is
729 // currently aware of.
730 std::deque<blink::WebTextInputInfo> text_input_info_history_;
[email protected]0d1ebed12013-08-05 22:01:13731#endif
732
[email protected]b2e4c70132013-10-03 02:07:51733 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_;
734
735 // Popups may be displaced when screen metrics emulation is enabled.
736 // These values are used to properly adjust popup position.
danakj2ef31b82015-10-21 18:18:02737 gfx::Point popup_view_origin_for_emulation_;
738 gfx::Point popup_screen_origin_for_emulation_;
[email protected]b2e4c70132013-10-03 02:07:51739 float popup_origin_scale_for_emulation_;
740
[email protected]586871b2014-07-22 17:05:11741 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
[email protected]5b45ad42013-10-25 00:42:04742 scoped_ptr<ResizingModeSelector> resizing_mode_selector_;
743
[email protected]e3244ed2014-06-20 20:04:27744 // Lists of RenderFrameProxy objects that need to be notified of
745 // compositing-related events (e.g. DidCommitCompositorFrame).
brettw236d3172015-06-03 16:31:43746 base::ObserverList<RenderFrameProxy> render_frame_proxies_;
[email protected]a017938b2014-05-27 21:17:17747#if defined(VIDEO_HOLE)
brettw236d3172015-06-03 16:31:43748 base::ObserverList<RenderFrameImpl> video_hole_frames_;
[email protected]a017938b2014-05-27 21:17:17749#endif // defined(VIDEO_HOLE)
[email protected]bffc8302014-01-23 20:52:16750
[email protected]de3c5d82014-05-28 22:12:59751 // A list of RenderFrames associated with this RenderWidget. Notifications
752 // are sent to each frame in the list for events such as changing
753 // visibility state for example.
brettw236d3172015-06-03 16:31:43754 base::ObserverList<RenderFrameImpl> render_frames_;
[email protected]de3c5d82014-05-28 22:12:59755
[email protected]be1af0662014-07-29 19:55:51756 bool has_host_context_menu_location_;
757 gfx::Point host_context_menu_location_;
[email protected]a09d53ce2014-01-31 00:46:42758
alexclarke7fa93942015-10-21 15:37:11759 scoped_ptr<scheduler::RenderWidgetSchedulingState>
760 render_widget_scheduling_state_;
761
[email protected]05d478752009-04-08 23:38:16762 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
initial.commit09911bf2008-07-26 23:55:29763};
764
[email protected]e9ff79c2012-10-19 21:31:26765} // namespace content
766
[email protected]2cff0052011-03-18 16:51:44767#endif // CONTENT_RENDERER_RENDER_WIDGET_H_