blob: 6d37cc117d8f3bcb97aa90d8ced96096bbd6f7a4 [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"
paulmeyer5d0a5f02016-01-21 20:15:5230#include "content/public/common/stop_find_action.h"
[email protected]227692c52013-05-31 22:43:0431#include "content/public/renderer/render_frame.h"
[email protected]5a7100d2014-05-19 01:29:0432#include "content/renderer/render_frame_proxy.h"
[email protected]f3add922013-12-20 23:17:1633#include "content/renderer/renderer_webcookiejar_impl.h"
[email protected]227692c52013-05-31 22:43:0434#include "ipc/ipc_message.h"
lukasza70b79c82015-12-14 20:24:1335#include "ipc/ipc_platform_file.h"
acolwell9e0840d2014-09-06 19:01:3236#include "media/blink/webmediaplayer_delegate.h"
dalecurtis49f363882015-08-25 21:05:3837#include "media/blink/webmediaplayer_params.h"
ben95787952016-02-10 07:46:2038#include "mojo/shell/public/interfaces/interface_provider.mojom.h"
ben273c1e32016-01-12 02:44:0839#include "mojo/shell/public/interfaces/shell.mojom.h"
alexmos401f0aba2015-12-06 10:07:3940#include "third_party/WebKit/public/platform/WebFocusType.h"
sandersdf92f4e5c2016-01-22 20:57:2241#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
benwells04ab5b962015-05-06 08:29:4042#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClient.h"
[email protected]95640212014-07-26 18:14:3043#include "third_party/WebKit/public/web/WebAXObject.h"
[email protected]85d85fd2013-06-19 00:57:4144#include "third_party/WebKit/public/web/WebDataSource.h"
45#include "third_party/WebKit/public/web/WebFrameClient.h"
boliu15890e42015-11-24 23:08:0546#include "third_party/WebKit/public/web/WebFrameLoadType.h"
lazyboy70605c32015-11-03 01:27:3147#include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
lukasza902fcc52015-12-31 04:45:2948#include "third_party/WebKit/public/web/WebFrameSerializerClient.h"
[email protected]680575542014-04-03 17:12:5249#include "third_party/WebKit/public/web/WebHistoryCommitType.h"
skyostilc3ed5652015-10-19 16:28:4650#include "third_party/WebKit/public/web/WebMeaningfulLayout.h"
twellington376424ad2015-05-04 18:57:2551#include "third_party/WebKit/public/web/WebScriptExecutionCallback.h"
[email protected]4ee64622014-03-21 22:34:1552#include "ui/gfx/range/range.h"
lukaszaede9cc02015-12-30 23:48:3253#include "url/gurl.h"
[email protected]227692c52013-05-31 22:43:0454
tommyclid481c482014-12-03 01:50:4155#if defined(ENABLE_PLUGINS)
tommycli59bd86c2014-12-10 02:09:3856#include "content/renderer/pepper/plugin_power_saver_helper.h"
tommyclid481c482014-12-03 01:50:4157#endif
58
[email protected]a017938b2014-05-27 21:17:1759#if defined(OS_ANDROID)
60#include "content/renderer/media/android/renderer_media_player_manager.h"
61#endif
62
xhwangc0299ae32015-07-21 23:39:5063#if defined(ENABLE_MOJO_MEDIA)
jbromanb73f2582016-01-11 16:35:0564#include "media/mojo/interfaces/service_factory.mojom.h" // nogncheck
xhwangc0299ae32015-07-21 23:39:5065#endif
66
[email protected]7a4e2532013-12-02 21:30:0267class TransportDIB;
kenrba7199832015-01-22 23:44:5968struct FrameMsg_NewFrame_WidgetParams;
alexmose7da5a12015-04-09 02:22:1669struct FrameMsg_PostMessage_Params;
lukaszaede9cc02015-12-30 23:48:3270struct FrameMsg_SerializeAsMHTML_Params;
dspelle736c9db2015-04-03 04:53:1671struct FrameMsg_TextTrackSettings_Params;
[email protected]7a4e2532013-12-02 21:30:0272
73namespace blink {
[email protected]5ee7f182014-04-25 19:45:2674class WebGeolocationClient;
[email protected]7a4e2532013-12-02 21:30:0275class WebMouseEvent;
[email protected]82ce5b92014-03-22 05:15:2676class WebContentDecryptionModule;
avayvodbca35fad2015-01-29 20:20:5777class WebPresentationClient;
[email protected]45920862014-07-02 12:53:0278class WebPushClient;
[email protected]82ce5b92014-03-22 05:15:2679class WebSecurityOrigin;
alogvinovf50445a2015-10-30 13:00:1280class WebWakeLockClient;
[email protected]7a4e2532013-12-02 21:30:0281struct WebCompositionUnderline;
[email protected]a09d53ce2014-01-31 00:46:4282struct WebContextMenuData;
[email protected]7a4e2532013-12-02 21:30:0283struct WebCursorInfo;
paulmeyer5d0a5f02016-01-21 20:15:5284struct WebFindOptions;
dcheng3ce04b62015-10-26 23:30:5585struct WebScreenInfo;
[email protected]7a4e2532013-12-02 21:30:0286}
87
88namespace gfx {
[email protected]a09d53ce2014-01-31 00:46:4289class Point;
[email protected]7a4e2532013-12-02 21:30:0290class Range;
91class Rect;
92}
93
jrummell109c3a602014-12-18 01:08:5094namespace media {
xhwangd7180832015-04-03 05:38:1595class CdmFactory;
xhwang60b430a2015-02-01 05:20:4696class MediaPermission;
hubbe5f0ad43b2015-12-14 20:57:2697class MediaServiceProvider;
dalecurtisa12e6062015-11-10 23:13:1498class RendererWebMediaPlayerDelegate;
hubbe5f0ad43b2015-12-14 20:57:2699class UrlIndex;
jrummell109c3a602014-12-18 01:08:50100class WebEncryptedMediaClientImpl;
101}
102
xhwang33f939e2015-06-23 04:33:42103namespace mojo {
104class ServiceProvider;
105}
106
tommycli58e3172c2015-09-15 18:18:26107namespace url {
108class Origin;
109}
110
[email protected]227692c52013-05-31 22:43:04111namespace content {
112
[email protected]bffc8302014-01-23 20:52:16113class ChildFrameCompositingHelper;
kenrba7199832015-01-22 23:44:59114class CompositorDependencies;
dgozman358ba322015-03-26 15:05:30115class DevToolsAgent;
avi0392dbf52015-03-25 16:55:45116class DocumentState;
avi485e5fd62014-08-25 23:26:14117class ExternalPopupMenu;
[email protected]8eae0802014-06-02 21:35:55118class GeolocationDispatcher;
mlamouriefdca9d2014-09-16 16:55:40119class ManifestManager;
[email protected]977db4a42014-07-17 08:04:32120class MediaStreamDispatcher;
[email protected]ae2477e2014-05-27 23:47:08121class MediaStreamRendererFactory;
xhwang5206d4e62016-02-05 02:09:55122class MediaPermissionDispatcher;
[email protected]52d3e172014-06-16 16:57:02123class MidiDispatcher;
avi0392dbf52015-03-25 16:55:45124class NavigationState;
[email protected]4459599e2014-07-29 22:40:09125class NotificationPermissionDispatcher;
clamyda97e8322014-10-07 21:57:25126class PageState;
[email protected]7a4e2532013-12-02 21:30:02127class PepperPluginInstanceImpl;
mlamouric6d31db2015-03-28 17:48:14128class PermissionDispatcher;
avayvodbca35fad2015-01-29 20:20:57129class PresentationDispatcher;
[email protected]45920862014-07-02 12:53:02130class PushMessagingDispatcher;
[email protected]95640212014-07-26 18:14:30131class RendererAccessibility;
[email protected]4b556cf2014-06-10 23:21:53132class RendererCdmManager;
133class RendererMediaPlayerManager;
davve859f4f92015-11-27 10:16:19134class RendererMediaSessionManager;
[email protected]7a4e2532013-12-02 21:30:02135class RendererPpapiHost;
[email protected]2e2d9632013-12-03 00:55:26136class RenderFrameObserver;
[email protected]227692c52013-05-31 22:43:04137class RenderViewImpl;
[email protected]7a4e2532013-12-02 21:30:02138class RenderWidget;
139class RenderWidgetFullscreenPepper;
[email protected]cf78eda2014-06-13 16:57:41140class ScreenOrientationDispatcher;
perkj1a2d0432014-09-03 13:52:33141class UserMediaClientImpl;
alogvinovf50445a2015-10-30 13:00:12142class WakeLockDispatcher;
clamy9bfeef42014-09-30 20:50:42143struct CommonNavigationParams;
[email protected]a09d53ce2014-01-31 00:46:42144struct CustomContextMenuContext;
alexmosbc7eafa2014-12-06 01:38:09145struct FrameReplicationState;
avi0392dbf52015-03-25 16:55:45146struct NavigationParams;
clamy79b3da62014-10-14 08:50:37147struct RequestNavigationParams;
davidbena5496d62014-10-07 18:52:04148struct ResourceResponseHead;
clamy34e12782015-03-12 11:26:13149struct StartNavigationParams;
clamyd6983032015-04-29 14:48:12150struct StreamOverrideParameters;
bajones02443532015-06-22 21:17:40151class VRDispatcher;
[email protected]227692c52013-05-31 22:43:04152
[email protected]85d85fd2013-06-19 00:57:41153class CONTENT_EXPORT RenderFrameImpl
154 : public RenderFrame,
[email protected]96307312014-05-04 01:00:19155 NON_EXPORTED_BASE(public blink::WebFrameClient),
lukasza902fcc52015-12-31 04:45:29156 NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) {
[email protected]227692c52013-05-31 22:43:04157 public:
dchengc5ef1a52015-08-26 20:58:30158 // Creates a new RenderFrame as the main frame of |render_view|.
dcheng3ce04b62015-10-26 23:30:55159 static RenderFrameImpl* CreateMainFrame(
160 RenderViewImpl* render_view,
161 int32_t routing_id,
162 int32_t widget_routing_id,
163 bool hidden,
164 const blink::WebScreenInfo& screen_info,
165 CompositorDependencies* compositor_deps);
[email protected]2f61bdd2013-07-02 18:38:47166
alexmosa181efc2015-09-03 00:39:04167 // Creates a new RenderFrame with |routing_id|. If |proxy_routing_id| is
168 // MSG_ROUTING_NONE, it creates the Blink WebLocalFrame and inserts it into
169 // the frame tree after the frame identified by
170 // |previous_sibling_routing_id|, or as the first child if
alexmos9f8705a2015-05-06 19:58:59171 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is
172 // semi-orphaned until it commits, at which point it replaces the proxy
alexmosa181efc2015-09-03 00:39:04173 // identified by |proxy_routing_id|. The frame's opener is set to the frame
174 // identified by |opener_routing_id|. The frame is created as a child of the
175 // RenderFrame identified by |parent_routing_id| or as the top-level frame if
176 // the latter is MSG_ROUTING_NONE. Note: This is called only when
alexmos9f8705a2015-05-06 19:58:59177 // RenderFrame is being created in response to IPC message from the browser
178 // process. All other frame creation is driven through Blink and Create.
lazyboy70605c32015-11-03 01:27:31179 static void CreateFrame(
180 int routing_id,
181 int proxy_routing_id,
182 int opener_routing_id,
183 int parent_routing_id,
184 int previous_sibling_routing_id,
185 const FrameReplicationState& replicated_state,
186 CompositorDependencies* compositor_deps,
187 const FrameMsg_NewFrame_WidgetParams& params,
188 const blink::WebFrameOwnerProperties& frameOwner_properties);
[email protected]82307f6b2014-08-07 03:30:12189
[email protected]5a7100d2014-05-19 01:29:04190 // Returns the RenderFrameImpl for the given routing ID.
191 static RenderFrameImpl* FromRoutingID(int routing_id);
192
[email protected]a5ac6dc2014-01-15 07:02:14193 // Just like RenderFrame::FromWebFrame but returns the implementation.
194 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
[email protected]b70da4c2014-01-06 19:57:09195
[email protected]2f61bdd2013-07-02 18:38:47196 // Used by content_layouttest_support to hook into the creation of
197 // RenderFrameImpls.
jochen664198b2015-06-25 14:13:00198 struct CreateParams {
avi1023d012015-12-25 02:39:14199 CreateParams(RenderViewImpl* render_view, int32_t routing_id)
jochen664198b2015-06-25 14:13:00200 : render_view(render_view), routing_id(routing_id) {}
201 ~CreateParams() {}
202
203 RenderViewImpl* render_view;
avi1023d012015-12-25 02:39:14204 int32_t routing_id;
jochen664198b2015-06-25 14:13:00205 };
206
207 using CreateRenderFrameImplFunction =
208 RenderFrameImpl* (*)(const CreateParams&);
[email protected]2f61bdd2013-07-02 18:38:47209 static void InstallCreateHook(
dongseong.hwangb721ddf2014-12-10 21:22:50210 CreateRenderFrameImplFunction create_render_frame_impl);
[email protected]2f61bdd2013-07-02 18:38:47211
alexmos95733002015-08-24 16:38:09212 // Looks up and returns the WebFrame corresponding to a given opener frame
213 // routing ID. Also stores the opener's RenderView routing ID into
214 // |opener_view_routing_id|.
215 //
216 // TODO(alexmos): remove RenderViewImpl's dependency on
217 // opener_view_routing_id.
218 static blink::WebFrame* ResolveOpener(int opener_frame_routing_id,
219 int* opener_view_routing_id);
220
avi5c77d212015-09-25 20:08:25221 ~RenderFrameImpl() override;
[email protected]227692c52013-05-31 22:43:04222
[email protected]b70da4c2014-01-06 19:57:09223 bool is_swapped_out() const {
224 return is_swapped_out_;
225 }
226
[email protected]5a7100d2014-05-19 01:29:04227 // TODO(nasko): This can be removed once we don't have a swapped out state on
228 // RenderFrames. See https://crbug.com/357747.
229 void set_render_frame_proxy(RenderFrameProxy* proxy) {
230 render_frame_proxy_ = proxy;
231 }
232
dglazkovf0e1d6d2015-10-10 02:13:48233 // Called by RenderWidget when meaningful layout has happened.
234 // See RenderFrameObserver::DidMeaningfulLayout declaration for details.
235 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type);
236
[email protected]bffc8302014-01-23 20:52:16237 // Out-of-process child frames receive a signal from RenderWidgetCompositor
238 // when a compositor frame has committed.
239 void DidCommitCompositorFrame();
240
[email protected]7a4e2532013-12-02 21:30:02241 // TODO(jam): this is a temporary getter until all the code is transitioned
242 // to using RenderFrame instead of RenderView.
[email protected]abc501e2014-01-27 19:27:26243 RenderViewImpl* render_view() { return render_view_.get(); }
[email protected]7a4e2532013-12-02 21:30:02244
[email protected]f3add922013-12-20 23:17:16245 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; }
246
[email protected]7a4e2532013-12-02 21:30:02247 // Returns the RenderWidget associated with this frame.
248 RenderWidget* GetRenderWidget();
249
dgozmancf9039cd2015-04-06 12:01:31250 DevToolsAgent* devtools_agent() { return devtools_agent_; }
251
[email protected]0287e762014-04-11 13:07:58252 // This method must be called after the frame has been added to the frame
253 // tree. It creates all objects that depend on the frame being at its proper
254 // spot.
255 void Initialize();
256
[email protected]de3c5d82014-05-28 22:12:59257 // Notifications from RenderWidget.
258 void WasHidden();
259 void WasShown();
dgozmancf9039cd2015-04-06 12:01:31260 void WidgetWillClose();
[email protected]de3c5d82014-05-28 22:12:59261
[email protected]723971b2014-02-12 11:08:25262 // Start/Stop loading notifications.
263 // TODO(nasko): Those are page-level methods at this time and come from
264 // WebViewClient. We should move them to be WebFrameClient calls and put
265 // logic in the browser side to balance starts/stops.
[email protected]e3b10d12014-03-28 16:06:09266 // |to_different_document| will be true unless the load is a fragment
267 // navigation, or triggered by history.pushState/replaceState.
avi5c77d212015-09-25 20:08:25268 void didStartLoading(bool to_different_document) override;
269 void didStopLoading() override;
270 void didChangeLoadProgress(double load_progress) override;
[email protected]723971b2014-02-12 11:08:25271
[email protected]95640212014-07-26 18:14:30272 AccessibilityMode accessibility_mode() {
273 return accessibility_mode_;
274 }
275
276 RendererAccessibility* renderer_accessibility() {
277 return renderer_accessibility_;
278 }
279
280 void HandleWebAccessibilityEvent(const blink::WebAXObject& obj,
281 blink::WebAXEvent event);
282
estade31c54342015-01-23 03:34:36283 // The focused node changed to |node|. If focus was lost from this frame,
284 // |node| will be null.
[email protected]95640212014-07-26 18:14:30285 void FocusedNodeChanged(const blink::WebNode& node);
286
estade31c54342015-01-23 03:34:36287 // TODO(dmazzoni): the only reason this is here is to plumb it through to
288 // RendererAccessibility. It should use the RenderFrameObserver method, once
289 // blink has a separate accessibility tree per frame.
290 void FocusedNodeChangedForAccessibility(const blink::WebNode& node);
291
[email protected]7a4e2532013-12-02 21:30:02292#if defined(ENABLE_PLUGINS)
paulmeyer5d0a5f02016-01-21 20:15:52293 // Get/set the plugin which will be used to handle document find requests.
294 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) {
295 plugin_find_handler_ = plugin;
296 }
297 PepperPluginInstanceImpl* plugin_find_handler() {
298 return plugin_find_handler_;
299 }
300
[email protected]271ff5792013-12-04 22:29:31301 // Notification that a PPAPI plugin has been created.
302 void PepperPluginCreated(RendererPpapiHost* host);
303
[email protected]7a4e2532013-12-02 21:30:02304 // Notifies that |instance| has changed the cursor.
305 // This will update the cursor appearance if it is currently over the plugin
306 // instance.
307 void PepperDidChangeCursor(PepperPluginInstanceImpl* instance,
308 const blink::WebCursorInfo& cursor);
309
310 // Notifies that |instance| has received a mouse event.
311 void PepperDidReceiveMouseEvent(PepperPluginInstanceImpl* instance);
312
[email protected]7a4e2532013-12-02 21:30:02313 // Informs the render view that a PPAPI plugin has changed text input status.
314 void PepperTextInputTypeChanged(PepperPluginInstanceImpl* instance);
315 void PepperCaretPositionChanged(PepperPluginInstanceImpl* instance);
316
317 // Cancels current composition.
318 void PepperCancelComposition(PepperPluginInstanceImpl* instance);
319
320 // Informs the render view that a PPAPI plugin has changed selection.
321 void PepperSelectionChanged(PepperPluginInstanceImpl* instance);
322
323 // Creates a fullscreen container for a pepper plugin instance.
324 RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer(
325 PepperPluginInstanceImpl* plugin);
326
[email protected]7a4e2532013-12-02 21:30:02327 bool IsPepperAcceptingCompositionEvents() const;
328
329 // Notification that the given plugin has crashed.
330 void PluginCrashed(const base::FilePath& plugin_path,
331 base::ProcessId plugin_pid);
332
[email protected]7a4e2532013-12-02 21:30:02333 // Simulates IME events for testing purpose.
334 void SimulateImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26335 const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02336 const std::vector<blink::WebCompositionUnderline>& underlines,
337 int selection_start,
338 int selection_end);
[email protected]fcf75d42013-12-03 20:11:26339 void SimulateImeConfirmComposition(const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02340 const gfx::Range& replacement_range);
341
342 // TODO(jam): remove these once the IPC handler moves from RenderView to
343 // RenderFrame.
344 void OnImeSetComposition(
tommyclie6633ca72014-10-31 00:40:42345 const base::string16& text,
346 const std::vector<blink::WebCompositionUnderline>& underlines,
347 int selection_start,
348 int selection_end);
349 void OnImeConfirmComposition(const base::string16& text,
350 const gfx::Range& replacement_range,
351 bool keep_selection);
352#endif // defined(ENABLE_PLUGINS)
[email protected]7a4e2532013-12-02 21:30:02353
[email protected]977db4a42014-07-17 08:04:32354 // May return NULL in some cases, especially if userMediaClient() returns
355 // NULL.
356 MediaStreamDispatcher* GetMediaStreamDispatcher();
357
avi485e5fd62014-08-25 23:26:14358#if defined(OS_MACOSX) || defined(OS_ANDROID)
359 void DidHideExternalPopupMenu();
360#endif
361
[email protected]227692c52013-05-31 22:43:04362 // IPC::Sender
dcheng6d18e402014-10-21 12:32:52363 bool Send(IPC::Message* msg) override;
[email protected]227692c52013-05-31 22:43:04364
365 // IPC::Listener
dcheng6d18e402014-10-21 12:32:52366 bool OnMessageReceived(const IPC::Message& msg) override;
[email protected]227692c52013-05-31 22:43:04367
[email protected]271ff5792013-12-04 22:29:31368 // RenderFrame implementation:
dcheng6d18e402014-10-21 12:32:52369 RenderView* GetRenderView() override;
370 int GetRoutingID() override;
371 blink::WebLocalFrame* GetWebFrame() override;
estade78d655f82015-01-30 01:55:08372 blink::WebElement GetFocusedElement() const override;
dcheng6d18e402014-10-21 12:32:52373 WebPreferences& GetWebkitPreferences() override;
374 int ShowContextMenu(ContextMenuClient* client,
375 const ContextMenuParams& params) override;
376 void CancelContextMenu(int request_id) override;
377 blink::WebNode GetContextMenuNode() const override;
tommycli59bd86c2014-12-10 02:09:38378 blink::WebPlugin* CreatePlugin(
379 blink::WebFrame* frame,
380 const WebPluginInfo& info,
381 const blink::WebPluginParams& params,
tommyclie8722702015-01-16 11:40:41382 scoped_ptr<PluginInstanceThrottler> throttler) override;
japhetb0bae9d82015-10-19 20:43:40383 void LoadURLExternally(const blink::WebURLRequest& request,
dcheng6d18e402014-10-21 12:32:52384 blink::WebNavigationPolicy policy) override;
385 void ExecuteJavaScript(const base::string16& javascript) override;
dglazkov2e140f52015-09-28 16:10:07386 bool IsMainFrame() override;
dcheng6d18e402014-10-21 12:32:52387 bool IsHidden() override;
388 ServiceRegistry* GetServiceRegistry() override;
tommyclid481c482014-12-03 01:50:41389#if defined(ENABLE_PLUGINS)
tommycli59bd86c2014-12-10 02:09:38390 void RegisterPeripheralPlugin(
tommycli58e3172c2015-09-15 18:18:26391 const url::Origin& content_origin,
tommycli59bd86c2014-12-10 02:09:38392 const base::Closure& unthrottle_callback) override;
tommycli9c7cbd92015-12-18 23:34:34393 RenderFrame::PeripheralContentStatus GetPeripheralContentStatus(
394 const url::Origin& main_frame_origin,
395 const url::Origin& content_origin,
396 const gfx::Size& unobscured_size) const override;
tommyclibae63b92015-10-23 02:56:20397 void WhitelistContentOrigin(const url::Origin& content_origin) override;
tommyclid481c482014-12-03 01:50:41398#endif
dcheng6d18e402014-10-21 12:32:52399 bool IsFTPDirectoryListing() override;
400 void AttachGuest(int element_instance_id) override;
fsamuela95fef42014-12-03 20:16:52401 void DetachGuest(int element_instance_id) override;
dcheng6d18e402014-10-21 12:32:52402 void SetSelectedText(const base::string16& selection_text,
403 size_t offset,
404 const gfx::Range& range) override;
405 void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate,
dcarney4410a7c92015-04-20 11:28:19406 v8::Local<v8::Context> context) override;
rdevlin.croninb2cec912015-06-24 20:36:01407 void AddMessageToConsole(ConsoleMessageLevel level,
408 const std::string& message) override;
megjablond5ac7d52015-10-22 23:56:12409 bool IsUsingLoFi() const override;
ellyjonesdb20fae12015-12-04 16:47:55410 bool IsPasting() const override;
[email protected]271ff5792013-12-04 22:29:31411
[email protected]96307312014-05-04 01:00:19412 // blink::WebFrameClient implementation:
avi5c77d212015-09-25 20:08:25413 blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame,
414 const blink::WebPluginParams& params) override;
415 blink::WebMediaPlayer* createMediaPlayer(
sandersdf92f4e5c2016-01-22 20:57:22416 blink::WebMediaPlayer::LoadType load_type,
srirama.m26f864d02015-07-14 05:21:46417 const blink::WebURL& url,
418 blink::WebMediaPlayerClient* client,
419 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
guidou9c3cc3e2015-10-27 13:38:15420 blink::WebContentDecryptionModule* initial_cdm,
davveadd785e72016-01-26 17:40:36421 const blink::WebString& sink_id,
422 blink::WebMediaSession* media_session) override;
davve50137b62015-10-23 12:15:21423 blink::WebMediaSession* createMediaSession() override;
avi5c77d212015-09-25 20:08:25424 blink::WebApplicationCacheHost* createApplicationCacheHost(
avi5c77d212015-09-25 20:08:25425 blink::WebApplicationCacheHostClient* client) override;
426 blink::WebWorkerContentSettingsClientProxy*
avi01681ef2016-02-16 17:53:57427 createWorkerContentSettingsClientProxy() override;
avi5c77d212015-09-25 20:08:25428 blink::WebExternalPopupMenu* createExternalPopupMenu(
[email protected]b20c3222014-08-22 00:50:22429 const blink::WebPopupMenuInfo& popup_menu_info,
avi5c77d212015-09-25 20:08:25430 blink::WebExternalPopupMenuClient* popup_menu_client) override;
431 blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame) override;
avi01681ef2016-02-16 17:53:57432 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override;
avi5c77d212015-09-25 20:08:25433 void didAccessInitialDocument(blink::WebLocalFrame* frame) override;
434 blink::WebFrame* createChildFrame(
alexmose48b1df932015-01-16 01:34:17435 blink::WebLocalFrame* parent,
dcheng860817a2015-05-22 03:16:56436 blink::WebTreeScopeType scope,
437 const blink::WebString& name,
lazyboy70605c32015-11-03 01:27:31438 blink::WebSandboxFlags sandboxFlags,
439 const blink::WebFrameOwnerProperties& frameOwnerProperties) override;
avi5c77d212015-09-25 20:08:25440 void didChangeOpener(blink::WebFrame* frame) override;
441 void frameDetached(blink::WebFrame* frame, DetachType type) override;
442 void frameFocused() override;
443 void willClose(blink::WebFrame* frame) override;
444 void didChangeName(blink::WebLocalFrame* frame,
445 const blink::WebString& name) override;
estarka886b8d2015-12-18 21:53:08446 void didEnforceStrictMixedContentChecking() override;
avi5c77d212015-09-25 20:08:25447 void didChangeSandboxFlags(blink::WebFrame* child_frame,
448 blink::WebSandboxFlags flags) override;
Avi Drissman09b359e52015-12-07 20:19:21449 void didChangeFrameOwnerProperties(
lazyboy70605c32015-11-03 01:27:31450 blink::WebFrame* child_frame,
451 const blink::WebFrameOwnerProperties& frame_owner_properties) override;
avi5c77d212015-09-25 20:08:25452 void didMatchCSS(
[email protected]35b2a972014-04-04 15:50:22453 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46454 const blink::WebVector<blink::WebString>& newly_matching_selectors,
avi5c77d212015-09-25 20:08:25455 const blink::WebVector<blink::WebString>& stopped_matching_selectors)
456 override;
457 bool shouldReportDetailedMessageForSource(
458 const blink::WebString& source) override;
459 void didAddMessageToConsole(const blink::WebConsoleMessage& message,
460 const blink::WebString& source_name,
461 unsigned source_line,
462 const blink::WebString& stack_trace) override;
japhetb0bae9d82015-10-19 20:43:40463 void loadURLExternally(const blink::WebURLRequest& request,
avi5c77d212015-09-25 20:08:25464 blink::WebNavigationPolicy policy,
japhetb0bae9d82015-10-19 20:43:40465 const blink::WebString& suggested_name,
466 bool should_replace_current_entry) override;
avi5c77d212015-09-25 20:08:25467 blink::WebNavigationPolicy decidePolicyForNavigation(
468 const NavigationPolicyInfo& info) override;
creise18ce072015-12-02 02:00:02469 blink::WebHistoryItem historyItemForNewChildFrame() override;
avi5c77d212015-09-25 20:08:25470 void willSendSubmitEvent(blink::WebLocalFrame* frame,
471 const blink::WebFormElement& form) override;
472 void willSubmitForm(blink::WebLocalFrame* frame,
473 const blink::WebFormElement& form) override;
474 void didCreateDataSource(blink::WebLocalFrame* frame,
475 blink::WebDataSource* datasource) override;
476 void didStartProvisionalLoad(blink::WebLocalFrame* frame,
477 double triggering_event_time) override;
478 void didReceiveServerRedirectForProvisionalLoad(
479 blink::WebLocalFrame* frame) override;
480 void didFailProvisionalLoad(blink::WebLocalFrame* frame,
481 const blink::WebURLError& error,
482 blink::WebHistoryCommitType commit_type) override;
483 void didCommitProvisionalLoad(
[email protected]45d877f2014-04-05 07:36:22484 blink::WebLocalFrame* frame,
[email protected]680575542014-04-03 17:12:52485 const blink::WebHistoryItem& item,
avi5c77d212015-09-25 20:08:25486 blink::WebHistoryCommitType commit_type) override;
487 void didCreateNewDocument(blink::WebLocalFrame* frame) override;
488 void didClearWindowObject(blink::WebLocalFrame* frame) override;
489 void didCreateDocumentElement(blink::WebLocalFrame* frame) override;
490 void didReceiveTitle(blink::WebLocalFrame* frame,
491 const blink::WebString& title,
492 blink::WebTextDirection direction) override;
493 void didChangeIcon(blink::WebLocalFrame* frame,
494 blink::WebIconURL::Type icon_type) override;
495 void didFinishDocumentLoad(blink::WebLocalFrame* frame,
496 bool document_is_empty) override;
497 void didHandleOnloadEvents(blink::WebLocalFrame* frame) override;
498 void didFailLoad(blink::WebLocalFrame* frame,
499 const blink::WebURLError& error,
500 blink::WebHistoryCommitType commit_type) override;
501 void didFinishLoad(blink::WebLocalFrame* frame) override;
502 void didNavigateWithinPage(blink::WebLocalFrame* frame,
503 const blink::WebHistoryItem& item,
504 blink::WebHistoryCommitType commit_type) override;
505 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame) override;
506 void didChangeThemeColor() override;
507 void dispatchLoad() override;
508 void requestNotificationPermission(
[email protected]4459599e2014-07-29 22:40:09509 const blink::WebSecurityOrigin& origin,
avi5c77d212015-09-25 20:08:25510 blink::WebNotificationPermissionCallback* callback) override;
511 void didChangeSelection(bool is_empty_selection) override;
512 blink::WebColorChooser* createColorChooser(
[email protected]eb8c216a2014-04-09 19:19:19513 blink::WebColorChooserClient* client,
[email protected]f3c59d62014-04-09 16:33:55514 const blink::WebColor& initial_color,
avi5c77d212015-09-25 20:08:25515 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override;
516 void runModalAlertDialog(const blink::WebString& message) override;
517 bool runModalConfirmDialog(const blink::WebString& message) override;
518 bool runModalPromptDialog(const blink::WebString& message,
519 const blink::WebString& default_value,
520 blink::WebString* actual_value) override;
521 bool runModalBeforeUnloadDialog(bool is_reload,
522 const blink::WebString& message) override;
523 void showContextMenu(const blink::WebContextMenuData& data) override;
524 void clearContextMenu() override;
525 void willSendRequest(blink::WebLocalFrame* frame,
526 unsigned identifier,
527 blink::WebURLRequest& request,
528 const blink::WebURLResponse& redirect_response) override;
529 void didReceiveResponse(blink::WebLocalFrame* frame,
530 unsigned identifier,
531 const blink::WebURLResponse& response) override;
532 void didLoadResourceFromMemoryCache(
[email protected]35b2a972014-04-04 15:50:22533 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46534 const blink::WebURLRequest& request,
avi5c77d212015-09-25 20:08:25535 const blink::WebURLResponse& response) override;
536 void didDisplayInsecureContent() override;
537 void didRunInsecureContent(const blink::WebSecurityOrigin& origin,
538 const blink::WebURL& target) override;
estark910b4572015-12-09 20:55:41539 void didDisplayContentWithCertificateErrors(
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;
544 void didRunContentWithCertificateErrors(
545 const blink::WebURL& url,
546 const blink::WebCString& security_info,
547 const blink::WebURL& main_resource_url,
548 const blink::WebCString& main_resource_security_info) override;
avi5c77d212015-09-25 20:08:25549 void didChangePerformanceTiming() override;
avi5c77d212015-09-25 20:08:25550 void didCreateScriptContext(blink::WebLocalFrame* frame,
551 v8::Local<v8::Context> context,
552 int extension_group,
553 int world_id) override;
554 void willReleaseScriptContext(blink::WebLocalFrame* frame,
555 v8::Local<v8::Context> context,
556 int world_id) override;
557 void didChangeScrollOffset(blink::WebLocalFrame* frame) override;
558 void willInsertBody(blink::WebLocalFrame* frame) override;
559 void reportFindInPageMatchCount(int request_id,
560 int count,
561 bool final_update) override;
562 void reportFindInPageSelection(int request_id,
563 int active_match_ordinal,
564 const blink::WebRect& sel) override;
565 void requestStorageQuota(blink::WebLocalFrame* frame,
566 blink::WebStorageQuotaType type,
567 unsigned long long requested_size,
568 blink::WebStorageQuotaCallbacks callbacks) override;
569 void willOpenWebSocket(blink::WebSocketHandle* handle) override;
alogvinovf50445a2015-10-30 13:00:12570 blink::WebWakeLockClient* wakeLockClient() override;
avi5c77d212015-09-25 20:08:25571 blink::WebGeolocationClient* geolocationClient() override;
572 blink::WebPushClient* pushClient() override;
573 blink::WebPresentationClient* presentationClient() override;
574 void willStartUsingPeerConnectionHandler(
[email protected]35b2a972014-04-04 15:50:22575 blink::WebLocalFrame* frame,
avi5c77d212015-09-25 20:08:25576 blink::WebRTCPeerConnectionHandler* handler) override;
577 blink::WebUserMediaClient* userMediaClient() override;
578 blink::WebEncryptedMediaClient* encryptedMediaClient() override;
579 blink::WebMIDIClient* webMIDIClient() override;
580 bool willCheckAndDispatchMessageEvent(
[email protected]ce5064f2014-05-07 22:49:20581 blink::WebLocalFrame* source_frame,
582 blink::WebFrame* target_frame,
583 blink::WebSecurityOrigin target_origin,
avi5c77d212015-09-25 20:08:25584 blink::WebDOMMessageEvent event) override;
tzik34958ad62015-10-08 14:07:45585 blink::WebString userAgentOverride(blink::WebLocalFrame* frame) override;
avi5c77d212015-09-25 20:08:25586 blink::WebString doNotTrackValue(blink::WebLocalFrame* frame) override;
587 bool allowWebGL(blink::WebLocalFrame* frame, bool default_value) override;
588 void didLoseWebGLContext(blink::WebLocalFrame* frame,
589 int arb_robustness_status_code) override;
590 blink::WebScreenOrientationClient* webScreenOrientationClient() override;
591 bool isControlledByServiceWorker(blink::WebDataSource& data_source) override;
592 int64_t serviceWorkerID(blink::WebDataSource& data_source) override;
593 void postAccessibilityEvent(const blink::WebAXObject& obj,
594 blink::WebAXEvent event) override;
595 void handleAccessibilityFindInPageResult(
596 int identifier,
597 int match_index,
598 const blink::WebAXObject& start_object,
599 int start_offset,
600 const blink::WebAXObject& end_object,
601 int end_offset) override;
602 void didChangeManifest(blink::WebLocalFrame*) override;
603 bool enterFullscreen() override;
604 bool exitFullscreen() override;
605 blink::WebPermissionClient* permissionClient() override;
606 blink::WebAppBannerClient* appBannerClient() override;
607 void registerProtocolHandler(const blink::WebString& scheme,
608 const blink::WebURL& url,
609 const blink::WebString& title) override;
610 void unregisterProtocolHandler(const blink::WebString& scheme,
611 const blink::WebURL& url) override;
612 blink::WebBluetooth* bluetooth() override;
613 blink::WebUSBClient* usbClient() override;
guidou3906a722015-11-12 22:14:42614 void checkIfAudioSinkExistsAndIsAuthorized(
615 const blink::WebString& sink_id,
616 const blink::WebSecurityOrigin& security_origin,
617 blink::WebSetSinkIdCallbacks* web_callbacks) override;
[email protected]85d85fd2013-06-19 00:57:41618
bajones02443532015-06-22 21:17:40619#if defined(ENABLE_WEBVR)
620 blink::WebVRClient* webVRClient() override;
621#endif
622
lukasza902fcc52015-12-31 04:45:29623 // WebFrameSerializerClient implementation:
lukasza2e296c32015-09-28 23:29:48624 void didSerializeDataForFrame(
lukasza2e296c32015-09-28 23:29:48625 const blink::WebCString& data,
lukasza902fcc52015-12-31 04:45:29626 blink::WebFrameSerializerClient::FrameSerializationStatus status)
627 override;
lukasza2e296c32015-09-28 23:29:48628
nasko78f06bc2014-11-18 18:18:57629 // Make this frame show an empty, unscriptable page.
630 // TODO(nasko): Remove this method once swapped out state is no longer used.
631 void NavigateToSwappedOutURL();
632
rockotf8fdd9b2015-12-16 22:22:35633 // Binds this render frame's service registry.
634 void BindServiceRegistry(
ben80ab89052016-02-11 20:19:27635 mojo::shell::mojom::InterfaceProviderRequest services,
636 mojo::shell::mojom::InterfaceProviderPtr exposed_services);
rockotf8fdd9b2015-12-16 22:22:35637
mlamouri4fff1992014-09-30 11:22:46638 ManifestManager* manifest_manager();
639
avi0392dbf52015-03-25 16:55:45640 // TODO(creis): Remove when the only caller, the HistoryController, is no
641 // more.
642 void SetPendingNavigationParams(
643 scoped_ptr<NavigationParams> navigation_params);
644
xhwang5206d4e62016-02-05 02:09:55645 media::MediaPermission* GetMediaPermission();
guoweisf4282b02015-09-24 23:05:22646
creis69b184a472015-11-26 05:29:51647 // Sends the current frame's navigation state to the browser.
648 void SendUpdateState();
649
nasko1fa0fb62015-12-09 01:49:57650 // Creates a MojoBindingsController to allow WebUI documents to communicate
rockot8df5c722016-01-26 07:15:14651 // with the browser process. If |for_layout_tests| is true, the module system
652 // is exposed on a global "mojo" object rather than "define".
653 void EnableMojoBindings(bool for_layout_tests);
nasko1fa0fb62015-12-09 01:49:57654
[email protected]2f61bdd2013-07-02 18:38:47655 protected:
jochen664198b2015-06-25 14:13:00656 explicit RenderFrameImpl(const CreateParams& params);
[email protected]2f61bdd2013-07-02 18:38:47657
[email protected]227692c52013-05-31 22:43:04658 private:
kenrbf98a4d22015-04-01 21:59:35659 friend class RenderFrameImplTest;
[email protected]2e2d9632013-12-03 00:55:26660 friend class RenderFrameObserver;
[email protected]95640212014-07-26 18:14:30661 friend class RendererAccessibilityTest;
clamy98a9dee02015-06-24 16:09:10662 friend class TestRenderFrame;
avi485e5fd62014-08-25 23:26:14663 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
664 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
665 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
666 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
[email protected]66bbadaf2014-03-28 16:25:54667 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
668 AccessibilityMessagesQueueWhileSwappedOut);
[email protected]2e2d9632013-12-03 00:55:26669
twellington376424ad2015-05-04 18:57:25670 // A wrapper class used as the callback for JavaScript executed
671 // in an isolated world.
672 class JavaScriptIsolatedWorldRequest
673 : public blink::WebScriptExecutionCallback {
674 public:
675 JavaScriptIsolatedWorldRequest(
676 int id,
677 bool notify_result,
678 int routing_id,
679 base::WeakPtr<RenderFrameImpl> render_frame_impl);
680 void completed(
681 const blink::WebVector<v8::Local<v8::Value>>& result) override;
682
683 private:
avi5c77d212015-09-25 20:08:25684 ~JavaScriptIsolatedWorldRequest() override;
twellington376424ad2015-05-04 18:57:25685
686 int id_;
687 bool notify_result_;
688 int routing_id_;
689 base::WeakPtr<RenderFrameImpl> render_frame_impl_;
690
691 DISALLOW_COPY_AND_ASSIGN(JavaScriptIsolatedWorldRequest);
692 };
693
[email protected]37567b432014-02-12 01:12:22694 typedef std::map<GURL, double> HostZoomLevels;
695
dchengc5ef1a52015-08-26 20:58:30696 // Creates a new RenderFrame. |render_view| is the RenderView object that this
697 // frame belongs to.
ddorwinf63505e2016-01-08 00:54:50698 // Callers *must* call |BindToWebFrame| immediately after creation.
avi1023d012015-12-25 02:39:14699 static RenderFrameImpl* Create(RenderViewImpl* render_view,
700 int32_t routing_id);
dchengc5ef1a52015-08-26 20:58:30701
ddorwinf63505e2016-01-08 00:54:50702 // This is called right after creation with the WebLocalFrame for this
703 // RenderFrame. It must be called before Initialize.
704 void BindToWebFrame(blink::WebLocalFrame* web_frame);
705
[email protected]2e2d9632013-12-03 00:55:26706 // Functions to add and remove observers for this object.
707 void AddObserver(RenderFrameObserver* observer);
708 void RemoveObserver(RenderFrameObserver* observer);
[email protected]1c2052f2013-08-28 08:24:34709
dcheng3d886b732015-11-05 19:16:01710 bool IsLocalRoot() const;
711
[email protected]f0906a02014-08-07 07:18:55712 // Builds and sends DidCommitProvisionalLoad to the host.
avi8c46f7e2015-02-03 18:27:35713 void SendDidCommitProvisionalLoad(blink::WebFrame* frame,
creis8b5cd4c2015-06-19 00:11:08714 blink::WebHistoryCommitType commit_type,
715 const blink::WebHistoryItem& item);
[email protected]37567b432014-02-12 01:12:22716
[email protected]b70da4c2014-01-06 19:57:09717 // IPC message handlers ------------------------------------------------------
718 //
719 // The documentation for these functions should be in
720 // content/common/*_messages.h for the message that the function is handling.
clamy98a9dee02015-06-24 16:09:10721 void OnNavigate(const CommonNavigationParams& common_params,
722 const StartNavigationParams& start_params,
723 const RequestNavigationParams& request_params);
[email protected]f76f32232014-03-11 17:36:17724 void OnBeforeUnload();
alexmosbc7eafa2014-12-06 01:38:09725 void OnSwapOut(int proxy_routing_id,
nasko3e8c20e2014-12-18 06:54:56726 bool is_loading,
alexmosbc7eafa2014-12-06 01:38:09727 const FrameReplicationState& replicated_frame_state);
naskoeab5c5582015-12-15 05:20:00728 void OnDeleteFrame();
Nasko Oskov85f60222014-08-28 22:53:30729 void OnStop();
[email protected]a09d53ce2014-01-31 00:46:42730 void OnShowContextMenu(const gfx::Point& location);
731 void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
732 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
733 unsigned action);
[email protected]4ee64622014-03-21 22:34:15734 void OnUndo();
735 void OnRedo();
[email protected]9c9343b2014-03-08 02:56:07736 void OnCut();
737 void OnCopy();
738 void OnPaste();
[email protected]4ee64622014-03-21 22:34:15739 void OnPasteAndMatchStyle();
740 void OnDelete();
741 void OnSelectAll();
christiankaeed9862014-11-05 10:49:14742 void OnSelectRange(const gfx::Point& base, const gfx::Point& extent);
aurimasab0319022015-07-10 21:57:38743 void OnAdjustSelectionByCharacterOffset(int start_adjust, int end_adjust);
[email protected]4ee64622014-03-21 22:34:15744 void OnUnselect();
christiankaeed9862014-11-05 10:49:14745 void OnMoveRangeSelectionExtent(const gfx::Point& point);
[email protected]1f3fc1d2014-04-03 14:50:17746 void OnReplace(const base::string16& text);
747 void OnReplaceMisspelling(const base::string16& text);
[email protected]e31b8ebb2014-03-07 17:59:34748 void OnCSSInsertRequest(const std::string& css);
peter4eb242002015-06-02 12:45:13749 void OnAddMessageToConsole(ConsoleMessageLevel level,
750 const std::string& message);
[email protected]f13ab892014-03-12 06:48:52751 void OnJavaScriptExecuteRequest(const base::string16& javascript,
752 int id,
753 bool notify_result);
zeeshanq3454e9c2014-09-04 21:30:28754 void OnJavaScriptExecuteRequestForTests(const base::string16& javascript,
755 int id,
jochen2e7d95b2015-05-04 15:28:50756 bool notify_result,
757 bool has_user_gesture);
twellington376424ad2015-05-04 18:57:25758 void OnJavaScriptExecuteRequestInIsolatedWorld(const base::string16& jscript,
759 int id,
760 bool notify_result,
761 int world_id);
avi1023d012015-12-25 02:39:14762 void OnVisualStateRequest(uint64_t key);
[email protected]4ee64622014-03-21 22:34:15763 void OnSetEditableSelectionOffsets(int start, int end);
[email protected]e5e438d62014-03-27 21:47:16764 void OnSetCompositionFromExistingText(
765 int start, int end,
766 const std::vector<blink::WebCompositionUnderline>& underlines);
sammcbc9e99332014-12-18 00:55:24767 void OnExecuteNoValueEditCommand(const std::string& name);
[email protected]e5e438d62014-03-27 21:47:16768 void OnExtendSelectionAndDelete(int before, int after);
[email protected]4fed3702014-04-01 09:08:00769 void OnReload(bool ignore_cache);
megjablon3f5941072016-02-04 23:27:52770 void OnReloadLoFiImages();
jam973236102016-02-09 00:47:05771 void OnTextSurroundingSelectionRequest(uint32_t max_length);
[email protected]95640212014-07-26 18:14:30772 void OnSetAccessibilityMode(AccessibilityMode new_mode);
dmazzoni83ba5c82015-04-14 07:11:51773 void OnSnapshotAccessibilityTree(int callback_id);
alexmos95733002015-08-24 16:38:09774 void OnUpdateOpener(int opener_routing_id);
dcheng5f60abb2015-05-28 01:39:36775 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags);
lazyboy70605c32015-11-03 01:27:31776 void OnSetFrameOwnerProperties(
777 const blink::WebFrameOwnerProperties& frame_owner_properties);
alexmos401f0aba2015-12-06 10:07:39778 void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id);
alexmos5357efb2015-12-16 21:44:00779 void OnSetFocusedFrame();
dspelle736c9db2015-04-03 04:53:16780 void OnTextTrackSettingsChanged(
781 const FrameMsg_TextTrackSettings_Params& params);
alexmose7da5a12015-04-09 02:22:16782 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params);
davidbena5496d62014-10-07 18:52:04783 void OnCommitNavigation(const ResourceResponseHead& response,
784 const GURL& stream_url,
clamy9bfeef42014-09-30 20:50:42785 const CommonNavigationParams& common_params,
clamy57b4b8e2015-03-24 13:32:11786 const RequestNavigationParams& request_params);
clamy62b271d2015-04-16 11:54:57787 void OnFailedNavigation(const CommonNavigationParams& common_params,
788 const RequestNavigationParams& request_params,
789 bool has_stale_copy_in_cache,
790 int error_code);
lukasza6af746b72015-09-18 23:37:22791 void OnGetSavableResourceLinks();
lukasza2e296c32015-09-28 23:29:48792 void OnGetSerializedHtmlWithLocalLinks(
lukasza777a7dd2016-01-25 23:55:47793 const std::map<GURL, base::FilePath>& url_to_local_path,
794 const std::map<int, base::FilePath>& frame_routing_id_to_local_path);
lukaszaede9cc02015-12-30 23:48:32795 void OnSerializeAsMHTML(const FrameMsg_SerializeAsMHTML_Params& params);
paulmeyer5d0a5f02016-01-21 20:15:52796 void OnFind(int request_id,
797 const base::string16& search_text,
798 const blink::WebFindOptions& options);
799 void OnStopFinding(StopFindAction action);
800#if defined(OS_ANDROID)
801 void OnActivateNearestFindResult(int request_id, float x, float y);
802 void OnFindMatchRects(int current_version);
803 void OnSelectPopupMenuItems(bool canceled,
804 const std::vector<int>& selected_indices);
805#elif defined(OS_MACOSX)
806 void OnSelectPopupMenuItem(int selected_index);
807 void OnCopyToFindPboard();
808#endif
clamy9bfeef42014-09-30 20:50:42809
creise18ce072015-12-02 02:00:02810 // Requests that the browser process navigates to |url|. If
811 // |is_history_navigation_in_new_child| is true, the browser process should
812 // look for a matching FrameNavigationEntry in the last committed entry to use
813 // instead of |url|.
japhetb0bae9d82015-10-19 20:43:40814 void OpenURL(const GURL& url,
[email protected]65920f332014-03-04 21:14:18815 const Referrer& referrer,
japhetb0bae9d82015-10-19 20:43:40816 blink::WebNavigationPolicy policy,
creise18ce072015-12-02 02:00:02817 bool should_replace_current_entry,
818 bool is_history_navigation_in_new_child);
[email protected]a09d53ce2014-01-31 00:46:42819
clamyd6983032015-04-29 14:48:12820 // Performs a navigation in the frame. This provides a unified function for
821 // the current code path and the browser-side navigation path (in
822 // development). Currently used by OnNavigate, with all *NavigationParams
823 // provided by the browser. |stream_params| should be null.
824 // PlzNavigate: used by OnCommitNavigation, with |common_params| and
825 // |request_params| received by the browser. |stream_params| should be non
826 // null and created from the information provided by the browser.
827 // |start_params| is not used.
828 void NavigateInternal(const CommonNavigationParams& common_params,
829 const StartNavigationParams& start_params,
830 const RequestNavigationParams& request_params,
831 scoped_ptr<StreamOverrideParameters> stream_params);
832
[email protected]ef3adfc2014-05-11 00:04:54833 // Update current main frame's encoding and send it to browser window.
834 // Since we want to let users see the right encoding info from menu
835 // before finishing loading, we call the UpdateEncoding in
836 // a) function:DidCommitLoadForFrame. When this function is called,
837 // that means we have got first data. In here we try to get encoding
838 // of page if it has been specified in http header.
839 // b) function:DidReceiveTitle. When this function is called,
840 // that means we have got specified title. Because in most of webpages,
841 // title tags will follow meta tags. In here we try to get encoding of
842 // page if it has been specified in meta tag.
843 // c) function:DidFinishDocumentLoadForFrame. When this function is
844 // called, that means we have got whole html page. In here we should
845 // finally get right encoding of page.
846 void UpdateEncoding(blink::WebFrame* frame,
847 const std::string& encoding_name);
848
[email protected]4ee64622014-03-21 22:34:15849 // Dispatches the current state of selection on the webpage to the browser if
850 // it has changed.
851 // TODO(varunjain): delete this method once we figure out how to keep
852 // selection handles in sync with the webpage.
853 void SyncSelectionIfRequired();
854
[email protected]87de04b02014-04-08 22:14:49855 bool RunJavaScriptMessage(JavaScriptMessageType type,
856 const base::string16& message,
857 const base::string16& default_value,
858 const GURL& frame_url,
859 base::string16* result);
860
[email protected]457736d2014-04-30 15:54:27861 // Loads the appropriate error page for the specified failure into the frame.
862 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request,
863 const blink::WebURLError& error,
864 bool replace);
865
zeeshanq3454e9c2014-09-04 21:30:28866 void HandleJavascriptExecutionResult(const base::string16& javascript,
867 int id,
868 bool notify_result,
deepak.s750d68f2015-04-30 07:32:41869 v8::Local<v8::Value> result);
zeeshanq3454e9c2014-09-04 21:30:28870
[email protected]977db4a42014-07-17 08:04:32871 // Initializes |web_user_media_client_|. If this fails, because it wasn't
872 // possible to create a MediaStreamClient (e.g., WebRTC is disabled), then
873 // |web_user_media_client_| will remain NULL.
874 void InitializeUserMediaClient();
[email protected]96307312014-05-04 01:00:19875
876 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream(
guidou9c3cc3e2015-10-27 13:38:15877 blink::WebMediaPlayerClient* client,
878 const blink::WebString& sink_id,
879 const blink::WebSecurityOrigin& security_origin);
[email protected]96307312014-05-04 01:00:19880
[email protected]ae2477e2014-05-27 23:47:08881 // Creates a factory object used for creating audio and video renderers.
jochen51265132015-05-28 07:33:45882 scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory();
[email protected]ae2477e2014-05-27 23:47:08883
avi5cad4912015-06-19 05:25:44884 // Does preparation for the navigation to |url|.
885 void PrepareRenderViewForNavigation(
clamyda97e8322014-10-07 21:57:25886 const GURL& url,
clamy57b4b8e2015-03-24 13:32:11887 const RequestNavigationParams& request_params,
clamyda97e8322014-10-07 21:57:25888 bool* is_reload,
889 blink::WebURLRequest::CachePolicy* cache_policy);
890
clamyece38882014-11-19 15:00:20891 // PlzNavigate
892 // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents
893 // of the WebURLRequest.
clamyd3edf862016-02-01 12:39:28894 // |should_replace_current_entry| indicates that the current history entry
895 // will be replaced when the navigation commits. |is_client_redirect|
896 // indicates that the navigation originated as a client redirect.
897 // Note: those two concepts are separate. For example, a location.assign is a
898 // client redirect but it only replaces the current entry if called before
899 // load stop. location.replace on the other hand is a client redirect and
900 // always replaces the current entry.
901 void BeginNavigation(blink::WebURLRequest* request,
902 bool should_replace_current_entry,
903 bool is_client_redirect);
clamyece38882014-11-19 15:00:20904
clamy4cc9b8202015-03-02 13:51:36905 // Loads a data url.
906 void LoadDataURL(const CommonNavigationParams& params,
mnaganovbf087422015-12-16 05:10:03907 const RequestNavigationParams& request_params,
boliu15890e42015-11-24 23:08:05908 blink::WebFrame* frame,
909 blink::WebFrameLoadType load_type);
clamy4cc9b8202015-03-02 13:51:36910
clamy62b271d2015-04-16 11:54:57911 // Sends a proper FrameHostMsg_DidFailProvisionalLoadWithError_Params IPC for
912 // the failed request |request|.
913 void SendFailedProvisionalLoad(const blink::WebURLRequest& request,
914 const blink::WebURLError& error,
915 blink::WebLocalFrame* frame);
916
917 bool ShouldDisplayErrorPageForFailedLoad(int error_code,
918 const GURL& unreachable_url);
919
[email protected]f3a95312014-06-12 16:46:58920 // Returns the URL being loaded by the |frame_|'s request.
921 GURL GetLoadingUrl() const;
922
avi0392dbf52015-03-25 16:55:45923 // If we initiated a navigation, this function will populate |document_state|
924 // with the navigation information saved in OnNavigate().
925 void PopulateDocumentStateFromPending(DocumentState* document_state);
926
927 // Returns a new NavigationState populated with the navigation information
928 // saved in OnNavigate().
929 NavigationState* CreateNavigationStateFromPending();
930
csharrison1ce0e852015-11-07 16:45:13931 // Sets the NavigationState on the DocumentState based on
932 // the value of |pending_navigation_params_|.
933 void UpdateNavigationState(DocumentState* document_state);
934
[email protected]96307312014-05-04 01:00:19935#if defined(OS_ANDROID)
[email protected]65f3d1aa2014-05-29 01:57:00936 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
jrummell65b7d272014-09-24 20:49:27937 blink::WebMediaPlayerClient* client,
srirama.m26f864d02015-07-14 05:21:46938 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client,
dalecurtis49f363882015-08-25 21:05:38939 const media::WebMediaPlayerParams& params);
[email protected]a017938b2014-05-27 21:17:17940
[email protected]65f3d1aa2014-05-29 01:57:00941 RendererMediaPlayerManager* GetMediaPlayerManager();
davve859f4f92015-11-27 10:16:19942
943 RendererMediaSessionManager* GetMediaSessionManager();
[email protected]4b556cf2014-06-10 23:21:53944#endif
945
sandersd02d9aea2015-05-12 02:29:26946 bool AreSecureCodecsSupported();
xhwang33f939e2015-06-23 04:33:42947
xhwange70b7ee12015-06-25 09:17:17948#if defined(ENABLE_MOJO_MEDIA)
xhwangc0299ae32015-07-21 23:39:50949 media::interfaces::ServiceFactory* GetMediaServiceFactory();
xhwang33f939e2015-06-23 04:33:42950
xhwangc0299ae32015-07-21 23:39:50951 // Called when a connection error happened on |media_service_factory_|.
952 void OnMediaServiceFactoryConnectionError();
xhwang33f939e2015-06-23 04:33:42953#endif
954
xhwangd7180832015-04-03 05:38:15955 media::CdmFactory* GetCdmFactory();
[email protected]96307312014-05-04 01:00:19956
halton.huoca2eabd2015-07-06 08:17:40957 void RegisterMojoServices();
958
xhwang6bca21e2016-02-06 00:21:45959 // Connect to an interface provided by the service registry.
960 template <typename Interface>
bene3bc9022016-02-10 17:38:24961 void GetInterface(mojo::InterfaceRequest<Interface> request);
xhwang6bca21e2016-02-06 00:21:45962
rockotd9260982015-08-21 22:26:30963 // Connects to a Mojo application and returns a proxy to its exposed
964 // ServiceProvider.
ben80ab89052016-02-11 20:19:27965 mojo::shell::mojom::InterfaceProviderPtr ConnectToApplication(
966 const GURL& url);
rockotd9260982015-08-21 22:26:30967
dalecurtisa12e6062015-11-10 23:13:14968 // Returns the media delegate for WebMediaPlayer usage. If
969 // |media_player_delegate_| is NULL, one is created.
970 media::RendererWebMediaPlayerDelegate* GetWebMediaPlayerDelegate();
971
paulmeyer5d0a5f02016-01-21 20:15:52972 // Called to get the WebPlugin to handle find requests in the document.
973 // Returns nullptr if there is no such WebPlugin.
974 blink::WebPlugin* GetWebPluginForFind();
975
976 // Sends a reply to the current find operation handling if it was a
977 // synchronous find request.
978 void SendFindReply(int request_id,
979 int match_count,
980 int ordinal,
981 const blink::WebRect& selection_rect,
982 bool final_status_update);
983
creiscfaa4462015-03-16 19:27:18984 // Stores the WebLocalFrame we are associated with. This is null from the
ddorwinf63505e2016-01-08 00:54:50985 // constructor until BindToWebFrame is called, and it is null after
creiscfaa4462015-03-16 19:27:18986 // frameDetached is called until destruction (which is asynchronous in the
987 // case of the main frame, but not subframes).
[email protected]35b2a972014-04-04 15:50:22988 blink::WebLocalFrame* frame_;
[email protected]b70da4c2014-01-06 19:57:09989
dglazkov2e140f52015-09-28 16:10:07990 // Boolean value indicating whether this RenderFrameImpl object is for the
991 // main frame or not. It remains accurate during destruction, even when
992 // |frame_| has been invalidated.
993 bool is_main_frame_;
nasko8b9d9bd2015-05-06 19:23:19994
naskoeab5c5582015-12-15 05:20:00995 // When a frame is detached in response to a message from the browser process,
996 // this RenderFrame should not be sending notifications back to it. This
997 // boolean is used to indicate this case.
998 bool in_browser_initiated_detach_;
999
1000 // Indicates whether the frame has been inserted into the frame tree yet or
1001 // not.
1002 //
1003 // When a frame is created by the browser process, it is for a pending
1004 // navigation. In this case, it is not immediately attached to the frame tree
1005 // if there is a RenderFrameProxy for the same frame. It is inserted into the
1006 // frame tree at the time the pending navigation commits.
1007 // Frames added by the parent document are created from the renderer process
1008 // and are immediately inserted in the frame tree.
1009 // TODO(dcheng): Remove this once we have FrameTreeHandle and can use the
1010 // Blink Web* layer to check for provisional frames.
1011 bool in_frame_tree_;
1012
[email protected]abc501e2014-01-27 19:27:261013 base::WeakPtr<RenderViewImpl> render_view_;
[email protected]227692c52013-05-31 22:43:041014 int routing_id_;
[email protected]1c2052f2013-08-28 08:24:341015 bool is_swapped_out_;
nasko8b9d9bd2015-05-06 19:23:191016
[email protected]5a7100d2014-05-19 01:29:041017 // RenderFrameProxy exists only when is_swapped_out_ is true.
1018 // TODO(nasko): This can be removed once we don't have a swapped out state on
1019 // RenderFrame. See https://crbug.com/357747.
1020 RenderFrameProxy* render_frame_proxy_;
[email protected]1c2052f2013-08-28 08:24:341021 bool is_detaching_;
[email protected]227692c52013-05-31 22:43:041022
japhete6adf142014-10-31 00:01:491023 // If this frame was created to replace a proxy, this will store the routing
1024 // id of the proxy to replace at commit-time, at which time it will be
1025 // cleared.
1026 // TODO(creis): Remove this after switching to PlzNavigate.
1027 int proxy_routing_id_;
1028
dcheng3d886b732015-11-05 19:16:011029 // Non-null when the RenderFrame is a local root for compositing, input,
1030 // layout, etc. A local frame is also a local root iff it does not have a
1031 // parent that is a local frame.
kenrba7199832015-01-22 23:44:591032 scoped_refptr<RenderWidget> render_widget_;
1033
avi0392dbf52015-03-25 16:55:451034 // Temporarily holds state pertaining to a navigation that has been initiated
1035 // until the NavigationState corresponding to the new navigation is created in
1036 // didCreateDataSource().
1037 scoped_ptr<NavigationParams> pending_navigation_params_;
1038
creis8eb8ef22015-11-04 22:51:381039 // Stores the current history item for this frame, so that updates to it can
1040 // be reported to the browser process via SendUpdateState.
1041 blink::WebHistoryItem current_history_item_;
1042
[email protected]7a4e2532013-12-02 21:30:021043#if defined(ENABLE_PLUGINS)
[email protected]7a4e2532013-12-02 21:30:021044 // Current text input composition text. Empty if no composition is in
1045 // progress.
[email protected]fcf75d42013-12-03 20:11:261046 base::string16 pepper_composition_text_;
tommyclieb25b2a2014-11-03 19:45:091047
tommycli59bd86c2014-12-10 02:09:381048 PluginPowerSaverHelper* plugin_power_saver_helper_;
paulmeyer5d0a5f02016-01-21 20:15:521049
1050 PepperPluginInstanceImpl* plugin_find_handler_;
[email protected]7a4e2532013-12-02 21:30:021051#endif
1052
[email protected]f3add922013-12-20 23:17:161053 RendererWebCookieJarImpl cookie_jar_;
1054
[email protected]2e2d9632013-12-03 00:55:261055 // All the registered observers.
brettw236d3172015-06-03 16:31:431056 base::ObserverList<RenderFrameObserver> observers_;
[email protected]2e2d9632013-12-03 00:55:261057
[email protected]bffc8302014-01-23 20:52:161058 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_;
1059
[email protected]4ecee352014-03-11 21:12:191060 // The node that the context menu was pressed over.
1061 blink::WebNode context_menu_node_;
1062
[email protected]a09d53ce2014-01-31 00:46:421063 // External context menu requests we're waiting for. "Internal"
1064 // (WebKit-originated) context menu events will have an ID of 0 and will not
1065 // be in this map.
1066 //
1067 // We don't want to add internal ones since some of the "special" page
1068 // handlers in the browser process just ignore the context menu requests so
1069 // avoid showing context menus, and so this will cause right clicks to leak
1070 // entries in this map. Most users of the custom context menu (e.g. Pepper
1071 // plugins) are normally only on "regular" pages and the regular pages will
1072 // always respond properly to the request, so we don't have to worry so
1073 // much about leaks.
1074 IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_;
1075
[email protected]4ee64622014-03-21 22:34:151076 // The text selection the last time DidChangeSelection got called. May contain
1077 // additional characters before and after the selected text, for IMEs. The
1078 // portion of this string that is the actual selected text starts at index
1079 // |selection_range_.GetMin() - selection_text_offset_| and has length
1080 // |selection_range_.length()|.
1081 base::string16 selection_text_;
1082 // The offset corresponding to the start of |selection_text_| in the document.
1083 size_t selection_text_offset_;
1084 // Range over the document corresponding to the actual selected text (which
1085 // could correspond to a substring of |selection_text_|; see above).
1086 gfx::Range selection_range_;
1087 // Used to inform didChangeSelection() when it is called in the context
1088 // of handling a InputMsg_SelectRange IPC.
1089 bool handling_select_range_;
1090
[email protected]2626d142014-04-22 17:24:021091 // The next group of objects all implement RenderFrameObserver, so are deleted
1092 // along with the RenderFrame automatically. This is why we just store weak
1093 // references.
1094
[email protected]4459599e2014-07-29 22:40:091095 // Dispatches permission requests for Web Notifications.
1096 NotificationPermissionDispatcher* notification_permission_dispatcher_;
1097
[email protected]977db4a42014-07-17 08:04:321098 // Destroyed via the RenderFrameObserver::OnDestruct() mechanism.
perkj1a2d0432014-09-03 13:52:331099 UserMediaClientImpl* web_user_media_client_;
[email protected]96307312014-05-04 01:00:191100
jrummell109c3a602014-12-18 01:08:501101 // EncryptedMediaClient attached to this frame; lazily initialized.
xhwang430baee2015-01-22 05:46:201102 scoped_ptr<media::WebEncryptedMediaClientImpl> web_encrypted_media_client_;
jrummell109c3a602014-12-18 01:08:501103
xhwang6bca21e2016-02-06 00:21:451104 // The media permission dispatcher attached to this frame.
1105 scoped_ptr<MediaPermissionDispatcher> media_permission_dispatcher_;
xhwang36b1f3b2015-01-27 17:54:011106
xhwange70b7ee12015-06-25 09:17:171107#if defined(ENABLE_MOJO_MEDIA)
xhwangc0299ae32015-07-21 23:39:501108 // The media factory attached to this frame, lazily initialized.
1109 media::interfaces::ServiceFactoryPtr media_service_factory_;
xhwang065b54b2015-06-03 22:25:551110#endif
1111
[email protected]52d3e172014-06-16 16:57:021112 // MidiClient attached to this frame; lazily initialized.
1113 MidiDispatcher* midi_dispatcher_;
1114
[email protected]a017938b2014-05-27 21:17:171115#if defined(OS_ANDROID)
davve859f4f92015-11-27 10:16:191116 // Manages all media players and sessions in this render frame for
1117 // communicating with the real media player and sessions in the
1118 // browser process. It's okay to use raw pointers since they're both
1119 // RenderFrameObservers.
[email protected]a017938b2014-05-27 21:17:171120 RendererMediaPlayerManager* media_player_manager_;
davve859f4f92015-11-27 10:16:191121 RendererMediaSessionManager* media_session_manager_;
[email protected]4b556cf2014-06-10 23:21:531122#endif
1123
1124#if defined(ENABLE_BROWSER_CDMS)
1125 // Manage all CDMs in this render frame for communicating with the real CDM in
1126 // the browser process. It's okay to use a raw pointer since it's a
1127 // RenderFrameObserver.
[email protected]65f3d1aa2014-05-29 01:57:001128 RendererCdmManager* cdm_manager_;
[email protected]a017938b2014-05-27 21:17:171129#endif
1130
xhwangd7180832015-04-03 05:38:151131 // The CDM factory attached to this frame, lazily initialized.
xhwangf2eb532f2015-06-25 01:51:191132 scoped_ptr<media::CdmFactory> cdm_factory_;
xhwangd7180832015-04-03 05:38:151133
hubbe5f0ad43b2015-12-14 20:57:261134 // Media resource cache, lazily initialized.
1135 linked_ptr<media::UrlIndex> url_index_;
1136
[email protected]a6e21c372014-07-12 02:27:211137#if defined(VIDEO_HOLE)
1138 // Whether or not this RenderFrameImpl contains a media player. Used to
1139 // register as an observer for video-hole-specific events.
1140 bool contains_media_player_;
1141#endif
1142
dgozman358ba322015-03-26 15:05:301143 // The devtools agent for this frame; only created for main frame and
1144 // local roots.
1145 DevToolsAgent* devtools_agent_;
1146
alogvinovf50445a2015-10-30 13:00:121147 WakeLockDispatcher* wakelock_dispatcher_;
1148
[email protected]45920862014-07-02 12:53:021149 // The geolocation dispatcher attached to this frame, lazily initialized.
[email protected]8eae0802014-06-02 21:35:551150 GeolocationDispatcher* geolocation_dispatcher_;
1151
[email protected]45920862014-07-02 12:53:021152 // The push messaging dispatcher attached to this frame, lazily initialized.
1153 PushMessagingDispatcher* push_messaging_dispatcher_;
1154
avayvodbca35fad2015-01-29 20:20:571155 // The presentation dispatcher implementation attached to this frame, lazily
1156 // initialized.
1157 PresentationDispatcher* presentation_dispatcher_;
1158
rockotf8fdd9b2015-12-16 22:22:351159 ServiceRegistryImpl service_registry_;
[email protected]c52a1412014-06-25 06:09:251160
rockotd9260982015-08-21 22:26:301161 // The shell proxy used to connect to Mojo applications.
ben9aaf3032016-02-06 08:56:491162 mojo::shell::mojom::ShellPtr mojo_shell_;
rockotd9260982015-08-21 22:26:301163
[email protected]45920862014-07-02 12:53:021164 // The screen orientation dispatcher attached to the frame, lazily
1165 // initialized.
[email protected]cf78eda2014-06-13 16:57:411166 ScreenOrientationDispatcher* screen_orientation_dispatcher_;
1167
mlamouriefdca9d2014-09-16 16:55:401168 // The Manifest Manager handles the manifest requests from the browser
1169 // process.
1170 ManifestManager* manifest_manager_;
1171
[email protected]95640212014-07-26 18:14:301172 // The current accessibility mode.
1173 AccessibilityMode accessibility_mode_;
1174
1175 // Only valid if |accessibility_mode_| is anything other than
1176 // AccessibilityModeOff.
1177 RendererAccessibility* renderer_accessibility_;
1178
mlamouric6d31db2015-03-28 17:48:141179 scoped_ptr<PermissionDispatcher> permission_client_;
mlamouri670a86d2015-03-17 16:06:251180
benwells04ab5b962015-05-06 08:29:401181 scoped_ptr<blink::WebAppBannerClient> app_banner_client_;
1182
jyasskinf89a11b2015-07-21 00:27:481183 scoped_ptr<blink::WebBluetooth> bluetooth_;
1184
rockotd9260982015-08-21 22:26:301185 scoped_ptr<blink::WebUSBClient> usb_client_;
1186
dalecurtisa12e6062015-11-10 23:13:141187 // Manages play, pause notifications for WebMediaPlayer implementations; its
1188 // lifetime is tied to the RenderFrame via the RenderFrameObserver interface.
1189 media::RendererWebMediaPlayerDelegate* media_player_delegate_;
1190
megjablond5ac7d52015-10-22 23:56:121191 // Whether or not this RenderFrame is using Lo-Fi mode.
1192 bool is_using_lofi_;
1193
ellyjonesdb20fae12015-12-04 16:47:551194 // Whether or not this RenderFrame is currently pasting.
1195 bool is_pasting_;
1196
bajones02443532015-06-22 21:17:401197#if defined(ENABLE_WEBVR)
1198 // The VR dispatcher attached to the frame, lazily initialized.
1199 scoped_ptr<VRDispatcher> vr_dispatcher_;
1200#endif
1201
avi485e5fd62014-08-25 23:26:141202#if defined(OS_MACOSX) || defined(OS_ANDROID)
1203 // The external popup for the currently showing select popup.
1204 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
1205#endif
1206
[email protected]96307312014-05-04 01:00:191207 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1208
[email protected]227692c52013-05-31 22:43:041209 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1210};
1211
1212} // namespace content
1213
[email protected]85d85fd2013-06-19 00:57:411214#endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_