blob: 833cfb2889d7f2dc204051c3703e1da29dbd4bea [file] [log] [blame]
[email protected]227692c52013-05-31 22:43:041// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6#define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7
avi1023d012015-12-25 02:39:148#include <stddef.h>
9#include <stdint.h>
10
guidou3906a722015-11-12 22:14:4211#include <string>
[email protected]7a4e2532013-12-02 21:30:0212#include <vector>
13
[email protected]7a4e2532013-12-02 21:30:0214#include "base/files/file_path.h"
[email protected]a09d53ce2014-01-31 00:46:4215#include "base/gtest_prod_util.h"
16#include "base/id_map.h"
avi1023d012015-12-25 02:39:1417#include "base/macros.h"
hubbe5f0ad43b2015-12-14 20:57:2618#include "base/memory/linked_ptr.h"
xhwang430baee2015-01-22 05:46:2019#include "base/memory/scoped_ptr.h"
[email protected]abc501e2014-01-27 19:27:2620#include "base/memory/weak_ptr.h"
[email protected]2e2d9632013-12-03 00:55:2621#include "base/observer_list.h"
[email protected]7a4e2532013-12-02 21:30:0222#include "base/process/process_handle.h"
avi1023d012015-12-25 02:39:1423#include "build/build_config.h"
[email protected]95640212014-07-26 18:14:3024#include "content/common/accessibility_mode_enums.h"
clamyda97e8322014-10-07 21:57:2525#include "content/common/frame_message_enums.h"
rockotf8fdd9b2015-12-16 22:22:3526#include "content/common/mojo/service_registry_impl.h"
peter4eb242002015-06-02 12:45:1327#include "content/public/common/console_message_level.h"
[email protected]87de04b02014-04-08 22:14:4928#include "content/public/common/javascript_message_type.h"
[email protected]65920f332014-03-04 21:14:1829#include "content/public/common/referrer.h"
[email protected]227692c52013-05-31 22:43:0430#include "content/public/renderer/render_frame.h"
[email protected]5a7100d2014-05-19 01:29:0431#include "content/renderer/render_frame_proxy.h"
[email protected]f3add922013-12-20 23:17:1632#include "content/renderer/renderer_webcookiejar_impl.h"
[email protected]227692c52013-05-31 22:43:0433#include "ipc/ipc_message.h"
lukasza70b79c82015-12-14 20:24:1334#include "ipc/ipc_platform_file.h"
acolwell9e0840d2014-09-06 19:01:3235#include "media/blink/webmediaplayer_delegate.h"
dalecurtis49f363882015-08-25 21:05:3836#include "media/blink/webmediaplayer_params.h"
rockotd9260982015-08-21 22:26:3037#include "mojo/application/public/interfaces/service_provider.mojom.h"
38#include "mojo/application/public/interfaces/shell.mojom.h"
alexmos401f0aba2015-12-06 10:07:3939#include "third_party/WebKit/public/platform/WebFocusType.h"
benwells04ab5b962015-05-06 08:29:4040#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClient.h"
[email protected]95640212014-07-26 18:14:3041#include "third_party/WebKit/public/web/WebAXObject.h"
[email protected]85d85fd2013-06-19 00:57:4142#include "third_party/WebKit/public/web/WebDataSource.h"
43#include "third_party/WebKit/public/web/WebFrameClient.h"
boliu15890e42015-11-24 23:08:0544#include "third_party/WebKit/public/web/WebFrameLoadType.h"
lazyboy70605c32015-11-03 01:27:3145#include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
lukasza902fcc52015-12-31 04:45:2946#include "third_party/WebKit/public/web/WebFrameSerializerClient.h"
[email protected]680575542014-04-03 17:12:5247#include "third_party/WebKit/public/web/WebHistoryCommitType.h"
skyostilc3ed5652015-10-19 16:28:4648#include "third_party/WebKit/public/web/WebMeaningfulLayout.h"
twellington376424ad2015-05-04 18:57:2549#include "third_party/WebKit/public/web/WebScriptExecutionCallback.h"
[email protected]4ee64622014-03-21 22:34:1550#include "ui/gfx/range/range.h"
lukaszaede9cc02015-12-30 23:48:3251#include "url/gurl.h"
[email protected]227692c52013-05-31 22:43:0452
tommyclid481c482014-12-03 01:50:4153#if defined(ENABLE_PLUGINS)
tommycli59bd86c2014-12-10 02:09:3854#include "content/renderer/pepper/plugin_power_saver_helper.h"
tommyclid481c482014-12-03 01:50:4155#endif
56
[email protected]a017938b2014-05-27 21:17:1757#if defined(OS_ANDROID)
58#include "content/renderer/media/android/renderer_media_player_manager.h"
59#endif
60
xhwangc0299ae32015-07-21 23:39:5061#if defined(ENABLE_MOJO_MEDIA)
62#include "media/mojo/interfaces/service_factory.mojom.h"
63#endif
64
[email protected]7a4e2532013-12-02 21:30:0265class TransportDIB;
kenrba7199832015-01-22 23:44:5966struct FrameMsg_NewFrame_WidgetParams;
alexmose7da5a12015-04-09 02:22:1667struct FrameMsg_PostMessage_Params;
lukaszaede9cc02015-12-30 23:48:3268struct FrameMsg_SerializeAsMHTML_Params;
dspelle736c9db2015-04-03 04:53:1669struct FrameMsg_TextTrackSettings_Params;
[email protected]7a4e2532013-12-02 21:30:0270
71namespace blink {
[email protected]5ee7f182014-04-25 19:45:2672class WebGeolocationClient;
[email protected]7a4e2532013-12-02 21:30:0273class WebMouseEvent;
[email protected]82ce5b92014-03-22 05:15:2674class WebContentDecryptionModule;
[email protected]96307312014-05-04 01:00:1975class WebMediaPlayer;
avayvodbca35fad2015-01-29 20:20:5776class WebPresentationClient;
[email protected]45920862014-07-02 12:53:0277class WebPushClient;
[email protected]82ce5b92014-03-22 05:15:2678class WebSecurityOrigin;
alogvinovf50445a2015-10-30 13:00:1279class WebWakeLockClient;
[email protected]7a4e2532013-12-02 21:30:0280struct WebCompositionUnderline;
[email protected]a09d53ce2014-01-31 00:46:4281struct WebContextMenuData;
[email protected]7a4e2532013-12-02 21:30:0282struct WebCursorInfo;
dcheng3ce04b62015-10-26 23:30:5583struct WebScreenInfo;
[email protected]7a4e2532013-12-02 21:30:0284}
85
86namespace gfx {
[email protected]a09d53ce2014-01-31 00:46:4287class Point;
[email protected]7a4e2532013-12-02 21:30:0288class Range;
89class Rect;
90}
91
jrummell109c3a602014-12-18 01:08:5092namespace media {
xhwangd7180832015-04-03 05:38:1593class CdmFactory;
xhwang60b430a2015-02-01 05:20:4694class MediaPermission;
hubbe5f0ad43b2015-12-14 20:57:2695class MediaServiceProvider;
dalecurtisa12e6062015-11-10 23:13:1496class RendererWebMediaPlayerDelegate;
hubbe5f0ad43b2015-12-14 20:57:2697class UrlIndex;
jrummell109c3a602014-12-18 01:08:5098class WebEncryptedMediaClientImpl;
99}
100
xhwang33f939e2015-06-23 04:33:42101namespace mojo {
102class ServiceProvider;
103}
104
tommycli58e3172c2015-09-15 18:18:26105namespace url {
106class Origin;
107}
108
[email protected]227692c52013-05-31 22:43:04109namespace content {
110
[email protected]bffc8302014-01-23 20:52:16111class ChildFrameCompositingHelper;
kenrba7199832015-01-22 23:44:59112class CompositorDependencies;
dgozman358ba322015-03-26 15:05:30113class DevToolsAgent;
avi0392dbf52015-03-25 16:55:45114class DocumentState;
avi485e5fd62014-08-25 23:26:14115class ExternalPopupMenu;
[email protected]8eae0802014-06-02 21:35:55116class GeolocationDispatcher;
mlamouriefdca9d2014-09-16 16:55:40117class ManifestManager;
[email protected]977db4a42014-07-17 08:04:32118class MediaStreamDispatcher;
[email protected]ae2477e2014-05-27 23:47:08119class MediaStreamRendererFactory;
guoweisf4282b02015-09-24 23:05:22120class MediaPermissionDispatcherImpl;
[email protected]52d3e172014-06-16 16:57:02121class MidiDispatcher;
avi0392dbf52015-03-25 16:55:45122class NavigationState;
[email protected]4459599e2014-07-29 22:40:09123class NotificationPermissionDispatcher;
clamyda97e8322014-10-07 21:57:25124class PageState;
[email protected]7a4e2532013-12-02 21:30:02125class PepperPluginInstanceImpl;
mlamouric6d31db2015-03-28 17:48:14126class PermissionDispatcher;
avayvodbca35fad2015-01-29 20:20:57127class PresentationDispatcher;
[email protected]45920862014-07-02 12:53:02128class PushMessagingDispatcher;
[email protected]95640212014-07-26 18:14:30129class RendererAccessibility;
[email protected]4b556cf2014-06-10 23:21:53130class RendererCdmManager;
131class RendererMediaPlayerManager;
davve859f4f92015-11-27 10:16:19132class RendererMediaSessionManager;
[email protected]7a4e2532013-12-02 21:30:02133class RendererPpapiHost;
[email protected]2e2d9632013-12-03 00:55:26134class RenderFrameObserver;
[email protected]227692c52013-05-31 22:43:04135class RenderViewImpl;
[email protected]7a4e2532013-12-02 21:30:02136class RenderWidget;
137class RenderWidgetFullscreenPepper;
[email protected]cf78eda2014-06-13 16:57:41138class ScreenOrientationDispatcher;
perkj1a2d0432014-09-03 13:52:33139class UserMediaClientImpl;
alogvinovf50445a2015-10-30 13:00:12140class WakeLockDispatcher;
clamy9bfeef42014-09-30 20:50:42141struct CommonNavigationParams;
[email protected]a09d53ce2014-01-31 00:46:42142struct CustomContextMenuContext;
alexmosbc7eafa2014-12-06 01:38:09143struct FrameReplicationState;
avi0392dbf52015-03-25 16:55:45144struct NavigationParams;
clamy79b3da62014-10-14 08:50:37145struct RequestNavigationParams;
davidbena5496d62014-10-07 18:52:04146struct ResourceResponseHead;
clamy34e12782015-03-12 11:26:13147struct StartNavigationParams;
clamyd6983032015-04-29 14:48:12148struct StreamOverrideParameters;
bajones02443532015-06-22 21:17:40149class VRDispatcher;
[email protected]227692c52013-05-31 22:43:04150
[email protected]85d85fd2013-06-19 00:57:41151class CONTENT_EXPORT RenderFrameImpl
152 : public RenderFrame,
[email protected]96307312014-05-04 01:00:19153 NON_EXPORTED_BASE(public blink::WebFrameClient),
lukasza902fcc52015-12-31 04:45:29154 NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) {
[email protected]227692c52013-05-31 22:43:04155 public:
dchengc5ef1a52015-08-26 20:58:30156 // Creates a new RenderFrame as the main frame of |render_view|.
dcheng3ce04b62015-10-26 23:30:55157 static RenderFrameImpl* CreateMainFrame(
158 RenderViewImpl* render_view,
159 int32_t routing_id,
160 int32_t widget_routing_id,
161 bool hidden,
162 const blink::WebScreenInfo& screen_info,
163 CompositorDependencies* compositor_deps);
[email protected]2f61bdd2013-07-02 18:38:47164
alexmosa181efc2015-09-03 00:39:04165 // Creates a new RenderFrame with |routing_id|. If |proxy_routing_id| is
166 // MSG_ROUTING_NONE, it creates the Blink WebLocalFrame and inserts it into
167 // the frame tree after the frame identified by
168 // |previous_sibling_routing_id|, or as the first child if
alexmos9f8705a2015-05-06 19:58:59169 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is
170 // semi-orphaned until it commits, at which point it replaces the proxy
alexmosa181efc2015-09-03 00:39:04171 // identified by |proxy_routing_id|. The frame's opener is set to the frame
172 // identified by |opener_routing_id|. The frame is created as a child of the
173 // RenderFrame identified by |parent_routing_id| or as the top-level frame if
174 // the latter is MSG_ROUTING_NONE. Note: This is called only when
alexmos9f8705a2015-05-06 19:58:59175 // RenderFrame is being created in response to IPC message from the browser
176 // process. All other frame creation is driven through Blink and Create.
lazyboy70605c32015-11-03 01:27:31177 static void CreateFrame(
178 int routing_id,
179 int proxy_routing_id,
180 int opener_routing_id,
181 int parent_routing_id,
182 int previous_sibling_routing_id,
183 const FrameReplicationState& replicated_state,
184 CompositorDependencies* compositor_deps,
185 const FrameMsg_NewFrame_WidgetParams& params,
186 const blink::WebFrameOwnerProperties& frameOwner_properties);
[email protected]82307f6b2014-08-07 03:30:12187
[email protected]5a7100d2014-05-19 01:29:04188 // Returns the RenderFrameImpl for the given routing ID.
189 static RenderFrameImpl* FromRoutingID(int routing_id);
190
[email protected]a5ac6dc2014-01-15 07:02:14191 // Just like RenderFrame::FromWebFrame but returns the implementation.
192 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
[email protected]b70da4c2014-01-06 19:57:09193
[email protected]2f61bdd2013-07-02 18:38:47194 // Used by content_layouttest_support to hook into the creation of
195 // RenderFrameImpls.
jochen664198b2015-06-25 14:13:00196 struct CreateParams {
avi1023d012015-12-25 02:39:14197 CreateParams(RenderViewImpl* render_view, int32_t routing_id)
jochen664198b2015-06-25 14:13:00198 : render_view(render_view), routing_id(routing_id) {}
199 ~CreateParams() {}
200
201 RenderViewImpl* render_view;
avi1023d012015-12-25 02:39:14202 int32_t routing_id;
jochen664198b2015-06-25 14:13:00203 };
204
205 using CreateRenderFrameImplFunction =
206 RenderFrameImpl* (*)(const CreateParams&);
[email protected]2f61bdd2013-07-02 18:38:47207 static void InstallCreateHook(
dongseong.hwangb721ddf2014-12-10 21:22:50208 CreateRenderFrameImplFunction create_render_frame_impl);
[email protected]2f61bdd2013-07-02 18:38:47209
alexmos95733002015-08-24 16:38:09210 // Looks up and returns the WebFrame corresponding to a given opener frame
211 // routing ID. Also stores the opener's RenderView routing ID into
212 // |opener_view_routing_id|.
213 //
214 // TODO(alexmos): remove RenderViewImpl's dependency on
215 // opener_view_routing_id.
216 static blink::WebFrame* ResolveOpener(int opener_frame_routing_id,
217 int* opener_view_routing_id);
218
avi5c77d212015-09-25 20:08:25219 ~RenderFrameImpl() override;
[email protected]227692c52013-05-31 22:43:04220
[email protected]b70da4c2014-01-06 19:57:09221 bool is_swapped_out() const {
222 return is_swapped_out_;
223 }
224
[email protected]5a7100d2014-05-19 01:29:04225 // TODO(nasko): This can be removed once we don't have a swapped out state on
226 // RenderFrames. See https://crbug.com/357747.
227 void set_render_frame_proxy(RenderFrameProxy* proxy) {
228 render_frame_proxy_ = proxy;
229 }
230
dglazkovf0e1d6d2015-10-10 02:13:48231 // Called by RenderWidget when meaningful layout has happened.
232 // See RenderFrameObserver::DidMeaningfulLayout declaration for details.
233 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type);
234
[email protected]bffc8302014-01-23 20:52:16235 // Out-of-process child frames receive a signal from RenderWidgetCompositor
236 // when a compositor frame has committed.
237 void DidCommitCompositorFrame();
238
[email protected]7a4e2532013-12-02 21:30:02239 // TODO(jam): this is a temporary getter until all the code is transitioned
240 // to using RenderFrame instead of RenderView.
[email protected]abc501e2014-01-27 19:27:26241 RenderViewImpl* render_view() { return render_view_.get(); }
[email protected]7a4e2532013-12-02 21:30:02242
[email protected]f3add922013-12-20 23:17:16243 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; }
244
[email protected]7a4e2532013-12-02 21:30:02245 // Returns the RenderWidget associated with this frame.
246 RenderWidget* GetRenderWidget();
247
dgozmancf9039cd2015-04-06 12:01:31248 DevToolsAgent* devtools_agent() { return devtools_agent_; }
249
[email protected]35b2a972014-04-04 15:50:22250 // This is called right after creation with the WebLocalFrame for this
[email protected]0287e762014-04-11 13:07:58251 // RenderFrame. It must be called before Initialize.
[email protected]35b2a972014-04-04 15:50:22252 void SetWebFrame(blink::WebLocalFrame* web_frame);
[email protected]b70da4c2014-01-06 19:57:09253
[email protected]0287e762014-04-11 13:07:58254 // This method must be called after the frame has been added to the frame
255 // tree. It creates all objects that depend on the frame being at its proper
256 // spot.
257 void Initialize();
258
[email protected]de3c5d82014-05-28 22:12:59259 // Notifications from RenderWidget.
260 void WasHidden();
261 void WasShown();
dgozmancf9039cd2015-04-06 12:01:31262 void WidgetWillClose();
[email protected]de3c5d82014-05-28 22:12:59263
[email protected]723971b2014-02-12 11:08:25264 // Start/Stop loading notifications.
265 // TODO(nasko): Those are page-level methods at this time and come from
266 // WebViewClient. We should move them to be WebFrameClient calls and put
267 // logic in the browser side to balance starts/stops.
[email protected]e3b10d12014-03-28 16:06:09268 // |to_different_document| will be true unless the load is a fragment
269 // navigation, or triggered by history.pushState/replaceState.
avi5c77d212015-09-25 20:08:25270 void didStartLoading(bool to_different_document) override;
271 void didStopLoading() override;
272 void didChangeLoadProgress(double load_progress) override;
[email protected]723971b2014-02-12 11:08:25273
[email protected]95640212014-07-26 18:14:30274 AccessibilityMode accessibility_mode() {
275 return accessibility_mode_;
276 }
277
278 RendererAccessibility* renderer_accessibility() {
279 return renderer_accessibility_;
280 }
281
282 void HandleWebAccessibilityEvent(const blink::WebAXObject& obj,
283 blink::WebAXEvent event);
284
estade31c54342015-01-23 03:34:36285 // The focused node changed to |node|. If focus was lost from this frame,
286 // |node| will be null.
[email protected]95640212014-07-26 18:14:30287 void FocusedNodeChanged(const blink::WebNode& node);
288
estade31c54342015-01-23 03:34:36289 // TODO(dmazzoni): the only reason this is here is to plumb it through to
290 // RendererAccessibility. It should use the RenderFrameObserver method, once
291 // blink has a separate accessibility tree per frame.
292 void FocusedNodeChangedForAccessibility(const blink::WebNode& node);
293
[email protected]7a4e2532013-12-02 21:30:02294#if defined(ENABLE_PLUGINS)
[email protected]271ff5792013-12-04 22:29:31295 // Notification that a PPAPI plugin has been created.
296 void PepperPluginCreated(RendererPpapiHost* host);
297
[email protected]7a4e2532013-12-02 21:30:02298 // Notifies that |instance| has changed the cursor.
299 // This will update the cursor appearance if it is currently over the plugin
300 // instance.
301 void PepperDidChangeCursor(PepperPluginInstanceImpl* instance,
302 const blink::WebCursorInfo& cursor);
303
304 // Notifies that |instance| has received a mouse event.
305 void PepperDidReceiveMouseEvent(PepperPluginInstanceImpl* instance);
306
[email protected]7a4e2532013-12-02 21:30:02307 // Informs the render view that a PPAPI plugin has changed text input status.
308 void PepperTextInputTypeChanged(PepperPluginInstanceImpl* instance);
309 void PepperCaretPositionChanged(PepperPluginInstanceImpl* instance);
310
311 // Cancels current composition.
312 void PepperCancelComposition(PepperPluginInstanceImpl* instance);
313
314 // Informs the render view that a PPAPI plugin has changed selection.
315 void PepperSelectionChanged(PepperPluginInstanceImpl* instance);
316
317 // Creates a fullscreen container for a pepper plugin instance.
318 RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer(
319 PepperPluginInstanceImpl* plugin);
320
[email protected]7a4e2532013-12-02 21:30:02321 bool IsPepperAcceptingCompositionEvents() const;
322
323 // Notification that the given plugin has crashed.
324 void PluginCrashed(const base::FilePath& plugin_path,
325 base::ProcessId plugin_pid);
326
[email protected]7a4e2532013-12-02 21:30:02327 // Simulates IME events for testing purpose.
328 void SimulateImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26329 const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02330 const std::vector<blink::WebCompositionUnderline>& underlines,
331 int selection_start,
332 int selection_end);
[email protected]fcf75d42013-12-03 20:11:26333 void SimulateImeConfirmComposition(const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02334 const gfx::Range& replacement_range);
335
336 // TODO(jam): remove these once the IPC handler moves from RenderView to
337 // RenderFrame.
338 void OnImeSetComposition(
tommyclie6633ca72014-10-31 00:40:42339 const base::string16& text,
340 const std::vector<blink::WebCompositionUnderline>& underlines,
341 int selection_start,
342 int selection_end);
343 void OnImeConfirmComposition(const base::string16& text,
344 const gfx::Range& replacement_range,
345 bool keep_selection);
346#endif // defined(ENABLE_PLUGINS)
[email protected]7a4e2532013-12-02 21:30:02347
[email protected]977db4a42014-07-17 08:04:32348 // May return NULL in some cases, especially if userMediaClient() returns
349 // NULL.
350 MediaStreamDispatcher* GetMediaStreamDispatcher();
351
avi485e5fd62014-08-25 23:26:14352#if defined(OS_MACOSX) || defined(OS_ANDROID)
353 void DidHideExternalPopupMenu();
354#endif
355
[email protected]227692c52013-05-31 22:43:04356 // IPC::Sender
dcheng6d18e402014-10-21 12:32:52357 bool Send(IPC::Message* msg) override;
[email protected]227692c52013-05-31 22:43:04358
359 // IPC::Listener
dcheng6d18e402014-10-21 12:32:52360 bool OnMessageReceived(const IPC::Message& msg) override;
[email protected]227692c52013-05-31 22:43:04361
[email protected]271ff5792013-12-04 22:29:31362 // RenderFrame implementation:
dcheng6d18e402014-10-21 12:32:52363 RenderView* GetRenderView() override;
364 int GetRoutingID() override;
365 blink::WebLocalFrame* GetWebFrame() override;
estade78d655f82015-01-30 01:55:08366 blink::WebElement GetFocusedElement() const override;
dcheng6d18e402014-10-21 12:32:52367 WebPreferences& GetWebkitPreferences() override;
368 int ShowContextMenu(ContextMenuClient* client,
369 const ContextMenuParams& params) override;
370 void CancelContextMenu(int request_id) override;
371 blink::WebNode GetContextMenuNode() const override;
tommycli59bd86c2014-12-10 02:09:38372 blink::WebPlugin* CreatePlugin(
373 blink::WebFrame* frame,
374 const WebPluginInfo& info,
375 const blink::WebPluginParams& params,
tommyclie8722702015-01-16 11:40:41376 scoped_ptr<PluginInstanceThrottler> throttler) override;
japhetb0bae9d82015-10-19 20:43:40377 void LoadURLExternally(const blink::WebURLRequest& request,
dcheng6d18e402014-10-21 12:32:52378 blink::WebNavigationPolicy policy) override;
379 void ExecuteJavaScript(const base::string16& javascript) override;
dglazkov2e140f52015-09-28 16:10:07380 bool IsMainFrame() override;
dcheng6d18e402014-10-21 12:32:52381 bool IsHidden() override;
382 ServiceRegistry* GetServiceRegistry() override;
tommyclid481c482014-12-03 01:50:41383#if defined(ENABLE_PLUGINS)
tommycli59bd86c2014-12-10 02:09:38384 void RegisterPeripheralPlugin(
tommycli58e3172c2015-09-15 18:18:26385 const url::Origin& content_origin,
tommycli59bd86c2014-12-10 02:09:38386 const base::Closure& unthrottle_callback) override;
tommycli9c7cbd92015-12-18 23:34:34387 RenderFrame::PeripheralContentStatus GetPeripheralContentStatus(
388 const url::Origin& main_frame_origin,
389 const url::Origin& content_origin,
390 const gfx::Size& unobscured_size) const override;
tommyclibae63b92015-10-23 02:56:20391 void WhitelistContentOrigin(const url::Origin& content_origin) override;
tommyclid481c482014-12-03 01:50:41392#endif
dcheng6d18e402014-10-21 12:32:52393 bool IsFTPDirectoryListing() override;
394 void AttachGuest(int element_instance_id) override;
fsamuela95fef42014-12-03 20:16:52395 void DetachGuest(int element_instance_id) override;
dcheng6d18e402014-10-21 12:32:52396 void SetSelectedText(const base::string16& selection_text,
397 size_t offset,
398 const gfx::Range& range) override;
399 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate,
dcarney4410a7c92015-04-20 11:28:19400 v8::Local<v8::Context> context) override;
rdevlin.croninb2cec912015-06-24 20:36:01401 void AddMessageToConsole(ConsoleMessageLevel level,
402 const std::string& message) override;
megjablond5ac7d52015-10-22 23:56:12403 bool IsUsingLoFi() const override;
ellyjonesdb20fae12015-12-04 16:47:55404 bool IsPasting() const override;
[email protected]271ff5792013-12-04 22:29:31405
[email protected]96307312014-05-04 01:00:19406 // blink::WebFrameClient implementation:
avi5c77d212015-09-25 20:08:25407 blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame,
408 const blink::WebPluginParams& params) override;
409 blink::WebMediaPlayer* createMediaPlayer(
srirama.m26f864d02015-07-14 05:21:46410 blink::WebLocalFrame* frame,
411 const blink::WebURL& url,
412 blink::WebMediaPlayerClient* client,
413 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
guidou9c3cc3e2015-10-27 13:38:15414 blink::WebContentDecryptionModule* initial_cdm,
415 const blink::WebString& sink_id) override;
davve50137b62015-10-23 12:15:21416 blink::WebMediaSession* createMediaSession() override;
avi5c77d212015-09-25 20:08:25417 blink::WebApplicationCacheHost* createApplicationCacheHost(
[email protected]35b2a972014-04-04 15:50:22418 blink::WebLocalFrame* frame,
avi5c77d212015-09-25 20:08:25419 blink::WebApplicationCacheHostClient* client) override;
420 blink::WebWorkerContentSettingsClientProxy*
421 createWorkerContentSettingsClientProxy(blink::WebLocalFrame* frame) override;
422 blink::WebExternalPopupMenu* createExternalPopupMenu(
[email protected]b20c3222014-08-22 00:50:22423 const blink::WebPopupMenuInfo& popup_menu_info,
avi5c77d212015-09-25 20:08:25424 blink::WebExternalPopupMenuClient* popup_menu_client) override;
425 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override;
426 blink::WebServiceWorkerProvider* createServiceWorkerProvider(
427 blink::WebLocalFrame* frame) override;
428 void didAccessInitialDocument(blink::WebLocalFrame* frame) override;
429 blink::WebFrame* createChildFrame(
alexmose48b1df932015-01-16 01:34:17430 blink::WebLocalFrame* parent,
dcheng860817a2015-05-22 03:16:56431 blink::WebTreeScopeType scope,
432 const blink::WebString& name,
lazyboy70605c32015-11-03 01:27:31433 blink::WebSandboxFlags sandboxFlags,
434 const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
avi5c77d212015-09-25 20:08:25435 void didChangeOpener(blink::WebFrame* frame) override;
436 void frameDetached(blink::WebFrame* frame, DetachType type) override;
437 void frameFocused() override;
438 void willClose(blink::WebFrame* frame) override;
439 void didChangeName(blink::WebLocalFrame* frame,
440 const blink::WebString& name) override;
estarka886b8d2015-12-18 21:53:08441 void didEnforceStrictMixedContentChecking() override;
avi5c77d212015-09-25 20:08:25442 void didChangeSandboxFlags(blink::WebFrame* child_frame,
443 blink::WebSandboxFlags flags) override;
Avi Drissman09b359e52015-12-07 20:19:21444 void didChangeFrameOwnerProperties(
lazyboy70605c32015-11-03 01:27:31445 blink::WebFrame* child_frame,
446 const blink::WebFrameOwnerProperties& frame_owner_properties) override;
avi5c77d212015-09-25 20:08:25447 void didMatchCSS(
[email protected]35b2a972014-04-04 15:50:22448 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46449 const blink::WebVector<blink::WebString>& newly_matching_selectors,
avi5c77d212015-09-25 20:08:25450 const blink::WebVector<blink::WebString>& stopped_matching_selectors)
451 override;
452 bool shouldReportDetailedMessageForSource(
453 const blink::WebString& source) override;
454 void didAddMessageToConsole(const blink::WebConsoleMessage& message,
455 const blink::WebString& source_name,
456 unsigned source_line,
457 const blink::WebString& stack_trace) override;
japhetb0bae9d82015-10-19 20:43:40458 void loadURLExternally(const blink::WebURLRequest& request,
avi5c77d212015-09-25 20:08:25459 blink::WebNavigationPolicy policy,
japhetb0bae9d82015-10-19 20:43:40460 const blink::WebString& suggested_name,
461 bool should_replace_current_entry) override;
avi5c77d212015-09-25 20:08:25462 blink::WebNavigationPolicy decidePolicyForNavigation(
463 const NavigationPolicyInfo& info) override;
creise18ce072015-12-02 02:00:02464 blink::WebHistoryItem historyItemForNewChildFrame() override;
avi5c77d212015-09-25 20:08:25465 void willSendSubmitEvent(blink::WebLocalFrame* frame,
466 const blink::WebFormElement& form) override;
467 void willSubmitForm(blink::WebLocalFrame* frame,
468 const blink::WebFormElement& form) override;
469 void didCreateDataSource(blink::WebLocalFrame* frame,
470 blink::WebDataSource* datasource) override;
471 void didStartProvisionalLoad(blink::WebLocalFrame* frame,
472 double triggering_event_time) override;
473 void didReceiveServerRedirectForProvisionalLoad(
474 blink::WebLocalFrame* frame) override;
475 void didFailProvisionalLoad(blink::WebLocalFrame* frame,
476 const blink::WebURLError& error,
477 blink::WebHistoryCommitType commit_type) override;
478 void didCommitProvisionalLoad(
[email protected]45d877f2014-04-05 07:36:22479 blink::WebLocalFrame* frame,
[email protected]680575542014-04-03 17:12:52480 const blink::WebHistoryItem& item,
avi5c77d212015-09-25 20:08:25481 blink::WebHistoryCommitType commit_type) override;
482 void didCreateNewDocument(blink::WebLocalFrame* frame) override;
483 void didClearWindowObject(blink::WebLocalFrame* frame) override;
484 void didCreateDocumentElement(blink::WebLocalFrame* frame) override;
485 void didReceiveTitle(blink::WebLocalFrame* frame,
486 const blink::WebString& title,
487 blink::WebTextDirection direction) override;
488 void didChangeIcon(blink::WebLocalFrame* frame,
489 blink::WebIconURL::Type icon_type) override;
490 void didFinishDocumentLoad(blink::WebLocalFrame* frame,
491 bool document_is_empty) override;
492 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override;
493 void didFailLoad(blink::WebLocalFrame* frame,
494 const blink::WebURLError& error,
495 blink::WebHistoryCommitType commit_type) override;
496 void didFinishLoad(blink::WebLocalFrame* frame) override;
497 void didNavigateWithinPage(blink::WebLocalFrame* frame,
498 const blink::WebHistoryItem& item,
499 blink::WebHistoryCommitType commit_type) override;
500 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) override;
501 void didChangeThemeColor() override;
502 void dispatchLoad() override;
503 void requestNotificationPermission(
[email protected]4459599e2014-07-29 22:40:09504 const blink::WebSecurityOrigin& origin,
avi5c77d212015-09-25 20:08:25505 blink::WebNotificationPermissionCallback* callback) override;
506 void didChangeSelection(bool is_empty_selection) override;
507 blink::WebColorChooser* createColorChooser(
[email protected]eb8c216a2014-04-09 19:19:19508 blink::WebColorChooserClient* client,
[email protected]f3c59d62014-04-09 16:33:55509 const blink::WebColor& initial_color,
avi5c77d212015-09-25 20:08:25510 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override;
511 void runModalAlertDialog(const blink::WebString& message) override;
512 bool runModalConfirmDialog(const blink::WebString& message) override;
513 bool runModalPromptDialog(const blink::WebString& message,
514 const blink::WebString& default_value,
515 blink::WebString* actual_value) override;
516 bool runModalBeforeUnloadDialog(bool is_reload,
517 const blink::WebString& message) override;
518 void showContextMenu(const blink::WebContextMenuData& data) override;
519 void clearContextMenu() override;
520 void willSendRequest(blink::WebLocalFrame* frame,
521 unsigned identifier,
522 blink::WebURLRequest& request,
523 const blink::WebURLResponse& redirect_response) override;
524 void didReceiveResponse(blink::WebLocalFrame* frame,
525 unsigned identifier,
526 const blink::WebURLResponse& response) override;
527 void didLoadResourceFromMemoryCache(
[email protected]35b2a972014-04-04 15:50:22528 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46529 const blink::WebURLRequest& request,
avi5c77d212015-09-25 20:08:25530 const blink::WebURLResponse& response) override;
531 void didDisplayInsecureContent() override;
532 void didRunInsecureContent(const blink::WebSecurityOrigin& origin,
533 const blink::WebURL& target) override;
estark910b4572015-12-09 20:55:41534 void didDisplayContentWithCertificateErrors(
535 const blink::WebURL& url,
536 const blink::WebCString& security_info,
537 const blink::WebURL& main_resource_url,
538 const blink::WebCString& main_resource_security_info) override;
539 void didRunContentWithCertificateErrors(
540 const blink::WebURL& url,
541 const blink::WebCString& security_info,
542 const blink::WebURL& main_resource_url,
543 const blink::WebCString& main_resource_security_info) override;
avi5c77d212015-09-25 20:08:25544 void didChangePerformanceTiming() override;
avi5c77d212015-09-25 20:08:25545 void didCreateScriptContext(blink::WebLocalFrame* frame,
546 v8::Local<v8::Context> context,
547 int extension_group,
548 int world_id) override;
549 void willReleaseScriptContext(blink::WebLocalFrame* frame,
550 v8::Local<v8::Context> context,
551 int world_id) override;
552 void didChangeScrollOffset(blink::WebLocalFrame* frame) override;
553 void willInsertBody(blink::WebLocalFrame* frame) override;
554 void reportFindInPageMatchCount(int request_id,
555 int count,
556 bool final_update) override;
557 void reportFindInPageSelection(int request_id,
558 int active_match_ordinal,
559 const blink::WebRect& sel) override;
560 void requestStorageQuota(blink::WebLocalFrame* frame,
561 blink::WebStorageQuotaType type,
562 unsigned long long requested_size,
563 blink::WebStorageQuotaCallbacks callbacks) override;
564 void willOpenWebSocket(blink::WebSocketHandle* handle) override;
alogvinovf50445a2015-10-30 13:00:12565 blink::WebWakeLockClient* wakeLockClient() override;
avi5c77d212015-09-25 20:08:25566 blink::WebGeolocationClient* geolocationClient() override;
567 blink::WebPushClient* pushClient() override;
568 blink::WebPresentationClient* presentationClient() override;
569 void willStartUsingPeerConnectionHandler(
[email protected]35b2a972014-04-04 15:50:22570 blink::WebLocalFrame* frame,
avi5c77d212015-09-25 20:08:25571 blink::WebRTCPeerConnectionHandler* handler) override;
572 blink::WebUserMediaClient* userMediaClient() override;
573 blink::WebEncryptedMediaClient* encryptedMediaClient() override;
574 blink::WebMIDIClient* webMIDIClient() override;
575 bool willCheckAndDispatchMessageEvent(
[email protected]ce5064f2014-05-07 22:49:20576 blink::WebLocalFrame* source_frame,
577 blink::WebFrame* target_frame,
578 blink::WebSecurityOrigin target_origin,
avi5c77d212015-09-25 20:08:25579 blink::WebDOMMessageEvent event) override;
tzik34958ad62015-10-08 14:07:45580 blink::WebString userAgentOverride(blink::WebLocalFrame* frame) override;
avi5c77d212015-09-25 20:08:25581 blink::WebString doNotTrackValue(blink::WebLocalFrame* frame) override;
582 bool allowWebGL(blink::WebLocalFrame* frame, bool default_value) override;
583 void didLoseWebGLContext(blink::WebLocalFrame* frame,
584 int arb_robustness_status_code) override;
585 blink::WebScreenOrientationClient* webScreenOrientationClient() override;
586 bool isControlledByServiceWorker(blink::WebDataSource& data_source) override;
587 int64_t serviceWorkerID(blink::WebDataSource& data_source) override;
588 void postAccessibilityEvent(const blink::WebAXObject& obj,
589 blink::WebAXEvent event) override;
590 void handleAccessibilityFindInPageResult(
591 int identifier,
592 int match_index,
593 const blink::WebAXObject& start_object,
594 int start_offset,
595 const blink::WebAXObject& end_object,
596 int end_offset) override;
597 void didChangeManifest(blink::WebLocalFrame*) override;
598 bool enterFullscreen() override;
599 bool exitFullscreen() override;
600 blink::WebPermissionClient* permissionClient() override;
601 blink::WebAppBannerClient* appBannerClient() override;
602 void registerProtocolHandler(const blink::WebString& scheme,
603 const blink::WebURL& url,
604 const blink::WebString& title) override;
605 void unregisterProtocolHandler(const blink::WebString& scheme,
606 const blink::WebURL& url) override;
607 blink::WebBluetooth* bluetooth() override;
608 blink::WebUSBClient* usbClient() override;
guidou3906a722015-11-12 22:14:42609 void checkIfAudioSinkExistsAndIsAuthorized(
610 const blink::WebString& sink_id,
611 const blink::WebSecurityOrigin& security_origin,
612 blink::WebSetSinkIdCallbacks* web_callbacks) override;
[email protected]85d85fd2013-06-19 00:57:41613
bajones02443532015-06-22 21:17:40614#if defined(ENABLE_WEBVR)
615 blink::WebVRClient* webVRClient() override;
616#endif
617
lukasza902fcc52015-12-31 04:45:29618 // WebFrameSerializerClient implementation:
lukasza2e296c32015-09-28 23:29:48619 void didSerializeDataForFrame(
lukasza2e296c32015-09-28 23:29:48620 const blink::WebCString& data,
lukasza902fcc52015-12-31 04:45:29621 blink::WebFrameSerializerClient::FrameSerializationStatus status)
622 override;
lukasza2e296c32015-09-28 23:29:48623
nasko78f06bc2014-11-18 18:18:57624 // Make this frame show an empty, unscriptable page.
625 // TODO(nasko): Remove this method once swapped out state is no longer used.
626 void NavigateToSwappedOutURL();
627
rockotf8fdd9b2015-12-16 22:22:35628 // Binds this render frame's service registry.
629 void BindServiceRegistry(
630 mojo::InterfaceRequest<mojo::ServiceProvider> services,
631 mojo::ServiceProviderPtr exposed_services);
632
mlamouri4fff1992014-09-30 11:22:46633 ManifestManager* manifest_manager();
634
avi0392dbf52015-03-25 16:55:45635 // TODO(creis): Remove when the only caller, the HistoryController, is no
636 // more.
637 void SetPendingNavigationParams(
638 scoped_ptr<NavigationParams> navigation_params);
639
guoweisf4282b02015-09-24 23:05:22640 // Expose MediaPermission to the non-UI threads. Any calls to this will be
641 // redirected to |media_permission_dispatcher_| on UI thread and have the
642 // callback called on |caller_task_runner|.
643 scoped_ptr<media::MediaPermission> CreateMediaPermissionProxy(
644 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner);
645
creis69b184a472015-11-26 05:29:51646 // Sends the current frame's navigation state to the browser.
647 void SendUpdateState();
648
nasko1fa0fb62015-12-09 01:49:57649 // Creates a MojoBindingsController to allow WebUI documents to communicate
650 // with the browser process.
651 void EnableMojoBindings();
652
[email protected]2f61bdd2013-07-02 18:38:47653 protected:
jochen664198b2015-06-25 14:13:00654 explicit RenderFrameImpl(const CreateParams& params);
[email protected]2f61bdd2013-07-02 18:38:47655
[email protected]227692c52013-05-31 22:43:04656 private:
kenrbf98a4d22015-04-01 21:59:35657 friend class RenderFrameImplTest;
[email protected]2e2d9632013-12-03 00:55:26658 friend class RenderFrameObserver;
[email protected]95640212014-07-26 18:14:30659 friend class RendererAccessibilityTest;
clamy98a9dee02015-06-24 16:09:10660 friend class TestRenderFrame;
avi485e5fd62014-08-25 23:26:14661 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
662 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
663 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
664 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
[email protected]66bbadaf2014-03-28 16:25:54665 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
666 AccessibilityMessagesQueueWhileSwappedOut);
[email protected]2e2d9632013-12-03 00:55:26667
twellington376424ad2015-05-04 18:57:25668 // A wrapper class used as the callback for JavaScript executed
669 // in an isolated world.
670 class JavaScriptIsolatedWorldRequest
671 : public blink::WebScriptExecutionCallback {
672 public:
673 JavaScriptIsolatedWorldRequest(
674 int id,
675 bool notify_result,
676 int routing_id,
677 base::WeakPtr<RenderFrameImpl> render_frame_impl);
678 void completed(
679 const blink::WebVector<v8::Local<v8::Value>>& result) override;
680
681 private:
avi5c77d212015-09-25 20:08:25682 ~JavaScriptIsolatedWorldRequest() override;
twellington376424ad2015-05-04 18:57:25683
684 int id_;
685 bool notify_result_;
686 int routing_id_;
687 base::WeakPtr<RenderFrameImpl> render_frame_impl_;
688
689 DISALLOW_COPY_AND_ASSIGN(JavaScriptIsolatedWorldRequest);
690 };
691
[email protected]37567b432014-02-12 01:12:22692 typedef std::map<GURL, double> HostZoomLevels;
693
dchengc5ef1a52015-08-26 20:58:30694 // Creates a new RenderFrame. |render_view| is the RenderView object that this
695 // frame belongs to.
696 // Callers *must* call |SetWebFrame| immediately after creation.
avi1023d012015-12-25 02:39:14697 static RenderFrameImpl* Create(RenderViewImpl* render_view,
698 int32_t routing_id);
dchengc5ef1a52015-08-26 20:58:30699
[email protected]2e2d9632013-12-03 00:55:26700 // Functions to add and remove observers for this object.
701 void AddObserver(RenderFrameObserver* observer);
702 void RemoveObserver(RenderFrameObserver* observer);
[email protected]1c2052f2013-08-28 08:24:34703
dcheng3d886b732015-11-05 19:16:01704 bool IsLocalRoot() const;
705
[email protected]f0906a02014-08-07 07:18:55706 // Builds and sends DidCommitProvisionalLoad to the host.
avi8c46f7e2015-02-03 18:27:35707 void SendDidCommitProvisionalLoad(blink::WebFrame* frame,
creis8b5cd4c2015-06-19 00:11:08708 blink::WebHistoryCommitType commit_type,
709 const blink::WebHistoryItem& item);
[email protected]37567b432014-02-12 01:12:22710
[email protected]b70da4c2014-01-06 19:57:09711 // IPC message handlers ------------------------------------------------------
712 //
713 // The documentation for these functions should be in
714 // content/common/*_messages.h for the message that the function is handling.
clamy98a9dee02015-06-24 16:09:10715 void OnNavigate(const CommonNavigationParams& common_params,
716 const StartNavigationParams& start_params,
717 const RequestNavigationParams& request_params);
[email protected]f76f32232014-03-11 17:36:17718 void OnBeforeUnload();
alexmosbc7eafa2014-12-06 01:38:09719 void OnSwapOut(int proxy_routing_id,
nasko3e8c20e2014-12-18 06:54:56720 bool is_loading,
alexmosbc7eafa2014-12-06 01:38:09721 const FrameReplicationState& replicated_frame_state);
naskoeab5c5582015-12-15 05:20:00722 void OnDeleteFrame();
Nasko Oskov85f60222014-08-28 22:53:30723 void OnStop();
[email protected]a09d53ce2014-01-31 00:46:42724 void OnShowContextMenu(const gfx::Point& location);
725 void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
726 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
727 unsigned action);
[email protected]4ee64622014-03-21 22:34:15728 void OnUndo();
729 void OnRedo();
[email protected]9c9343b2014-03-08 02:56:07730 void OnCut();
731 void OnCopy();
732 void OnPaste();
[email protected]4ee64622014-03-21 22:34:15733 void OnPasteAndMatchStyle();
734 void OnDelete();
735 void OnSelectAll();
christiankaeed9862014-11-05 10:49:14736 void OnSelectRange(const gfx::Point& base, const gfx::Point& extent);
aurimasab0319022015-07-10 21:57:38737 void OnAdjustSelectionByCharacterOffset(int start_adjust, int end_adjust);
[email protected]4ee64622014-03-21 22:34:15738 void OnUnselect();
christiankaeed9862014-11-05 10:49:14739 void OnMoveRangeSelectionExtent(const gfx::Point& point);
[email protected]1f3fc1d2014-04-03 14:50:17740 void OnReplace(const base::string16& text);
741 void OnReplaceMisspelling(const base::string16& text);
[email protected]e31b8ebb2014-03-07 17:59:34742 void OnCSSInsertRequest(const std::string& css);
peter4eb242002015-06-02 12:45:13743 void OnAddMessageToConsole(ConsoleMessageLevel level,
744 const std::string& message);
[email protected]f13ab892014-03-12 06:48:52745 void OnJavaScriptExecuteRequest(const base::string16& javascript,
746 int id,
747 bool notify_result);
zeeshanq3454e9c2014-09-04 21:30:28748 void OnJavaScriptExecuteRequestForTests(const base::string16& javascript,
749 int id,
jochen2e7d95b2015-05-04 15:28:50750 bool notify_result,
751 bool has_user_gesture);
twellington376424ad2015-05-04 18:57:25752 void OnJavaScriptExecuteRequestInIsolatedWorld(const base::string16& jscript,
753 int id,
754 bool notify_result,
755 int world_id);
avi1023d012015-12-25 02:39:14756 void OnVisualStateRequest(uint64_t key);
[email protected]4ee64622014-03-21 22:34:15757 void OnSetEditableSelectionOffsets(int start, int end);
[email protected]e5e438d62014-03-27 21:47:16758 void OnSetCompositionFromExistingText(
759 int start, int end,
760 const std::vector<blink::WebCompositionUnderline>& underlines);
sammcbc9e99332014-12-18 00:55:24761 void OnExecuteNoValueEditCommand(const std::string& name);
[email protected]e5e438d62014-03-27 21:47:16762 void OnExtendSelectionAndDelete(int before, int after);
[email protected]4fed3702014-04-01 09:08:00763 void OnReload(bool ignore_cache);
[email protected]96bb6132014-06-16 17:22:19764 void OnTextSurroundingSelectionRequest(size_t max_length);
[email protected]95640212014-07-26 18:14:30765 void OnSetAccessibilityMode(AccessibilityMode new_mode);
dmazzoni83ba5c82015-04-14 07:11:51766 void OnSnapshotAccessibilityTree(int callback_id);
alexmos95733002015-08-24 16:38:09767 void OnUpdateOpener(int opener_routing_id);
dcheng5f60abb2015-05-28 01:39:36768 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags);
lazyboy70605c32015-11-03 01:27:31769 void OnSetFrameOwnerProperties(
770 const blink::WebFrameOwnerProperties& frame_owner_properties);
alexmos401f0aba2015-12-06 10:07:39771 void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id);
alexmos5357efb2015-12-16 21:44:00772 void OnSetFocusedFrame();
dspelle736c9db2015-04-03 04:53:16773 void OnTextTrackSettingsChanged(
774 const FrameMsg_TextTrackSettings_Params& params);
alexmose7da5a12015-04-09 02:22:16775 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params);
avi485e5fd62014-08-25 23:26:14776#if defined(OS_ANDROID)
777 void OnSelectPopupMenuItems(bool canceled,
778 const std::vector<int>& selected_indices);
779#elif defined(OS_MACOSX)
780 void OnSelectPopupMenuItem(int selected_index);
[email protected]4ee64622014-03-21 22:34:15781 void OnCopyToFindPboard();
782#endif
[email protected]9c9343b2014-03-08 02:56:07783
davidbena5496d62014-10-07 18:52:04784 void OnCommitNavigation(const ResourceResponseHead& response,
785 const GURL& stream_url,
clamy9bfeef42014-09-30 20:50:42786 const CommonNavigationParams& common_params,
clamy57b4b8e2015-03-24 13:32:11787 const RequestNavigationParams& request_params);
clamy62b271d2015-04-16 11:54:57788 void OnFailedNavigation(const CommonNavigationParams& common_params,
789 const RequestNavigationParams& request_params,
790 bool has_stale_copy_in_cache,
791 int error_code);
lukasza6af746b72015-09-18 23:37:22792 void OnGetSavableResourceLinks();
lukasza2e296c32015-09-28 23:29:48793 void OnGetSerializedHtmlWithLocalLinks(
lukasza4a96a1f02015-12-09 16:46:34794 const std::map<GURL, base::FilePath>& url_to_local_path);
lukaszaede9cc02015-12-30 23:48:32795 void OnSerializeAsMHTML(const FrameMsg_SerializeAsMHTML_Params& params);
clamy9bfeef42014-09-30 20:50:42796
creise18ce072015-12-02 02:00:02797 // Requests that the browser process navigates to |url|. If
798 // |is_history_navigation_in_new_child| is true, the browser process should
799 // look for a matching FrameNavigationEntry in the last committed entry to use
800 // instead of |url|.
japhetb0bae9d82015-10-19 20:43:40801 void OpenURL(const GURL& url,
[email protected]65920f332014-03-04 21:14:18802 const Referrer& referrer,
japhetb0bae9d82015-10-19 20:43:40803 blink::WebNavigationPolicy policy,
creise18ce072015-12-02 02:00:02804 bool should_replace_current_entry,
805 bool is_history_navigation_in_new_child);
[email protected]a09d53ce2014-01-31 00:46:42806
clamyd6983032015-04-29 14:48:12807 // Performs a navigation in the frame. This provides a unified function for
808 // the current code path and the browser-side navigation path (in
809 // development). Currently used by OnNavigate, with all *NavigationParams
810 // provided by the browser. |stream_params| should be null.
811 // PlzNavigate: used by OnCommitNavigation, with |common_params| and
812 // |request_params| received by the browser. |stream_params| should be non
813 // null and created from the information provided by the browser.
814 // |start_params| is not used.
815 void NavigateInternal(const CommonNavigationParams& common_params,
816 const StartNavigationParams& start_params,
817 const RequestNavigationParams& request_params,
818 scoped_ptr<StreamOverrideParameters> stream_params);
819
[email protected]ef3adfc2014-05-11 00:04:54820 // Update current main frame's encoding and send it to browser window.
821 // Since we want to let users see the right encoding info from menu
822 // before finishing loading, we call the UpdateEncoding in
823 // a) function:DidCommitLoadForFrame. When this function is called,
824 // that means we have got first data. In here we try to get encoding
825 // of page if it has been specified in http header.
826 // b) function:DidReceiveTitle. When this function is called,
827 // that means we have got specified title. Because in most of webpages,
828 // title tags will follow meta tags. In here we try to get encoding of
829 // page if it has been specified in meta tag.
830 // c) function:DidFinishDocumentLoadForFrame. When this function is
831 // called, that means we have got whole html page. In here we should
832 // finally get right encoding of page.
833 void UpdateEncoding(blink::WebFrame* frame,
834 const std::string& encoding_name);
835
[email protected]4ee64622014-03-21 22:34:15836 // Dispatches the current state of selection on the webpage to the browser if
837 // it has changed.
838 // TODO(varunjain): delete this method once we figure out how to keep
839 // selection handles in sync with the webpage.
840 void SyncSelectionIfRequired();
841
[email protected]87de04b02014-04-08 22:14:49842 bool RunJavaScriptMessage(JavaScriptMessageType type,
843 const base::string16& message,
844 const base::string16& default_value,
845 const GURL& frame_url,
846 base::string16* result);
847
[email protected]457736d2014-04-30 15:54:27848 // Loads the appropriate error page for the specified failure into the frame.
849 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request,
850 const blink::WebURLError& error,
851 bool replace);
852
zeeshanq3454e9c2014-09-04 21:30:28853 void HandleJavascriptExecutionResult(const base::string16& javascript,
854 int id,
855 bool notify_result,
deepak.s750d68f2015-04-30 07:32:41856 v8::Local<v8::Value> result);
zeeshanq3454e9c2014-09-04 21:30:28857
[email protected]977db4a42014-07-17 08:04:32858 // Initializes |web_user_media_client_|. If this fails, because it wasn't
859 // possible to create a MediaStreamClient (e.g., WebRTC is disabled), then
860 // |web_user_media_client_| will remain NULL.
861 void InitializeUserMediaClient();
[email protected]96307312014-05-04 01:00:19862
863 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream(
guidou9c3cc3e2015-10-27 13:38:15864 blink::WebMediaPlayerClient* client,
865 const blink::WebString& sink_id,
866 const blink::WebSecurityOrigin& security_origin);
[email protected]96307312014-05-04 01:00:19867
[email protected]ae2477e2014-05-27 23:47:08868 // Creates a factory object used for creating audio and video renderers.
jochen51265132015-05-28 07:33:45869 scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory();
[email protected]ae2477e2014-05-27 23:47:08870
avi5cad4912015-06-19 05:25:44871 // Does preparation for the navigation to |url|.
872 void PrepareRenderViewForNavigation(
clamyda97e8322014-10-07 21:57:25873 const GURL& url,
clamy57b4b8e2015-03-24 13:32:11874 const RequestNavigationParams& request_params,
clamyda97e8322014-10-07 21:57:25875 bool* is_reload,
876 blink::WebURLRequest::CachePolicy* cache_policy);
877
clamyece38882014-11-19 15:00:20878 // PlzNavigate
879 // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents
880 // of the WebURLRequest.
881 void BeginNavigation(blink::WebURLRequest* request);
882
clamy4cc9b8202015-03-02 13:51:36883 // Loads a data url.
884 void LoadDataURL(const CommonNavigationParams& params,
mnaganovbf087422015-12-16 05:10:03885 const RequestNavigationParams& request_params,
boliu15890e42015-11-24 23:08:05886 blink::WebFrame* frame,
887 blink::WebFrameLoadType load_type);
clamy4cc9b8202015-03-02 13:51:36888
clamy62b271d2015-04-16 11:54:57889 // Sends a proper FrameHostMsg_DidFailProvisionalLoadWithError_Params IPC for
890 // the failed request |request|.
891 void SendFailedProvisionalLoad(const blink::WebURLRequest& request,
892 const blink::WebURLError& error,
893 blink::WebLocalFrame* frame);
894
895 bool ShouldDisplayErrorPageForFailedLoad(int error_code,
896 const GURL& unreachable_url);
897
[email protected]f3a95312014-06-12 16:46:58898 // Returns the URL being loaded by the |frame_|'s request.
899 GURL GetLoadingUrl() const;
900
avi0392dbf52015-03-25 16:55:45901 // If we initiated a navigation, this function will populate |document_state|
902 // with the navigation information saved in OnNavigate().
903 void PopulateDocumentStateFromPending(DocumentState* document_state);
904
905 // Returns a new NavigationState populated with the navigation information
906 // saved in OnNavigate().
907 NavigationState* CreateNavigationStateFromPending();
908
csharrison1ce0e852015-11-07 16:45:13909 // Sets the NavigationState on the DocumentState based on
910 // the value of |pending_navigation_params_|.
911 void UpdateNavigationState(DocumentState* document_state);
912
[email protected]96307312014-05-04 01:00:19913#if defined(OS_ANDROID)
[email protected]65f3d1aa2014-05-29 01:57:00914 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
jrummell65b7d272014-09-24 20:49:27915 blink::WebMediaPlayerClient* client,
srirama.m26f864d02015-07-14 05:21:46916 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
dalecurtis49f363882015-08-25 21:05:38917 const media::WebMediaPlayerParams& params);
[email protected]a017938b2014-05-27 21:17:17918
[email protected]65f3d1aa2014-05-29 01:57:00919 RendererMediaPlayerManager* GetMediaPlayerManager();
davve859f4f92015-11-27 10:16:19920
921 RendererMediaSessionManager* GetMediaSessionManager();
[email protected]4b556cf2014-06-10 23:21:53922#endif
923
sandersd02d9aea2015-05-12 02:29:26924 bool AreSecureCodecsSupported();
xhwang33f939e2015-06-23 04:33:42925
xhwangd7180832015-04-03 05:38:15926 media::MediaPermission* GetMediaPermission();
xhwang33f939e2015-06-23 04:33:42927
xhwange70b7ee12015-06-25 09:17:17928#if defined(ENABLE_MOJO_MEDIA)
xhwangc0299ae32015-07-21 23:39:50929 media::interfaces::ServiceFactory* GetMediaServiceFactory();
xhwang33f939e2015-06-23 04:33:42930
xhwangc0299ae32015-07-21 23:39:50931 // Called when a connection error happened on |media_service_factory_|.
932 void OnMediaServiceFactoryConnectionError();
xhwang33f939e2015-06-23 04:33:42933#endif
934
xhwangd7180832015-04-03 05:38:15935 media::CdmFactory* GetCdmFactory();
[email protected]96307312014-05-04 01:00:19936
halton.huoca2eabd2015-07-06 08:17:40937 void RegisterMojoServices();
938
rockotd9260982015-08-21 22:26:30939 // Connects to a Mojo application and returns a proxy to its exposed
940 // ServiceProvider.
941 mojo::ServiceProviderPtr ConnectToApplication(const GURL& url);
942
dalecurtisa12e6062015-11-10 23:13:14943 // Returns the media delegate for WebMediaPlayer usage. If
944 // |media_player_delegate_| is NULL, one is created.
945 media::RendererWebMediaPlayerDelegate* GetWebMediaPlayerDelegate();
946
creiscfaa4462015-03-16 19:27:18947 // Stores the WebLocalFrame we are associated with. This is null from the
948 // constructor until SetWebFrame is called, and it is null after
949 // frameDetached is called until destruction (which is asynchronous in the
950 // case of the main frame, but not subframes).
[email protected]35b2a972014-04-04 15:50:22951 blink::WebLocalFrame* frame_;
[email protected]b70da4c2014-01-06 19:57:09952
dglazkov2e140f52015-09-28 16:10:07953 // Boolean value indicating whether this RenderFrameImpl object is for the
954 // main frame or not. It remains accurate during destruction, even when
955 // |frame_| has been invalidated.
956 bool is_main_frame_;
nasko8b9d9bd2015-05-06 19:23:19957
naskoeab5c5582015-12-15 05:20:00958 // When a frame is detached in response to a message from the browser process,
959 // this RenderFrame should not be sending notifications back to it. This
960 // boolean is used to indicate this case.
961 bool in_browser_initiated_detach_;
962
963 // Indicates whether the frame has been inserted into the frame tree yet or
964 // not.
965 //
966 // When a frame is created by the browser process, it is for a pending
967 // navigation. In this case, it is not immediately attached to the frame tree
968 // if there is a RenderFrameProxy for the same frame. It is inserted into the
969 // frame tree at the time the pending navigation commits.
970 // Frames added by the parent document are created from the renderer process
971 // and are immediately inserted in the frame tree.
972 // TODO(dcheng): Remove this once we have FrameTreeHandle and can use the
973 // Blink Web* layer to check for provisional frames.
974 bool in_frame_tree_;
975
[email protected]abc501e2014-01-27 19:27:26976 base::WeakPtr<RenderViewImpl> render_view_;
[email protected]227692c52013-05-31 22:43:04977 int routing_id_;
[email protected]1c2052f2013-08-28 08:24:34978 bool is_swapped_out_;
nasko8b9d9bd2015-05-06 19:23:19979
[email protected]5a7100d2014-05-19 01:29:04980 // RenderFrameProxy exists only when is_swapped_out_ is true.
981 // TODO(nasko): This can be removed once we don't have a swapped out state on
982 // RenderFrame. See https://crbug.com/357747.
983 RenderFrameProxy* render_frame_proxy_;
[email protected]1c2052f2013-08-28 08:24:34984 bool is_detaching_;
[email protected]227692c52013-05-31 22:43:04985
japhete6adf142014-10-31 00:01:49986 // If this frame was created to replace a proxy, this will store the routing
987 // id of the proxy to replace at commit-time, at which time it will be
988 // cleared.
989 // TODO(creis): Remove this after switching to PlzNavigate.
990 int proxy_routing_id_;
991
dcheng3d886b732015-11-05 19:16:01992 // Non-null when the RenderFrame is a local root for compositing, input,
993 // layout, etc. A local frame is also a local root iff it does not have a
994 // parent that is a local frame.
kenrba7199832015-01-22 23:44:59995 scoped_refptr<RenderWidget> render_widget_;
996
avi0392dbf52015-03-25 16:55:45997 // Temporarily holds state pertaining to a navigation that has been initiated
998 // until the NavigationState corresponding to the new navigation is created in
999 // didCreateDataSource().
1000 scoped_ptr<NavigationParams> pending_navigation_params_;
1001
creis8eb8ef22015-11-04 22:51:381002 // Stores the current history item for this frame, so that updates to it can
1003 // be reported to the browser process via SendUpdateState.
1004 blink::WebHistoryItem current_history_item_;
1005
[email protected]7a4e2532013-12-02 21:30:021006#if defined(ENABLE_PLUGINS)
[email protected]7a4e2532013-12-02 21:30:021007 // Current text input composition text. Empty if no composition is in
1008 // progress.
[email protected]fcf75d42013-12-03 20:11:261009 base::string16 pepper_composition_text_;
tommyclieb25b2a2014-11-03 19:45:091010
tommycli59bd86c2014-12-10 02:09:381011 PluginPowerSaverHelper* plugin_power_saver_helper_;
[email protected]7a4e2532013-12-02 21:30:021012#endif
1013
[email protected]f3add922013-12-20 23:17:161014 RendererWebCookieJarImpl cookie_jar_;
1015
[email protected]2e2d9632013-12-03 00:55:261016 // All the registered observers.
brettw236d3172015-06-03 16:31:431017 base::ObserverList<RenderFrameObserver> observers_;
[email protected]2e2d9632013-12-03 00:55:261018
[email protected]bffc8302014-01-23 20:52:161019 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_;
1020
[email protected]4ecee352014-03-11 21:12:191021 // The node that the context menu was pressed over.
1022 blink::WebNode context_menu_node_;
1023
[email protected]a09d53ce2014-01-31 00:46:421024 // External context menu requests we're waiting for. "Internal"
1025 // (WebKit-originated) context menu events will have an ID of 0 and will not
1026 // be in this map.
1027 //
1028 // We don't want to add internal ones since some of the "special" page
1029 // handlers in the browser process just ignore the context menu requests so
1030 // avoid showing context menus, and so this will cause right clicks to leak
1031 // entries in this map. Most users of the custom context menu (e.g. Pepper
1032 // plugins) are normally only on "regular" pages and the regular pages will
1033 // always respond properly to the request, so we don't have to worry so
1034 // much about leaks.
1035 IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_;
1036
[email protected]4ee64622014-03-21 22:34:151037 // The text selection the last time DidChangeSelection got called. May contain
1038 // additional characters before and after the selected text, for IMEs. The
1039 // portion of this string that is the actual selected text starts at index
1040 // |selection_range_.GetMin() - selection_text_offset_| and has length
1041 // |selection_range_.length()|.
1042 base::string16 selection_text_;
1043 // The offset corresponding to the start of |selection_text_| in the document.
1044 size_t selection_text_offset_;
1045 // Range over the document corresponding to the actual selected text (which
1046 // could correspond to a substring of |selection_text_|; see above).
1047 gfx::Range selection_range_;
1048 // Used to inform didChangeSelection() when it is called in the context
1049 // of handling a InputMsg_SelectRange IPC.
1050 bool handling_select_range_;
1051
[email protected]2626d142014-04-22 17:24:021052 // The next group of objects all implement RenderFrameObserver, so are deleted
1053 // along with the RenderFrame automatically. This is why we just store weak
1054 // references.
1055
[email protected]4459599e2014-07-29 22:40:091056 // Dispatches permission requests for Web Notifications.
1057 NotificationPermissionDispatcher* notification_permission_dispatcher_;
1058
[email protected]977db4a42014-07-17 08:04:321059 // Destroyed via the RenderFrameObserver::OnDestruct() mechanism.
perkj1a2d0432014-09-03 13:52:331060 UserMediaClientImpl* web_user_media_client_;
[email protected]96307312014-05-04 01:00:191061
jrummell109c3a602014-12-18 01:08:501062 // EncryptedMediaClient attached to this frame; lazily initialized.
xhwang430baee2015-01-22 05:46:201063 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_;
jrummell109c3a602014-12-18 01:08:501064
xhwang36b1f3b2015-01-27 17:54:011065 // The media permission dispatcher attached to this frame, lazily initialized.
guoweisf4282b02015-09-24 23:05:221066 MediaPermissionDispatcherImpl* media_permission_dispatcher_;
xhwang36b1f3b2015-01-27 17:54:011067
xhwange70b7ee12015-06-25 09:17:171068#if defined(ENABLE_MOJO_MEDIA)
xhwangc0299ae32015-07-21 23:39:501069 // The media factory attached to this frame, lazily initialized.
1070 media::interfaces::ServiceFactoryPtr media_service_factory_;
xhwang065b54b2015-06-03 22:25:551071#endif
1072
[email protected]52d3e172014-06-16 16:57:021073 // MidiClient attached to this frame; lazily initialized.
1074 MidiDispatcher* midi_dispatcher_;
1075
[email protected]a017938b2014-05-27 21:17:171076#if defined(OS_ANDROID)
davve859f4f92015-11-27 10:16:191077 // Manages all media players and sessions in this render frame for
1078 // communicating with the real media player and sessions in the
1079 // browser process. It's okay to use raw pointers since they're both
1080 // RenderFrameObservers.
[email protected]a017938b2014-05-27 21:17:171081 RendererMediaPlayerManager* media_player_manager_;
davve859f4f92015-11-27 10:16:191082 RendererMediaSessionManager* media_session_manager_;
[email protected]4b556cf2014-06-10 23:21:531083#endif
1084
1085#if defined(ENABLE_BROWSER_CDMS)
1086 // Manage all CDMs in this render frame for communicating with the real CDM in
1087 // the browser process. It's okay to use a raw pointer since it's a
1088 // RenderFrameObserver.
[email protected]65f3d1aa2014-05-29 01:57:001089 RendererCdmManager* cdm_manager_;
[email protected]a017938b2014-05-27 21:17:171090#endif
1091
xhwangd7180832015-04-03 05:38:151092 // The CDM factory attached to this frame, lazily initialized.
xhwangf2eb532f2015-06-25 01:51:191093 scoped_ptr<media::CdmFactory> cdm_factory_;
xhwangd7180832015-04-03 05:38:151094
hubbe5f0ad43b2015-12-14 20:57:261095 // Media resource cache, lazily initialized.
1096 linked_ptr<media::UrlIndex> url_index_;
1097
[email protected]a6e21c372014-07-12 02:27:211098#if defined(VIDEO_HOLE)
1099 // Whether or not this RenderFrameImpl contains a media player. Used to
1100 // register as an observer for video-hole-specific events.
1101 bool contains_media_player_;
1102#endif
1103
dgozman358ba322015-03-26 15:05:301104 // The devtools agent for this frame; only created for main frame and
1105 // local roots.
1106 DevToolsAgent* devtools_agent_;
1107
alogvinovf50445a2015-10-30 13:00:121108 WakeLockDispatcher* wakelock_dispatcher_;
1109
[email protected]45920862014-07-02 12:53:021110 // The geolocation dispatcher attached to this frame, lazily initialized.
[email protected]8eae0802014-06-02 21:35:551111 GeolocationDispatcher* geolocation_dispatcher_;
1112
[email protected]45920862014-07-02 12:53:021113 // The push messaging dispatcher attached to this frame, lazily initialized.
1114 PushMessagingDispatcher* push_messaging_dispatcher_;
1115
avayvodbca35fad2015-01-29 20:20:571116 // The presentation dispatcher implementation attached to this frame, lazily
1117 // initialized.
1118 PresentationDispatcher* presentation_dispatcher_;
1119
rockotf8fdd9b2015-12-16 22:22:351120 ServiceRegistryImpl service_registry_;
[email protected]c52a1412014-06-25 06:09:251121
rockotd9260982015-08-21 22:26:301122 // The shell proxy used to connect to Mojo applications.
1123 mojo::ShellPtr mojo_shell_;
1124
[email protected]45920862014-07-02 12:53:021125 // The screen orientation dispatcher attached to the frame, lazily
1126 // initialized.
[email protected]cf78eda2014-06-13 16:57:411127 ScreenOrientationDispatcher* screen_orientation_dispatcher_;
1128
mlamouriefdca9d2014-09-16 16:55:401129 // The Manifest Manager handles the manifest requests from the browser
1130 // process.
1131 ManifestManager* manifest_manager_;
1132
[email protected]95640212014-07-26 18:14:301133 // The current accessibility mode.
1134 AccessibilityMode accessibility_mode_;
1135
1136 // Only valid if |accessibility_mode_| is anything other than
1137 // AccessibilityModeOff.
1138 RendererAccessibility* renderer_accessibility_;
1139
mlamouric6d31db2015-03-28 17:48:141140 scoped_ptr<PermissionDispatcher> permission_client_;
mlamouri670a86d2015-03-17 16:06:251141
benwells04ab5b962015-05-06 08:29:401142 scoped_ptr<blink::WebAppBannerClient> app_banner_client_;
1143
jyasskinf89a11b2015-07-21 00:27:481144 scoped_ptr<blink::WebBluetooth> bluetooth_;
1145
rockotd9260982015-08-21 22:26:301146 scoped_ptr<blink::WebUSBClient> usb_client_;
1147
dalecurtisa12e6062015-11-10 23:13:141148 // Manages play, pause notifications for WebMediaPlayer implementations; its
1149 // lifetime is tied to the RenderFrame via the RenderFrameObserver interface.
1150 media::RendererWebMediaPlayerDelegate* media_player_delegate_;
1151
megjablond5ac7d52015-10-22 23:56:121152 // Whether or not this RenderFrame is using Lo-Fi mode.
1153 bool is_using_lofi_;
1154
ellyjonesdb20fae12015-12-04 16:47:551155 // Whether or not this RenderFrame is currently pasting.
1156 bool is_pasting_;
1157
bajones02443532015-06-22 21:17:401158#if defined(ENABLE_WEBVR)
1159 // The VR dispatcher attached to the frame, lazily initialized.
1160 scoped_ptr<VRDispatcher> vr_dispatcher_;
1161#endif
1162
avi485e5fd62014-08-25 23:26:141163#if defined(OS_MACOSX) || defined(OS_ANDROID)
1164 // The external popup for the currently showing select popup.
1165 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
1166#endif
1167
[email protected]96307312014-05-04 01:00:191168 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1169
[email protected]227692c52013-05-31 22:43:041170 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1171};
1172
1173} // namespace content
1174
[email protected]85d85fd2013-06-19 00:57:411175#endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_