blob: 4246158720fd11fb13b3ad2aee0d10d8f96da9b5 [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
[email protected]8062ab262014-05-27 16:56:4311#include "base/auto_reset.h"
initial.commit09911bf2008-07-26 23:55:2912#include "base/basictypes.h"
[email protected]586871b2014-07-22 17:05:1113#include "base/callback.h"
[email protected]f3112a52011-09-30 23:47:4914#include "base/compiler_specific.h"
[email protected]3b63f8f42011-03-28 01:54:1515#include "base/memory/ref_counted.h"
[email protected]8704f89b2011-04-15 00:30:0516#include "base/memory/scoped_ptr.h"
[email protected]bffc8302014-01-23 20:52:1617#include "base/observer_list.h"
[email protected]abb522162013-06-28 01:54:1618#include "base/time/time.h"
[email protected]f3112a52011-09-30 23:47:4919#include "content/common/content_export.h"
[email protected]c2809346d2014-03-20 00:11:0320#include "content/common/cursors/webcursor.h"
[email protected]ed7defa2013-03-12 21:29:5921#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
[email protected]9017d7852013-11-21 17:47:3522#include "content/common/input/synthetic_gesture_params.h"
[email protected]586871b2014-07-22 17:05:1123#include "content/renderer/message_delivery_policy.h"
[email protected]4f86bdb2012-11-10 19:11:1924#include "ipc/ipc_listener.h"
25#include "ipc/ipc_sender.h"
[email protected]5c30b5e02013-05-30 03:46:0826#include "third_party/WebKit/public/platform/WebRect.h"
[email protected]2255a9332013-06-17 05:12:3127#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
[email protected]c27dd4f2014-05-22 18:05:1928#include "third_party/WebKit/public/web/WebInputEvent.h"
[email protected]2255a9332013-06-17 05:12:3129#include "third_party/WebKit/public/web/WebPopupType.h"
30#include "third_party/WebKit/public/web/WebTextDirection.h"
31#include "third_party/WebKit/public/web/WebTextInputInfo.h"
[email protected]5d0bbdfa92013-12-10 00:35:5132#include "third_party/WebKit/public/web/WebTouchAction.h"
[email protected]0e45bd02013-07-12 20:20:0233#include "third_party/WebKit/public/web/WebWidget.h"
[email protected]2255a9332013-06-17 05:12:3134#include "third_party/WebKit/public/web/WebWidgetClient.h"
[email protected]d65adb12010-04-28 17:26:4935#include "third_party/skia/include/core/SkBitmap.h"
[email protected]b256eca2013-07-11 10:57:4036#include "ui/base/ime/text_input_mode.h"
[email protected]ad26ef42011-06-17 07:59:4537#include "ui/base/ime/text_input_type.h"
[email protected]a09d53ce2014-01-31 00:46:4238#include "ui/base/ui_base_types.h"
[email protected]08397d52011-02-05 01:53:3839#include "ui/gfx/native_widget_types.h"
[email protected]db4fc1e2013-09-06 20:01:5140#include "ui/gfx/range/range.h"
[email protected]08397d52011-02-05 01:53:3841#include "ui/gfx/rect.h"
[email protected]990278ff2012-11-13 02:12:5542#include "ui/gfx/vector2d.h"
[email protected]a2b5ded2013-05-20 21:32:5343#include "ui/gfx/vector2d_f.h"
[email protected]d353541f2012-05-03 22:45:4144#include "ui/surface/transport_dib.h"
initial.commit09911bf2008-07-26 23:55:2945
[email protected]aa4117f2011-12-09 22:19:2146struct ViewHostMsg_UpdateRect_Params;
[email protected]0fdd5012013-05-29 08:05:5647struct ViewMsg_Resize_Params;
[email protected]aa4117f2011-12-09 22:19:2148class ViewHostMsg_UpdateRect;
49
[email protected]484955942010-08-19 16:13:1850namespace IPC {
51class SyncMessage;
[email protected]586871b2014-07-22 17:05:1152class SyncMessageFilter;
[email protected]484955942010-08-19 16:13:1853}
54
[email protected]180ef242013-11-07 06:50:4655namespace blink {
[email protected]19193682014-04-03 15:01:4356struct WebDeviceEmulationParams;
[email protected]41d86852012-11-07 12:23:2457class WebGestureEvent;
[email protected]f56c7872013-06-18 12:31:5758class WebKeyboardEvent;
[email protected]6a8ddba52010-09-05 04:38:0659class WebMouseEvent;
[email protected]2d0f2e92011-10-03 09:02:2460class WebTouchEvent;
[email protected]526476902011-10-06 20:34:0661}
62
[email protected]586871b2014-07-22 17:05:1163namespace cc {
64class OutputSurface;
65class SwapPromise;
66}
[email protected]ba91a792013-02-06 09:48:2867
[email protected]db4fc1e2013-09-06 20:01:5168namespace gfx {
[email protected]4de6d1692011-10-12 08:45:4469class Range;
70}
71
[email protected]e9ff79c2012-10-19 21:31:2672namespace content {
[email protected]b2e4c70132013-10-03 02:07:5173class ExternalPopupMenu;
[email protected]586871b2014-07-22 17:05:1174class FrameSwapMessageQueue;
[email protected]adab2332013-07-25 18:04:3275class PepperPluginInstanceImpl;
[email protected]bffc8302014-01-23 20:52:1676class RenderFrameImpl;
[email protected]e3244ed2014-06-20 20:04:2777class RenderFrameProxy;
[email protected]ba91a792013-02-06 09:48:2878class RenderWidgetCompositor;
[email protected]e9ff79c2012-10-19 21:31:2679class RenderWidgetTest;
[email protected]5b45ad42013-10-25 00:42:0480class ResizingModeSelector;
[email protected]b2e4c70132013-10-03 02:07:5181struct ContextMenuParams;
[email protected]29e2fb42013-07-19 01:13:4782struct WebPluginGeometry;
[email protected]e9ff79c2012-10-19 21:31:2683
initial.commit09911bf2008-07-26 23:55:2984// RenderWidget provides a communication bridge between a WebWidget and
85// a RenderWidgetHost, the latter of which lives in a different process.
[email protected]f3112a52011-09-30 23:47:4986class CONTENT_EXPORT RenderWidget
[email protected]c47317e2012-06-20 22:35:3187 : public IPC::Listener,
88 public IPC::Sender,
[email protected]180ef242013-11-07 06:50:4689 NON_EXPORTED_BASE(virtual public blink::WebWidgetClient),
[email protected]f3112a52011-09-30 23:47:4990 public base::RefCounted<RenderWidget> {
initial.commit09911bf2008-07-26 23:55:2991 public:
92 // Creates a new RenderWidget. The opener_id is the routing ID of the
[email protected]380244092011-10-07 17:26:2793 // RenderView that this widget lives inside.
[email protected]0ebf3872008-11-07 21:35:0394 static RenderWidget* Create(int32 opener_id,
[email protected]180ef242013-11-07 06:50:4695 blink::WebPopupType popup_type,
96 const blink::WebScreenInfo& screen_info);
initial.commit09911bf2008-07-26 23:55:2997
[email protected]484955942010-08-19 16:13:1898 // Creates a WebWidget based on the popup type.
[email protected]180ef242013-11-07 06:50:4699 static blink::WebWidget* CreateWebWidget(RenderWidget* render_widget);
[email protected]484955942010-08-19 16:13:18100
[email protected]4ee64622014-03-21 22:34:15101 int32 routing_id() const { return routing_id_; }
102 int32 surface_id() const { return surface_id_; }
[email protected]180ef242013-11-07 06:50:46103 blink::WebWidget* webwidget() const { return webwidget_; }
[email protected]93b9d692011-04-13 00:44:31104 gfx::Size size() const { return size_; }
[email protected]589621b2010-09-23 22:01:07105 bool has_focus() const { return has_focus_; }
[email protected]ee41e7d22011-10-14 19:34:09106 bool is_fullscreen() const { return is_fullscreen_; }
[email protected]204f1df2012-01-04 20:21:13107 bool is_hidden() const { return is_hidden_; }
[email protected]4ee64622014-03-21 22:34:15108 bool handling_input_event() const { return handling_input_event_; }
109 // Temporary for debugging purposes...
110 bool closing() const { return closing_; }
111 bool is_swapped_out() { return is_swapped_out_; }
112 ui::MenuSourceType context_menu_source_type() {
[email protected]be1af0662014-07-29 19:55:51113 return context_menu_source_type_;
114 }
115 bool has_host_context_menu_location() {
116 return has_host_context_menu_location_;
117 }
118 gfx::Point host_context_menu_location() {
119 return host_context_menu_location_;
[email protected]4ee64622014-03-21 22:34:15120 }
[email protected]589621b2010-09-23 22:01:07121
[email protected]bffc8302014-01-23 20:52:16122 // Functions to track out-of-process frames for special notifications.
[email protected]e3244ed2014-06-20 20:04:27123 void RegisterRenderFrameProxy(RenderFrameProxy* proxy);
124 void UnregisterRenderFrameProxy(RenderFrameProxy* proxy);
[email protected]bffc8302014-01-23 20:52:16125
[email protected]de3c5d82014-05-28 22:12:59126 // Functions to track all RenderFrame objects associated with this
127 // RenderWidget.
128 void RegisterRenderFrame(RenderFrameImpl* frame);
129 void UnregisterRenderFrame(RenderFrameImpl* frame);
130
[email protected]a017938b2014-05-27 21:17:17131#if defined(VIDEO_HOLE)
132 void RegisterVideoHoleFrame(RenderFrameImpl* frame);
133 void UnregisterVideoHoleFrame(RenderFrameImpl* frame);
134#endif // defined(VIDEO_HOLE)
135
[email protected]c47317e2012-06-20 22:35:31136 // IPC::Listener
dcheng6d18e402014-10-21 12:32:52137 bool OnMessageReceived(const IPC::Message& msg) override;
initial.commit09911bf2008-07-26 23:55:29138
[email protected]c47317e2012-06-20 22:35:31139 // IPC::Sender
dcheng6d18e402014-10-21 12:32:52140 bool Send(IPC::Message* msg) override;
initial.commit09911bf2008-07-26 23:55:29141
[email protected]180ef242013-11-07 06:50:46142 // blink::WebWidgetClient
[email protected]9cd43a62012-03-26 08:03:56143 virtual void willBeginCompositorFrame();
[email protected]180ef242013-11-07 06:50:46144 virtual void didAutoResize(const blink::WebSize& new_size);
[email protected]e195e582013-03-08 01:32:59145 virtual void initializeLayerTreeView();
[email protected]180ef242013-11-07 06:50:46146 virtual blink::WebLayerTreeView* layerTreeView();
[email protected]3391a0772012-03-28 00:32:07147 virtual void didBecomeReadyForAdditionalInput();
[email protected]58264a32011-11-17 23:36:15148 virtual void didCommitAndDrawCompositorFrame();
149 virtual void didCompleteSwapBuffers();
[email protected]8b9e52b2014-01-17 16:35:31150 virtual void scheduleComposite();
[email protected]4873c7d2009-07-16 06:36:28151 virtual void didFocus();
152 virtual void didBlur();
[email protected]180ef242013-11-07 06:50:46153 virtual void didChangeCursor(const blink::WebCursorInfo&);
[email protected]4873c7d2009-07-16 06:36:28154 virtual void closeWidgetSoon();
[email protected]180ef242013-11-07 06:50:46155 virtual void show(blink::WebNavigationPolicy);
[email protected]dd48d492014-03-16 05:04:39156 virtual void runModal() {}
[email protected]180ef242013-11-07 06:50:46157 virtual blink::WebRect windowRect();
158 virtual void setToolTipText(const blink::WebString& text,
159 blink::WebTextDirection hint);
160 virtual void setWindowRect(const blink::WebRect&);
161 virtual blink::WebRect windowResizerRect();
162 virtual blink::WebRect rootWindowRect();
163 virtual blink::WebScreenInfo screenInfo();
[email protected]f660d9c2012-06-06 18:31:21164 virtual float deviceScaleFactor();
[email protected]fa7b1dc2010-06-23 17:53:04165 virtual void resetInputMethod();
[email protected]180ef242013-11-07 06:50:46166 virtual void didHandleGestureEvent(const blink::WebGestureEvent& event,
[email protected]c68c3e4e2013-01-24 00:36:56167 bool event_cancelled);
[email protected]adb362312014-06-28 06:04:24168 virtual void showImeIfNeeded();
[email protected]4873c7d2009-07-16 06:36:28169
[email protected]7912e822014-04-16 02:37:03170 // Begins the compositor's scheduler to start producing frames.
171 void StartCompositor();
172
[email protected]aeeedad2014-08-22 18:16:22173 // Stop compositing.
174 void DestroyLayerTreeView();
175
[email protected]4873c7d2009-07-16 06:36:28176 // Called when a plugin is moved. These events are queued up and sent with
177 // the next paint or scroll message to the host.
[email protected]29e2fb42013-07-19 01:13:47178 void SchedulePluginMove(const WebPluginGeometry& move);
initial.commit09911bf2008-07-26 23:55:29179
[email protected]268654772009-08-06 23:02:04180 // Called when a plugin window has been destroyed, to make sure the currently
181 // pending moves don't try to reference it.
182 void CleanupWindowInPluginMoves(gfx::PluginWindowHandle window);
183
[email protected]24ed0432013-04-24 07:50:31184 RenderWidgetCompositor* compositor() const;
185
[email protected]8062ab262014-05-27 16:56:43186 const ui::LatencyInfo* current_event_latency_info() const {
187 return current_event_latency_info_;
188 }
189
[email protected]ebc0e1df2013-08-01 02:46:22190 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(bool fallback);
[email protected]ba91a792013-02-06 09:48:28191
[email protected]79fa22e2013-08-23 15:18:12192 // Callback for use with synthetic gestures (e.g. BeginSmoothScroll).
193 typedef base::Callback<void()> SyntheticGestureCompletionCallback;
[email protected]0e241b4b2012-08-18 09:06:27194
[email protected]9017d7852013-11-21 17:47:35195 // Send a synthetic gesture to the browser to be queued to the synthetic
196 // gesture controller.
197 void QueueSyntheticGesture(
198 scoped_ptr<SyntheticGestureParams> gesture_params,
199 const SyntheticGestureCompletionCallback& callback);
[email protected]1e1dd182013-09-12 01:51:15200
initial.commit09911bf2008-07-26 23:55:29201 // Close the underlying WebWidget.
[email protected]60c42a8c72009-10-09 04:08:59202 virtual void Close();
initial.commit09911bf2008-07-26 23:55:29203
[email protected]6fceb912013-02-15 06:24:15204 // Notifies about a compositor frame commit operation having finished.
205 virtual void DidCommitCompositorFrame();
206
[email protected]586871b2014-07-22 17:05:11207 // Deliveres |message| together with compositor state change updates. The
208 // exact behavior depends on |policy|.
209 // This mechanism is not a drop-in replacement for IPC: messages sent this way
210 // will not be automatically available to BrowserMessageFilter, for example.
211 // FIFO ordering is preserved between messages enqueued with the same
212 // |policy|, the ordering between messages enqueued for different policies is
213 // undefined.
214 //
215 // |msg| message to send, ownership of |msg| is transferred.
216 // |policy| see the comment on MessageDeliveryPolicy.
217 void QueueMessage(IPC::Message* msg, MessageDeliveryPolicy policy);
218
[email protected]66fca5bc2013-05-23 06:58:29219 // Handle common setup/teardown for handling IME events.
220 void StartHandlingImeEvent();
221 void FinishHandlingImeEvent();
222
[email protected]4ee64622014-03-21 22:34:15223 // Returns whether we currently should handle an IME event.
224 bool ShouldHandleImeEvent();
225
[email protected]33004772013-11-12 09:49:23226 virtual void InstrumentWillBeginFrame(int frame_id) {}
[email protected]35134e12013-02-22 20:07:40227 virtual void InstrumentDidBeginFrame() {}
228 virtual void InstrumentDidCancelFrame() {}
229 virtual void InstrumentWillComposite() {}
230
[email protected]c27dd4f2014-05-22 18:05:19231 // When paused in debugger, we send ack for mouse event early. This ensures
232 // that we continue receiving mouse moves and pass them to debugger. Returns
233 // whether we are paused in mouse move event and have sent the ack.
234 bool SendAckForMouseMoveFromDebugger();
235
236 // When resumed from pause in debugger while handling mouse move,
237 // we should not send an extra ack (see SendAckForMouseMoveFromDebugger).
238 void IgnoreAckForMouseMoveFromDebugger();
239
[email protected]b2e4c70132013-10-03 02:07:51240 // ScreenMetricsEmulator class manages screen emulation inside a render
241 // widget. This includes resizing, placing view on the screen at desired
242 // position, changing device scale factor, and scaling down the whole
243 // widget if required to fit into the browser window.
244 class ScreenMetricsEmulator;
245
246 // Emulates screen and widget metrics. Supplied values override everything
247 // coming from host.
248 void EnableScreenMetricsEmulation(
[email protected]19193682014-04-03 15:01:43249 const blink::WebDeviceEmulationParams& params);
[email protected]b2e4c70132013-10-03 02:07:51250 void DisableScreenMetricsEmulation();
251 void SetPopupOriginAdjustmentsForEmulation(ScreenMetricsEmulator* emulator);
[email protected]2d6836f42014-07-02 17:25:31252 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor);
[email protected]b2e4c70132013-10-03 02:07:51253
[email protected]7d08a9352013-10-15 08:24:56254 void ScheduleCompositeWithForcedRedraw();
255
[email protected]4d7e46a2013-11-08 05:33:40256 // Called by the compositor in single-threaded mode when a swap is posted,
257 // completes or is aborted.
258 void OnSwapBuffersPosted();
259 void OnSwapBuffersComplete();
260 void OnSwapBuffersAborted();
261
shuchen3517bb62014-10-15 03:55:57262 // Checks if the text input state and compose inline mode have been changed.
263 // If they are changed, the new value will be sent to the browser process.
264 void UpdateTextInputType();
265
[email protected]7a4e2532013-12-02 21:30:02266 // Checks if the selection bounds have been changed. If they are changed,
267 // the new value will be sent to the browser process.
268 void UpdateSelectionBounds();
269
[email protected]e5e438d62014-03-27 21:47:16270 virtual void GetSelectionBounds(gfx::Rect* start, gfx::Rect* end);
271
[email protected]a09d53ce2014-01-31 00:46:42272 void OnShowHostContextMenu(ContextMenuParams* params);
[email protected]7a4e2532013-12-02 21:30:02273
shuchen3517bb62014-10-15 03:55:57274#if defined(OS_ANDROID) || defined(USE_AURA)
[email protected]90f24152014-04-09 12:41:36275 enum ShowIme {
276 SHOW_IME_IF_NEEDED,
277 NO_SHOW_IME,
278 };
279
280 enum ChangeSource {
281 FROM_NON_IME,
282 FROM_IME,
283 };
284
285 // |show_ime| should be SHOW_IME_IF_NEEDED iff the update may cause the ime to
286 // be displayed, e.g. after a tap on an input field on mobile.
287 // |change_source| should be FROM_NON_IME when the renderer has to wait for
288 // the browser to acknowledge the change before the renderer handles any more
289 // IME events. This is when the text change did not originate from the IME in
290 // the browser side, such as changes by JavaScript or autofill.
291 void UpdateTextInputState(ShowIme show_ime, ChangeSource change_source);
shuchen3517bb62014-10-15 03:55:57292#endif
[email protected]4ee64622014-03-21 22:34:15293
yukawa5f21c6a2014-10-27 17:09:30294#if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
[email protected]7a4e2532013-12-02 21:30:02295 // Checks if the composition range or composition character bounds have been
296 // changed. If they are changed, the new value will be sent to the browser
yukawa5f21c6a2014-10-27 17:09:30297 // process. This method does nothing when the browser process is not able to
298 // handle composition range and composition character bounds.
[email protected]7a4e2532013-12-02 21:30:02299 void UpdateCompositionInfo(bool should_update_range);
300#endif
301
[email protected]a4f0d882014-05-01 23:48:10302#if defined(OS_ANDROID)
303 void DidChangeBodyBackgroundColor(SkColor bg_color);
304#endif
305
initial.commit09911bf2008-07-26 23:55:29306 protected:
[email protected]8085dbc82008-09-26 22:53:44307 // Friend RefCounted so that the dtor can be non-public. Using this class
308 // without ref-counting is an error.
309 friend class base::RefCounted<RenderWidget>;
[email protected]7339cd22010-10-27 00:11:20310 // For unit tests.
[email protected]e9ff79c2012-10-19 21:31:26311 friend class RenderWidgetTest;
[email protected]8085dbc82008-09-26 22:53:44312
[email protected]61e2b3cc2012-03-02 16:13:34313 enum ResizeAck {
314 SEND_RESIZE_ACK,
315 NO_RESIZE_ACK,
316 };
317
[email protected]180ef242013-11-07 06:50:46318 RenderWidget(blink::WebPopupType popup_type,
319 const blink::WebScreenInfo& screen_info,
[email protected]1ac10dca2013-08-20 20:47:04320 bool swapped_out,
[email protected]7912e822014-04-16 02:37:03321 bool hidden,
322 bool never_visible);
[email protected]ce2b28e2012-08-09 15:53:57323
dcheng6d18e402014-10-21 12:32:52324 ~RenderWidget() override;
initial.commit09911bf2008-07-26 23:55:29325
326 // Initializes this view with the given opener. CompleteInit must be called
327 // later.
[email protected]a635f942012-12-07 10:34:29328 bool Init(int32 opener_id);
initial.commit09911bf2008-07-26 23:55:29329
[email protected]484955942010-08-19 16:13:18330 // Called by Init and subclasses to perform initialization.
[email protected]a635f942012-12-07 10:34:29331 bool DoInit(int32 opener_id,
[email protected]180ef242013-11-07 06:50:46332 blink::WebWidget* web_widget,
[email protected]484955942010-08-19 16:13:18333 IPC::SyncMessage* create_widget_message);
334
initial.commit09911bf2008-07-26 23:55:29335 // Finishes creation of a pending view started with Init.
[email protected]fc4404d2012-11-07 19:53:30336 void CompleteInit();
initial.commit09911bf2008-07-26 23:55:29337
[email protected]992db4c2011-05-12 15:37:15338 // Sets whether this RenderWidget has been swapped out to be displayed by
339 // a RenderWidget in a different process. If so, no new IPC messages will be
340 // sent (only ACKs) and the process is free to exit when there are no other
341 // active RenderWidgets.
342 void SetSwappedOut(bool is_swapped_out);
343
[email protected]949b6592014-08-20 13:17:52344 // Allows the process to exit once the unload handler has finished, if there
345 // are no other active RenderWidgets.
346 void WasSwappedOut();
347
[email protected]fd847792013-10-24 17:12:35348 void FlushPendingInputEventAck();
[email protected]2533ce12009-05-09 00:02:24349 void DoDeferredClose();
[email protected]180ef242013-11-07 06:50:46350 void DoDeferredSetWindowRect(const blink::WebRect& pos);
initial.commit09911bf2008-07-26 23:55:29351
[email protected]61e2b3cc2012-03-02 16:13:34352 // Resizes the render widget.
353 void Resize(const gfx::Size& new_size,
[email protected]60d47ac2013-03-01 23:42:44354 const gfx::Size& physical_backing_size,
dtrainorcb7779b82014-12-04 01:08:02355 bool top_controls_shrink_blink_size,
356 float top_controls_height,
[email protected]bb6378fe2014-04-28 21:19:44357 const gfx::Size& visible_viewport_size,
[email protected]61e2b3cc2012-03-02 16:13:34358 const gfx::Rect& resizer_rect,
359 bool is_fullscreen,
360 ResizeAck resize_ack);
[email protected]92650162013-10-30 03:31:02361 // Used to force the size of a window when running layout tests.
bokanf0fd2412014-10-30 15:28:55362 void ResizeSynchronously(
363 const gfx::Rect& new_position,
364 const gfx::Size& visible_viewport_size);
[email protected]b2e4c70132013-10-03 02:07:51365 virtual void SetScreenMetricsEmulationParameters(
[email protected]7f99fc22013-11-08 14:05:58366 float device_scale_factor,
367 const gfx::Point& root_layer_offset,
368 float root_layer_scale);
[email protected]53907862014-03-25 15:42:40369#if defined(OS_MACOSX) || defined(OS_ANDROID)
[email protected]b2e4c70132013-10-03 02:07:51370 void SetExternalPopupOriginAdjustmentsForEmulation(
371 ExternalPopupMenu* popup, ScreenMetricsEmulator* emulator);
[email protected]53907862014-03-25 15:42:40372#endif
[email protected]61e2b3cc2012-03-02 16:13:34373
initial.commit09911bf2008-07-26 23:55:29374 // RenderWidget IPC message handlers
[email protected]180ef242013-11-07 06:50:46375 void OnHandleInputEvent(const blink::WebInputEvent* event,
[email protected]205294b2014-03-18 20:48:35376 const ui::LatencyInfo& latency_info,
[email protected]c084330e02013-04-27 01:08:15377 bool keyboard_shortcut);
[email protected]34202de2013-05-06 23:36:22378 void OnCursorVisibilityChange(bool is_visible);
[email protected]c084330e02013-04-27 01:08:15379 void OnMouseCaptureLost();
380 virtual void OnSetFocus(bool enable);
[email protected]6de7fc482014-06-06 10:46:44381 virtual void OnClose();
[email protected]fc4404d2012-11-07 19:53:30382 void OnCreatingNewAck();
[email protected]0fdd5012013-05-29 08:05:56383 virtual void OnResize(const ViewMsg_Resize_Params& params);
noel89949e62014-09-30 01:12:41384 void OnColorProfile(const std::vector<char>& color_profile);
[email protected]b5913d72012-02-07 22:26:54385 void OnChangeResizeRect(const gfx::Rect& resizer_rect);
[email protected]941e4552010-02-01 21:23:43386 virtual void OnWasHidden();
[email protected]3399dd822014-08-09 11:14:24387 virtual void OnWasShown(bool needs_repainting,
388 const ui::LatencyInfo& latency_info);
[email protected]8400e032010-02-26 18:50:11389 void OnCreateVideoAck(int32 video_id);
390 void OnUpdateVideoAck(int32 video_id);
[email protected]2533ce12009-05-09 00:02:24391 void OnRequestMoveAck();
[email protected]fa7b1dc2010-06-23 17:53:04392 void OnSetInputMethodActive(bool is_active);
[email protected]37a241c2013-12-03 03:16:17393 void OnCandidateWindowShown();
394 void OnCandidateWindowUpdated();
395 void OnCandidateWindowHidden();
[email protected]56ea1a62011-05-30 07:05:57396 virtual void OnImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26397 const base::string16& text,
[email protected]180ef242013-11-07 06:50:46398 const std::vector<blink::WebCompositionUnderline>& underlines,
[email protected]fa7b1dc2010-06-23 17:53:04399 int selection_start,
400 int selection_end);
[email protected]fcf75d42013-12-03 20:11:26401 virtual void OnImeConfirmComposition(const base::string16& text,
[email protected]db4fc1e2013-09-06 20:01:51402 const gfx::Range& replacement_range,
[email protected]0e45bd02013-07-12 20:20:02403 bool keep_selection);
[email protected]0bc1f572013-04-17 01:46:31404 void OnRepaint(gfx::Size size_to_paint);
[email protected]79fa22e2013-08-23 15:18:12405 void OnSyntheticGestureCompleted();
[email protected]180ef242013-11-07 06:50:46406 void OnSetTextDirection(blink::WebTextDirection direction);
[email protected]872ae5b2011-05-26 20:20:50407 void OnGetFPS();
[email protected]80ad8622012-11-07 16:33:03408 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect,
409 const gfx::Rect& window_screen_rect);
[email protected]2384b6c2013-02-28 23:58:51410 void OnShowImeIfNeeded();
[email protected]0d1ebed12013-08-05 22:01:13411
[email protected]adb362312014-06-28 06:04:24412#if defined(OS_ANDROID)
[email protected]0d1ebed12013-08-05 22:01:13413 // Whenever an IME event that needs an acknowledgement is sent to the browser,
414 // the number of outstanding IME events that needs acknowledgement should be
415 // incremented. All IME events will be dropped until we receive an ack from
416 // the browser.
417 void IncrementOutstandingImeEventAcks();
418
419 // Called by the browser process for every required IME acknowledgement.
420 void OnImeEventAck();
[email protected]105dffb42013-02-20 03:46:21421#endif
[email protected]0d1ebed12013-08-05 22:01:13422
[email protected]847a2582013-03-09 02:29:51423 // Notify the compositor about a change in viewport size. This should be
424 // used only with auto resize mode WebWidgets, as normal WebWidgets should
425 // go through OnResize.
[email protected]97e1bf72013-03-06 14:06:05426 void AutoResizeCompositor();
427
[email protected]468ac582012-11-20 00:53:19428 virtual void SetDeviceScaleFactor(float device_scale_factor);
[email protected]28ed6b32014-06-08 02:16:27429 virtual bool SetDeviceColorProfile(const std::vector<char>& color_profile);
noeldb4df152014-09-16 17:45:20430 virtual void ResetDeviceColorProfileForTesting();
[email protected]468ac582012-11-20 00:53:19431
[email protected]fcdc5642014-05-09 14:32:24432 virtual void OnOrientationChange();
433
[email protected]29ed96a2012-02-04 18:12:16434 // Override points to notify derived classes that a paint has happened.
[email protected]0704ac32013-10-03 15:24:22435 // DidInitiatePaint happens when that has completed, and subsequent rendering
436 // won't affect the painted content. DidFlushPaint happens once we've received
437 // the ACK that the screen has been updated. For a given paint operation,
438 // these overrides will always be called in the order DidInitiatePaint,
439 // DidFlushPaint.
[email protected]00c39612010-03-06 02:53:28440 virtual void DidInitiatePaint() {}
441 virtual void DidFlushPaint() {}
[email protected]a2f6bc112009-06-27 16:27:25442
[email protected]ed7defa2013-03-12 21:29:59443 virtual GURL GetURLForGraphicsContext3D();
[email protected]65225772011-05-12 21:10:24444
[email protected]d54169e92011-01-21 09:19:52445 // Gets the scroll offset of this widget, if this widget has a notion of
446 // scroll offset.
[email protected]ceb36f7d2012-10-31 18:33:24447 virtual gfx::Vector2d GetScrollOffset();
[email protected]d54169e92011-01-21 09:19:52448
[email protected]bee16aab2009-08-26 15:55:03449 // Sets the "hidden" state of this widget. All accesses to is_hidden_ should
450 // use this method so that we can properly inform the RenderThread of our
451 // state.
452 void SetHidden(bool hidden);
453
[email protected]2b624c562011-10-27 22:58:26454 void WillToggleFullscreen();
455 void DidToggleFullscreen();
456
[email protected]674741932009-02-04 23:44:46457 bool next_paint_is_resize_ack() const;
[email protected]674741932009-02-04 23:44:46458 void set_next_paint_is_resize_ack();
[email protected]674741932009-02-04 23:44:46459 void set_next_paint_is_repaint_ack();
[email protected]ec7dc112008-08-06 05:30:12460
[email protected]586871b2014-07-22 17:05:11461 // QueueMessage implementation extracted into a static method for easy
462 // testing.
463 static scoped_ptr<cc::SwapPromise> QueueMessageImpl(
464 IPC::Message* msg,
465 MessageDeliveryPolicy policy,
466 FrameSwapMessageQueue* frame_swap_message_queue,
467 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter,
468 bool commit_requested,
469 int source_frame_number);
470
[email protected]56ea1a62011-05-30 07:05:57471 // Override point to obtain that the current input method state and caret
472 // position.
[email protected]ad26ef42011-06-17 07:59:45473 virtual ui::TextInputType GetTextInputType();
[email protected]5b739cb2012-08-21 20:35:21474 virtual ui::TextInputType WebKitToUiTextInputType(
[email protected]180ef242013-11-07 06:50:46475 blink::WebTextInputType type);
[email protected]ad26ef42011-06-17 07:59:45476
yukawa5f21c6a2014-10-27 17:09:30477#if defined(OS_MACOSX) || defined(USE_AURA) || defined(OS_ANDROID)
[email protected]58b48a0d2012-06-13 07:01:35478 // Override point to obtain that the current composition character bounds.
479 // In the case of surrogate pairs, the character is treated as two characters:
480 // the bounds for first character is actual one, and the bounds for second
481 // character is zero width rectangle.
482 virtual void GetCompositionCharacterBounds(
483 std::vector<gfx::Rect>* character_bounds);
484
[email protected]88dbe32f2013-06-20 23:31:36485 // Returns the range of the text that is being composed or the selection if
486 // the composition does not exist.
[email protected]db4fc1e2013-09-06 20:01:51487 virtual void GetCompositionRange(gfx::Range* range);
[email protected]88dbe32f2013-06-20 23:31:36488
[email protected]58b48a0d2012-06-13 07:01:35489 // Returns true if the composition range or composition character bounds
490 // should be sent to the browser process.
491 bool ShouldUpdateCompositionInfo(
[email protected]db4fc1e2013-09-06 20:01:51492 const gfx::Range& range,
[email protected]58b48a0d2012-06-13 07:01:35493 const std::vector<gfx::Rect>& bounds);
[email protected]501ea13d2013-07-09 17:03:29494#endif
[email protected]58b48a0d2012-06-13 07:01:35495
[email protected]ad26ef42011-06-17 07:59:45496 // Override point to obtain that the current input method state about
497 // composition text.
498 virtual bool CanComposeInline();
[email protected]56ea1a62011-05-30 07:05:57499
initial.commit09911bf2008-07-26 23:55:29500 // Tells the renderer it does not have focus. Used to prevent us from getting
501 // the focus on our own when the browser did not focus us.
502 void ClearFocus();
503
[email protected]2533ce12009-05-09 00:02:24504 // Set the pending window rect.
505 // Because the real render_widget is hosted in another process, there is
506 // a time period where we may have set a new window rect which has not yet
507 // been processed by the browser. So we maintain a pending window rect
508 // size. If JS code sets the WindowRect, and then immediately calls
509 // GetWindowRect() we'll use this pending window rect as the size.
[email protected]180ef242013-11-07 06:50:46510 void SetPendingWindowRect(const blink::WebRect& r);
[email protected]2533ce12009-05-09 00:02:24511
[email protected]446705872009-09-10 07:22:48512 // Called by OnHandleInputEvent() to notify subclasses that a key event was
513 // just handled.
514 virtual void DidHandleKeyEvent() {}
515
[email protected]67bfb83f2011-09-22 03:36:37516 // Called by OnHandleInputEvent() to notify subclasses that a mouse event is
517 // about to be handled.
518 // Returns true if no further handling is needed. In that case, the event
519 // won't be sent to WebKit or trigger DidHandleMouseEvent().
[email protected]180ef242013-11-07 06:50:46520 virtual bool WillHandleMouseEvent(const blink::WebMouseEvent& event);
[email protected]67bfb83f2011-09-22 03:36:37521
[email protected]41d86852012-11-07 12:23:24522 // Called by OnHandleInputEvent() to notify subclasses that a gesture event is
523 // about to be handled.
524 // Returns true if no further handling is needed. In that case, the event
525 // won't be sent to WebKit.
[email protected]180ef242013-11-07 06:50:46526 virtual bool WillHandleGestureEvent(const blink::WebGestureEvent& event);
[email protected]41d86852012-11-07 12:23:24527
[email protected]6a8ddba52010-09-05 04:38:06528 // Called by OnHandleInputEvent() to notify subclasses that a mouse event was
529 // just handled.
[email protected]180ef242013-11-07 06:50:46530 virtual void DidHandleMouseEvent(const blink::WebMouseEvent& event) {}
[email protected]6a8ddba52010-09-05 04:38:06531
[email protected]2d0f2e92011-10-03 09:02:24532 // Called by OnHandleInputEvent() to notify subclasses that a touch event was
533 // just handled.
[email protected]180ef242013-11-07 06:50:46534 virtual void DidHandleTouchEvent(const blink::WebTouchEvent& event) {}
[email protected]2d0f2e92011-10-03 09:02:24535
[email protected]3d5c243b2012-11-30 00:26:01536 // Check whether the WebWidget has any touch event handlers registered
537 // at the given point.
538 virtual bool HasTouchEventHandlersAt(const gfx::Point& point) const;
539
[email protected]ce6689f2013-03-29 12:52:55540 // Check whether the WebWidget has any touch event handlers registered.
541 virtual void hasTouchEventHandlers(bool has_handlers);
542
[email protected]5d0bbdfa92013-12-10 00:35:51543 // Tell the browser about the actions permitted for a new touch point.
544 virtual void setTouchAction(blink::WebTouchAction touch_action);
545
[email protected]90f24152014-04-09 12:41:36546 // Called when value of focused text field gets dirty, e.g. value is modified
547 // by script, not by user input.
548 virtual void didUpdateTextOfFocusedElementByNonUserInput();
549
[email protected]ed7defa2013-03-12 21:29:59550 // Creates a 3D context associated with this view.
[email protected]828a3932014-04-02 14:43:13551 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateGraphicsContext3D();
[email protected]ed7defa2013-03-12 21:29:59552
initial.commit09911bf2008-07-26 23:55:29553 // Routing ID that allows us to communicate to the parent browser process
554 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent.
555 int32 routing_id_;
556
[email protected]9f4f3322012-01-18 22:29:56557 int32 surface_id_;
558
[email protected]c5b3b5e2009-02-13 06:41:11559 // We are responsible for destroying this object via its Close method.
[email protected]4ee64622014-03-21 22:34:15560 // May be NULL when the window is closing.
[email protected]180ef242013-11-07 06:50:46561 blink::WebWidget* webwidget_;
initial.commit09911bf2008-07-26 23:55:29562
[email protected]8926c602013-01-23 05:32:06563 // This is lazily constructed and must not outlive webwidget_.
[email protected]ba91a792013-02-06 09:48:28564 scoped_ptr<RenderWidgetCompositor> compositor_;
[email protected]8926c602013-01-23 05:32:06565
initial.commit09911bf2008-07-26 23:55:29566 // Set to the ID of the view that initiated creating this view, if any. When
567 // the view was initiated by the browser (the common case), this will be
568 // MSG_ROUTING_NONE. This is used in determining ownership when opening
569 // child tabs. See RenderWidget::createWebViewWithRequest.
570 //
571 // This ID may refer to an invalid view if that view is closed before this
572 // view is.
573 int32 opener_id_;
574
575 // The position where this view should be initially shown.
576 gfx::Rect initial_pos_;
577
[email protected]fc4404d2012-11-07 19:53:30578 bool init_complete_;
initial.commit09911bf2008-07-26 23:55:29579
580 // We store the current cursor object so we can avoid spamming SetCursor
581 // messages.
582 WebCursor current_cursor_;
[email protected]88efb7ec2009-07-14 16:32:59583
initial.commit09911bf2008-07-26 23:55:29584 // The size of the RenderWidget.
585 gfx::Size size_;
586
[email protected]60d47ac2013-03-01 23:42:44587 // The size of the view's backing surface in non-DPI-adjusted pixels.
588 gfx::Size physical_backing_size_;
589
dtrainorcb7779b82014-12-04 01:08:02590 // Whether or not Blink's viewport size should be shrunk by the height of the
591 // URL-bar (always false on platforms where URL-bar hiding isn't supported).
592 bool top_controls_shrink_blink_size_;
593
594 // The height of the top controls (always 0 on platforms where URL-bar hiding
595 // isn't supported).
596 float top_controls_height_;
[email protected]d9083762013-03-24 01:36:40597
[email protected]bb6378fe2014-04-28 21:19:44598 // The size of the visible viewport in DPI-adjusted pixels.
599 gfx::Size visible_viewport_size_;
600
[email protected]f21c613a2009-02-12 14:46:17601 // The area that must be reserved for drawing the resize corner.
602 gfx::Rect resizer_rect_;
603
[email protected]53d3f302009-12-21 04:42:05604 // Flags for the next ViewHostMsg_UpdateRect message.
initial.commit09911bf2008-07-26 23:55:29605 int next_paint_flags_;
606
[email protected]847a2582013-03-09 02:29:51607 // Whether the WebWidget is in auto resize mode, which is used for example
608 // by extension popups.
609 bool auto_resize_mode_;
610
[email protected]ea3ee0a2012-05-15 03:43:09611 // True if we need to send an UpdateRect message to notify the browser about
612 // an already-completed auto-resize.
613 bool need_update_rect_for_auto_resize_;
614
initial.commit09911bf2008-07-26 23:55:29615 // Set to true if we should ignore RenderWidget::Show calls.
616 bool did_show_;
617
618 // Indicates that we shouldn't bother generated paint events.
619 bool is_hidden_;
620
[email protected]7912e822014-04-16 02:37:03621 // Indicates that we are never visible, so never produce graphical output.
622 bool never_visible_;
623
[email protected]ee41e7d22011-10-14 19:34:09624 // Indicates that we are in fullscreen mode.
625 bool is_fullscreen_;
626
initial.commit09911bf2008-07-26 23:55:29627 // Indicates whether we have been focused/unfocused by the browser.
628 bool has_focus_;
629
[email protected]5dd768212009-08-13 23:34:49630 // Are we currently handling an input event?
631 bool handling_input_event_;
632
[email protected]e8f775f2013-02-14 21:00:50633 // Are we currently handling an ime event?
634 bool handling_ime_event_;
635
[email protected]c27dd4f2014-05-22 18:05:19636 // Type of the input event we are currently handling.
637 blink::WebInputEvent::Type handling_event_type_;
638
639 // Whether we should not send ack for the current mouse move.
640 bool ignore_ack_for_mouse_move_from_debugger_;
[email protected]5d0bbdfa92013-12-10 00:35:51641
initial.commit09911bf2008-07-26 23:55:29642 // True if we have requested this widget be closed. No more messages will
643 // be sent, except for a Close.
644 bool closing_;
645
[email protected]aeeedad2014-08-22 18:16:22646 // True if it is known that the host is in the process of being shut down.
647 bool host_closing_;
648
[email protected]992db4c2011-05-12 15:37:15649 // Whether this RenderWidget is currently swapped out, such that the view is
650 // being rendered by another process. If all RenderWidgets in a process are
651 // swapped out, the process can exit.
652 bool is_swapped_out_;
653
[email protected]fa7b1dc2010-06-23 17:53:04654 // Indicates if an input method is active in the browser process.
655 bool input_method_is_active_;
initial.commit09911bf2008-07-26 23:55:29656
[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
[email protected]12fbad812009-09-01 18:21:24698 scoped_ptr<IPC::Message> pending_input_event_ack_;
699
[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]b68a0e52011-12-08 15:11:12703 // Indicates if the next sequence of Char events should be suppressed or not.
704 bool suppress_next_char_events_;
705
[email protected]842f10652012-06-06 01:54:04706 // Properties of the screen hosting this RenderWidget instance.
[email protected]180ef242013-11-07 06:50:46707 blink::WebScreenInfo screen_info_;
[email protected]842f10652012-06-06 01:54:04708
[email protected]f1cccb32012-06-06 18:29:59709 // The device scale factor. This value is computed from the DPI entries in
710 // |screen_info_| on some platforms, and defaults to 1 on other platforms.
[email protected]faec7b12012-06-19 14:42:13711 float device_scale_factor_;
[email protected]f1cccb32012-06-06 18:29:59712
[email protected]28ed6b32014-06-08 02:16:27713 // The device color profile on supported platforms.
714 std::vector<char> device_color_profile_;
715
[email protected]9017d7852013-11-21 17:47:35716 // State associated with synthetic gestures. Synthetic gestures are processed
717 // in-order, so a queue is sufficient to identify the correct state for a
718 // completed gesture.
719 std::queue<SyntheticGestureCompletionCallback>
720 pending_synthetic_gesture_callbacks_;
[email protected]0e241b4b2012-08-18 09:06:27721
[email protected]8062ab262014-05-27 16:56:43722 const ui::LatencyInfo* current_event_latency_info_;
723
[email protected]53b4cc12013-07-18 23:02:30724 uint32 next_output_surface_id_;
725
[email protected]0d1ebed12013-08-05 22:01:13726#if defined(OS_ANDROID)
[email protected]90f24152014-04-09 12:41:36727 // Indicates value in the focused text field is in dirty state, i.e. modified
728 // by script etc., not by user input.
729 bool text_field_is_dirty_;
730
[email protected]0d1ebed12013-08-05 22:01:13731 // A counter for number of outstanding messages from the renderer to the
732 // browser regarding IME-type events that have not been acknowledged by the
733 // browser. If this value is not 0 IME events will be dropped.
734 int outstanding_ime_acks_;
[email protected]a4f0d882014-05-01 23:48:10735
736 // The background color of the document body element. This is used as the
737 // default background color for filling the screen areas for which we don't
738 // have the actual content.
739 SkColor body_background_color_;
[email protected]0d1ebed12013-08-05 22:01:13740#endif
741
[email protected]b2e4c70132013-10-03 02:07:51742 scoped_ptr<ScreenMetricsEmulator> screen_metrics_emulator_;
743
744 // Popups may be displaced when screen metrics emulation is enabled.
745 // These values are used to properly adjust popup position.
746 gfx::Point popup_view_origin_for_emulation_;
747 gfx::Point popup_screen_origin_for_emulation_;
748 float popup_origin_scale_for_emulation_;
749
[email protected]586871b2014-07-22 17:05:11750 scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
[email protected]5b45ad42013-10-25 00:42:04751 scoped_ptr<ResizingModeSelector> resizing_mode_selector_;
752
[email protected]e3244ed2014-06-20 20:04:27753 // Lists of RenderFrameProxy objects that need to be notified of
754 // compositing-related events (e.g. DidCommitCompositorFrame).
755 ObserverList<RenderFrameProxy> render_frame_proxies_;
[email protected]a017938b2014-05-27 21:17:17756#if defined(VIDEO_HOLE)
757 ObserverList<RenderFrameImpl> video_hole_frames_;
758#endif // defined(VIDEO_HOLE)
[email protected]bffc8302014-01-23 20:52:16759
[email protected]de3c5d82014-05-28 22:12:59760 // A list of RenderFrames associated with this RenderWidget. Notifications
761 // are sent to each frame in the list for events such as changing
762 // visibility state for example.
763 ObserverList<RenderFrameImpl> render_frames_;
764
[email protected]a09d53ce2014-01-31 00:46:42765 ui::MenuSourceType context_menu_source_type_;
[email protected]be1af0662014-07-29 19:55:51766 bool has_host_context_menu_location_;
767 gfx::Point host_context_menu_location_;
[email protected]a09d53ce2014-01-31 00:46:42768
[email protected]05d478752009-04-08 23:38:16769 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
initial.commit09911bf2008-07-26 23:55:29770};
771
[email protected]e9ff79c2012-10-19 21:31:26772} // namespace content
773
[email protected]2cff0052011-03-18 16:51:44774#endif // CONTENT_RENDERER_RENDER_WIDGET_H_