blob: 069888549f78e7e83165c115a0d359390f22ffd7 [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
[email protected]7a4e2532013-12-02 21:30:028#include <vector>
9
[email protected]227692c52013-05-31 22:43:0410#include "base/basictypes.h"
[email protected]7a4e2532013-12-02 21:30:0211#include "base/files/file_path.h"
[email protected]a09d53ce2014-01-31 00:46:4212#include "base/gtest_prod_util.h"
13#include "base/id_map.h"
[email protected]abc501e2014-01-27 19:27:2614#include "base/memory/weak_ptr.h"
[email protected]2e2d9632013-12-03 00:55:2615#include "base/observer_list.h"
[email protected]7a4e2532013-12-02 21:30:0216#include "base/process/process_handle.h"
[email protected]95640212014-07-26 18:14:3017#include "content/common/accessibility_mode_enums.h"
clamyda97e8322014-10-07 21:57:2518#include "content/common/frame_message_enums.h"
[email protected]c52a1412014-06-25 06:09:2519#include "content/common/mojo/service_registry_impl.h"
[email protected]87de04b02014-04-08 22:14:4920#include "content/public/common/javascript_message_type.h"
[email protected]65920f332014-03-04 21:14:1821#include "content/public/common/referrer.h"
[email protected]227692c52013-05-31 22:43:0422#include "content/public/renderer/render_frame.h"
[email protected]5a7100d2014-05-19 01:29:0423#include "content/renderer/render_frame_proxy.h"
[email protected]f3add922013-12-20 23:17:1624#include "content/renderer/renderer_webcookiejar_impl.h"
[email protected]227692c52013-05-31 22:43:0425#include "ipc/ipc_message.h"
acolwell9e0840d2014-09-06 19:01:3226#include "media/blink/webmediaplayer_delegate.h"
[email protected]95640212014-07-26 18:14:3027#include "third_party/WebKit/public/web/WebAXObject.h"
[email protected]85d85fd2013-06-19 00:57:4128#include "third_party/WebKit/public/web/WebDataSource.h"
29#include "third_party/WebKit/public/web/WebFrameClient.h"
[email protected]680575542014-04-03 17:12:5230#include "third_party/WebKit/public/web/WebHistoryCommitType.h"
[email protected]4ee64622014-03-21 22:34:1531#include "ui/gfx/range/range.h"
[email protected]227692c52013-05-31 22:43:0432
[email protected]a017938b2014-05-27 21:17:1733#if defined(OS_ANDROID)
34#include "content/renderer/media/android/renderer_media_player_manager.h"
35#endif
36
clamy9bfeef42014-09-30 20:50:4237class GURL;
[email protected]7a4e2532013-12-02 21:30:0238class TransportDIB;
[email protected]c6bc20332014-02-28 18:30:3939struct FrameMsg_Navigate_Params;
clamyda97e8322014-10-07 21:57:2540struct FrameMsg_CommitNavigation_Params;
[email protected]7a4e2532013-12-02 21:30:0241
42namespace blink {
[email protected]5ee7f182014-04-25 19:45:2643class WebGeolocationClient;
[email protected]5cdd8fd82014-02-05 20:12:1244class WebInputEvent;
[email protected]7a4e2532013-12-02 21:30:0245class WebMouseEvent;
[email protected]82ce5b92014-03-22 05:15:2646class WebContentDecryptionModule;
[email protected]96307312014-05-04 01:00:1947class WebMediaPlayer;
[email protected]1c048252014-04-11 23:27:3448class WebNotificationPresenter;
[email protected]45920862014-07-02 12:53:0249class WebPushClient;
[email protected]82ce5b92014-03-22 05:15:2650class WebSecurityOrigin;
[email protected]7a4e2532013-12-02 21:30:0251struct WebCompositionUnderline;
[email protected]a09d53ce2014-01-31 00:46:4252struct WebContextMenuData;
[email protected]7a4e2532013-12-02 21:30:0253struct WebCursorInfo;
54}
55
56namespace gfx {
[email protected]a09d53ce2014-01-31 00:46:4257class Point;
[email protected]7a4e2532013-12-02 21:30:0258class Range;
59class Rect;
60}
61
[email protected]227692c52013-05-31 22:43:0462namespace content {
63
[email protected]bffc8302014-01-23 20:52:1664class ChildFrameCompositingHelper;
avi485e5fd62014-08-25 23:26:1465class ExternalPopupMenu;
[email protected]8eae0802014-06-02 21:35:5566class GeolocationDispatcher;
mlamouriefdca9d2014-09-16 16:55:4067class ManifestManager;
[email protected]977db4a42014-07-17 08:04:3268class MediaStreamDispatcher;
[email protected]ae2477e2014-05-27 23:47:0869class MediaStreamRendererFactory;
[email protected]52d3e172014-06-16 16:57:0270class MidiDispatcher;
[email protected]4459599e2014-07-29 22:40:0971class NotificationPermissionDispatcher;
[email protected]2626d142014-04-22 17:24:0272class NotificationProvider;
clamyda97e8322014-10-07 21:57:2573class PageState;
[email protected]7a4e2532013-12-02 21:30:0274class PepperPluginInstanceImpl;
[email protected]45920862014-07-02 12:53:0275class PushMessagingDispatcher;
[email protected]95640212014-07-26 18:14:3076class RendererAccessibility;
[email protected]4b556cf2014-06-10 23:21:5377class RendererCdmManager;
78class RendererMediaPlayerManager;
[email protected]7a4e2532013-12-02 21:30:0279class RendererPpapiHost;
[email protected]2e2d9632013-12-03 00:55:2680class RenderFrameObserver;
[email protected]227692c52013-05-31 22:43:0481class RenderViewImpl;
[email protected]7a4e2532013-12-02 21:30:0282class RenderWidget;
83class RenderWidgetFullscreenPepper;
[email protected]cf78eda2014-06-13 16:57:4184class ScreenOrientationDispatcher;
perkj1a2d0432014-09-03 13:52:3385class UserMediaClientImpl;
clamy9bfeef42014-09-30 20:50:4286struct CommitNavigationParams;
87struct CommonNavigationParams;
[email protected]a09d53ce2014-01-31 00:46:4288struct CustomContextMenuContext;
davidbena5496d62014-10-07 18:52:0489struct ResourceResponseHead;
[email protected]227692c52013-05-31 22:43:0490
[email protected]85d85fd2013-06-19 00:57:4191class CONTENT_EXPORT RenderFrameImpl
92 : public RenderFrame,
[email protected]96307312014-05-04 01:00:1993 NON_EXPORTED_BASE(public blink::WebFrameClient),
acolwell9e0840d2014-09-06 19:01:3294 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) {
[email protected]227692c52013-05-31 22:43:0495 public:
[email protected]2f61bdd2013-07-02 18:38:4796 // Creates a new RenderFrame. |render_view| is the RenderView object that this
97 // frame belongs to.
[email protected]b70da4c2014-01-06 19:57:0998 // Callers *must* call |SetWebFrame| immediately after creation.
[email protected]82307f6b2014-08-07 03:30:1299 // Note: This is called only when RenderFrame is created by Blink through
100 // createChildFrame.
[email protected]b70da4c2014-01-06 19:57:09101 // TODO(creis): We should structure this so that |SetWebFrame| isn't needed.
[email protected]2f61bdd2013-07-02 18:38:47102 static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id);
103
[email protected]82307f6b2014-08-07 03:30:12104 // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame
105 // identified by |parent_routing_id| or as the top-level frame if the latter
106 // is MSG_ROUTING_NONE. It creates the Blink WebLocalFrame and inserts it in
107 // the proper place in the frame tree.
108 // Note: This is called only when RenderFrame is being created in response to
109 // IPC message from the browser process. All other frame creation is driven
110 // through Blink and Create.
111 static void CreateFrame(int routing_id, int parent_routing_id);
112
[email protected]5a7100d2014-05-19 01:29:04113 // Returns the RenderFrameImpl for the given routing ID.
114 static RenderFrameImpl* FromRoutingID(int routing_id);
115
[email protected]a5ac6dc2014-01-15 07:02:14116 // Just like RenderFrame::FromWebFrame but returns the implementation.
117 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame);
[email protected]b70da4c2014-01-06 19:57:09118
[email protected]2f61bdd2013-07-02 18:38:47119 // Used by content_layouttest_support to hook into the creation of
120 // RenderFrameImpls.
121 static void InstallCreateHook(
122 RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32));
123
[email protected]227692c52013-05-31 22:43:04124 virtual ~RenderFrameImpl();
125
[email protected]b70da4c2014-01-06 19:57:09126 bool is_swapped_out() const {
127 return is_swapped_out_;
128 }
129
[email protected]5a7100d2014-05-19 01:29:04130 // TODO(nasko): This can be removed once we don't have a swapped out state on
131 // RenderFrames. See https://crbug.com/357747.
132 void set_render_frame_proxy(RenderFrameProxy* proxy) {
133 render_frame_proxy_ = proxy;
134 }
135
[email protected]bffc8302014-01-23 20:52:16136 // Out-of-process child frames receive a signal from RenderWidgetCompositor
137 // when a compositor frame has committed.
138 void DidCommitCompositorFrame();
139
[email protected]7a4e2532013-12-02 21:30:02140 // TODO(jam): this is a temporary getter until all the code is transitioned
141 // to using RenderFrame instead of RenderView.
[email protected]abc501e2014-01-27 19:27:26142 RenderViewImpl* render_view() { return render_view_.get(); }
[email protected]7a4e2532013-12-02 21:30:02143
[email protected]f3add922013-12-20 23:17:16144 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; }
145
[email protected]7a4e2532013-12-02 21:30:02146 // Returns the RenderWidget associated with this frame.
147 RenderWidget* GetRenderWidget();
148
[email protected]35b2a972014-04-04 15:50:22149 // This is called right after creation with the WebLocalFrame for this
[email protected]0287e762014-04-11 13:07:58150 // RenderFrame. It must be called before Initialize.
[email protected]35b2a972014-04-04 15:50:22151 void SetWebFrame(blink::WebLocalFrame* web_frame);
[email protected]b70da4c2014-01-06 19:57:09152
[email protected]0287e762014-04-11 13:07:58153 // This method must be called after the frame has been added to the frame
154 // tree. It creates all objects that depend on the frame being at its proper
155 // spot.
156 void Initialize();
157
[email protected]de3c5d82014-05-28 22:12:59158 // Notifications from RenderWidget.
159 void WasHidden();
160 void WasShown();
161
[email protected]723971b2014-02-12 11:08:25162 // Start/Stop loading notifications.
163 // TODO(nasko): Those are page-level methods at this time and come from
164 // WebViewClient. We should move them to be WebFrameClient calls and put
165 // logic in the browser side to balance starts/stops.
[email protected]e3b10d12014-03-28 16:06:09166 // |to_different_document| will be true unless the load is a fragment
167 // navigation, or triggered by history.pushState/replaceState.
[email protected]6dd5c322014-03-12 07:58:46168 virtual void didStartLoading(bool to_different_document);
169 virtual void didStopLoading();
170 virtual void didChangeLoadProgress(double load_progress);
[email protected]723971b2014-02-12 11:08:25171
[email protected]95640212014-07-26 18:14:30172 AccessibilityMode accessibility_mode() {
173 return accessibility_mode_;
174 }
175
176 RendererAccessibility* renderer_accessibility() {
177 return renderer_accessibility_;
178 }
179
180 void HandleWebAccessibilityEvent(const blink::WebAXObject& obj,
181 blink::WebAXEvent event);
182
183 // TODO(dmazzoni): the only reason this is here is to plumb it through to
184 // RendererAccessibility. It should be part of RenderFrameObserver, once
185 // blink has a separate accessibility tree per frame.
186 void FocusedNodeChanged(const blink::WebNode& node);
187
[email protected]7a4e2532013-12-02 21:30:02188#if defined(ENABLE_PLUGINS)
[email protected]271ff5792013-12-04 22:29:31189 // Notification that a PPAPI plugin has been created.
190 void PepperPluginCreated(RendererPpapiHost* host);
191
[email protected]7a4e2532013-12-02 21:30:02192 // Notifies that |instance| has changed the cursor.
193 // This will update the cursor appearance if it is currently over the plugin
194 // instance.
195 void PepperDidChangeCursor(PepperPluginInstanceImpl* instance,
196 const blink::WebCursorInfo& cursor);
197
198 // Notifies that |instance| has received a mouse event.
199 void PepperDidReceiveMouseEvent(PepperPluginInstanceImpl* instance);
200
[email protected]7a4e2532013-12-02 21:30:02201 // Informs the render view that a PPAPI plugin has changed text input status.
202 void PepperTextInputTypeChanged(PepperPluginInstanceImpl* instance);
203 void PepperCaretPositionChanged(PepperPluginInstanceImpl* instance);
204
205 // Cancels current composition.
206 void PepperCancelComposition(PepperPluginInstanceImpl* instance);
207
208 // Informs the render view that a PPAPI plugin has changed selection.
209 void PepperSelectionChanged(PepperPluginInstanceImpl* instance);
210
211 // Creates a fullscreen container for a pepper plugin instance.
212 RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer(
213 PepperPluginInstanceImpl* plugin);
214
[email protected]7a4e2532013-12-02 21:30:02215 bool IsPepperAcceptingCompositionEvents() const;
216
217 // Notification that the given plugin has crashed.
218 void PluginCrashed(const base::FilePath& plugin_path,
219 base::ProcessId plugin_pid);
220
[email protected]7a4e2532013-12-02 21:30:02221 // Simulates IME events for testing purpose.
222 void SimulateImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26223 const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02224 const std::vector<blink::WebCompositionUnderline>& underlines,
225 int selection_start,
226 int selection_end);
[email protected]fcf75d42013-12-03 20:11:26227 void SimulateImeConfirmComposition(const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02228 const gfx::Range& replacement_range);
229
230 // TODO(jam): remove these once the IPC handler moves from RenderView to
231 // RenderFrame.
232 void OnImeSetComposition(
[email protected]fcf75d42013-12-03 20:11:26233 const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02234 const std::vector<blink::WebCompositionUnderline>& underlines,
235 int selection_start,
236 int selection_end);
237 void OnImeConfirmComposition(
[email protected]fcf75d42013-12-03 20:11:26238 const base::string16& text,
[email protected]7a4e2532013-12-02 21:30:02239 const gfx::Range& replacement_range,
240 bool keep_selection);
[email protected]7a4e2532013-12-02 21:30:02241#endif // ENABLE_PLUGINS
242
[email protected]977db4a42014-07-17 08:04:32243 // May return NULL in some cases, especially if userMediaClient() returns
244 // NULL.
245 MediaStreamDispatcher* GetMediaStreamDispatcher();
246
avi485e5fd62014-08-25 23:26:14247#if defined(OS_MACOSX) || defined(OS_ANDROID)
248 void DidHideExternalPopupMenu();
249#endif
250
[email protected]227692c52013-05-31 22:43:04251 // IPC::Sender
252 virtual bool Send(IPC::Message* msg) OVERRIDE;
253
254 // IPC::Listener
255 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
256
[email protected]271ff5792013-12-04 22:29:31257 // RenderFrame implementation:
[email protected]b849847b2013-12-10 21:57:58258 virtual RenderView* GetRenderView() OVERRIDE;
[email protected]60eca4eb2013-12-06 00:02:16259 virtual int GetRoutingID() OVERRIDE;
mlamouri862a2ed2014-09-10 15:14:54260 virtual blink::WebLocalFrame* GetWebFrame() OVERRIDE;
[email protected]d019e1a382013-12-11 17:52:06261 virtual WebPreferences& GetWebkitPreferences() OVERRIDE;
262 virtual int ShowContextMenu(ContextMenuClient* client,
263 const ContextMenuParams& params) OVERRIDE;
264 virtual void CancelContextMenu(int request_id) OVERRIDE;
[email protected]1a6d0112014-03-10 19:08:41265 virtual blink::WebNode GetContextMenuNode() const OVERRIDE;
[email protected]271ff5792013-12-04 22:29:31266 virtual blink::WebPlugin* CreatePlugin(
267 blink::WebFrame* frame,
268 const WebPluginInfo& info,
269 const blink::WebPluginParams& params) OVERRIDE;
[email protected]35b2a972014-04-04 15:50:22270 virtual void LoadURLExternally(blink::WebLocalFrame* frame,
271 const blink::WebURLRequest& request,
272 blink::WebNavigationPolicy policy) OVERRIDE;
[email protected]db3be76f2014-03-25 02:27:47273 virtual void ExecuteJavaScript(const base::string16& javascript) OVERRIDE;
[email protected]291abdb2014-06-05 14:19:11274 virtual bool IsHidden() OVERRIDE;
[email protected]c52a1412014-06-25 06:09:25275 virtual ServiceRegistry* GetServiceRegistry() OVERRIDE;
[email protected]59e94c162014-07-23 06:27:08276 virtual bool IsFTPDirectoryListing() OVERRIDE;
[email protected]2101c4c2014-08-22 00:16:16277 virtual void AttachGuest(int element_instance_id) OVERRIDE;
a.sarkar.arun530c5a62014-10-03 05:38:55278 virtual void SetSelectedText(const base::string16& selection_text,
279 size_t offset,
280 const gfx::Range& range) OVERRIDE;
[email protected]271ff5792013-12-04 22:29:31281
[email protected]96307312014-05-04 01:00:19282 // blink::WebFrameClient implementation:
[email protected]35b2a972014-04-04 15:50:22283 virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame,
284 const blink::WebPluginParams& params);
jrummell65b7d272014-09-24 20:49:27285 // TODO(jrummell): Remove this method once blink updated.
[email protected]180ef242013-11-07 06:50:46286 virtual blink::WebMediaPlayer* createMediaPlayer(
[email protected]35b2a972014-04-04 15:50:22287 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46288 const blink::WebURL& url,
289 blink::WebMediaPlayerClient* client);
jrummell65b7d272014-09-24 20:49:27290 virtual blink::WebMediaPlayer* createMediaPlayer(
291 blink::WebLocalFrame* frame,
292 const blink::WebURL& url,
293 blink::WebMediaPlayerClient* client,
294 blink::WebContentDecryptionModule* initial_cdm);
[email protected]82ce5b92014-03-22 05:15:26295 virtual blink::WebContentDecryptionModule* createContentDecryptionModule(
[email protected]35b2a972014-04-04 15:50:22296 blink::WebLocalFrame* frame,
[email protected]82ce5b92014-03-22 05:15:26297 const blink::WebSecurityOrigin& security_origin,
298 const blink::WebString& key_system);
[email protected]180ef242013-11-07 06:50:46299 virtual blink::WebApplicationCacheHost* createApplicationCacheHost(
[email protected]35b2a972014-04-04 15:50:22300 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46301 blink::WebApplicationCacheHostClient* client);
302 virtual blink::WebWorkerPermissionClientProxy*
[email protected]35b2a972014-04-04 15:50:22303 createWorkerPermissionClientProxy(blink::WebLocalFrame* frame);
[email protected]b20c3222014-08-22 00:50:22304 virtual blink::WebExternalPopupMenu* createExternalPopupMenu(
305 const blink::WebPopupMenuInfo& popup_menu_info,
306 blink::WebExternalPopupMenuClient* popup_menu_client);
[email protected]35b2a972014-04-04 15:50:22307 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame);
[email protected]180ef242013-11-07 06:50:46308 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider(
[email protected]35b2a972014-04-04 15:50:22309 blink::WebLocalFrame* frame);
310 virtual void didAccessInitialDocument(blink::WebLocalFrame* frame);
311 virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent,
312 const blink::WebString& name);
313 virtual void didDisownOpener(blink::WebLocalFrame* frame);
[email protected]180ef242013-11-07 06:50:46314 virtual void frameDetached(blink::WebFrame* frame);
[email protected]9c9343b2014-03-08 02:56:07315 virtual void frameFocused();
[email protected]180ef242013-11-07 06:50:46316 virtual void willClose(blink::WebFrame* frame);
[email protected]35b2a972014-04-04 15:50:22317 virtual void didChangeName(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46318 const blink::WebString& name);
[email protected]f5b6dd1122013-10-04 02:42:50319 virtual void didMatchCSS(
[email protected]35b2a972014-04-04 15:50:22320 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46321 const blink::WebVector<blink::WebString>& newly_matching_selectors,
322 const blink::WebVector<blink::WebString>& stopped_matching_selectors);
[email protected]c31a84802014-04-03 15:55:49323 virtual bool shouldReportDetailedMessageForSource(
324 const blink::WebString& source);
325 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message,
326 const blink::WebString& source_name,
327 unsigned source_line,
328 const blink::WebString& stack_trace);
[email protected]35b2a972014-04-04 15:50:22329 virtual void loadURLExternally(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46330 const blink::WebURLRequest& request,
[email protected]35b2a972014-04-04 15:50:22331 blink::WebNavigationPolicy policy,
332 const blink::WebString& suggested_name);
[email protected]1a4e9752013-12-31 20:10:58333 // The WebDataSource::ExtraData* is assumed to be a DocumentState* subclass.
[email protected]180ef242013-11-07 06:50:46334 virtual blink::WebNavigationPolicy decidePolicyForNavigation(
[email protected]0c3c54f2014-07-31 01:29:00335 const NavigationPolicyInfo& info);
[email protected]680575542014-04-03 17:12:52336 virtual blink::WebHistoryItem historyItemForNewChildFrame(
337 blink::WebFrame* frame);
[email protected]35b2a972014-04-04 15:50:22338 virtual void willSendSubmitEvent(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46339 const blink::WebFormElement& form);
[email protected]35b2a972014-04-04 15:50:22340 virtual void willSubmitForm(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46341 const blink::WebFormElement& form);
[email protected]35b2a972014-04-04 15:50:22342 virtual void didCreateDataSource(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46343 blink::WebDataSource* datasource);
[email protected]0c3c54f2014-07-31 01:29:00344 virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame,
345 bool is_transition_navigation);
[email protected]85d85fd2013-06-19 00:57:41346 virtual void didReceiveServerRedirectForProvisionalLoad(
[email protected]45d877f2014-04-05 07:36:22347 blink::WebLocalFrame* frame);
[email protected]85d85fd2013-06-19 00:57:41348 virtual void didFailProvisionalLoad(
[email protected]45d877f2014-04-05 07:36:22349 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46350 const blink::WebURLError& error);
[email protected]680575542014-04-03 17:12:52351 virtual void didCommitProvisionalLoad(
[email protected]45d877f2014-04-05 07:36:22352 blink::WebLocalFrame* frame,
[email protected]680575542014-04-03 17:12:52353 const blink::WebHistoryItem& item,
354 blink::WebHistoryCommitType commit_type);
[email protected]06181e52014-05-10 11:59:09355 virtual void didClearWindowObject(blink::WebLocalFrame* frame);
[email protected]35b2a972014-04-04 15:50:22356 virtual void didCreateDocumentElement(blink::WebLocalFrame* frame);
357 virtual void didReceiveTitle(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46358 const blink::WebString& title,
359 blink::WebTextDirection direction);
[email protected]35b2a972014-04-04 15:50:22360 virtual void didChangeIcon(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46361 blink::WebIconURL::Type icon_type);
[email protected]35b2a972014-04-04 15:50:22362 virtual void didFinishDocumentLoad(blink::WebLocalFrame* frame);
363 virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame);
364 virtual void didFailLoad(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46365 const blink::WebURLError& error);
[email protected]45d877f2014-04-05 07:36:22366 virtual void didFinishLoad(blink::WebLocalFrame* frame);
367 virtual void didNavigateWithinPage(blink::WebLocalFrame* frame,
[email protected]680575542014-04-03 17:12:52368 const blink::WebHistoryItem& item,
369 blink::WebHistoryCommitType commit_type);
[email protected]35b2a972014-04-04 15:50:22370 virtual void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame);
[email protected]9e6bea412014-08-08 06:35:25371 virtual void addNavigationTransitionData(
372 const blink::WebString& allowedDestinationOrigin,
373 const blink::WebString& selector,
374 const blink::WebString& markup);
[email protected]37b64c52014-07-11 21:14:05375 virtual void didChangeThemeColor();
[email protected]4459599e2014-07-29 22:40:09376 virtual void requestNotificationPermission(
377 const blink::WebSecurityOrigin& origin,
378 blink::WebNotificationPermissionCallback* callback);
[email protected]1c048252014-04-11 23:27:34379 virtual blink::WebNotificationPresenter* notificationPresenter();
[email protected]c3f2c702014-03-19 23:39:48380 virtual void didChangeSelection(bool is_empty_selection);
[email protected]f3c59d62014-04-09 16:33:55381 virtual blink::WebColorChooser* createColorChooser(
[email protected]eb8c216a2014-04-09 19:19:19382 blink::WebColorChooserClient* client,
[email protected]f3c59d62014-04-09 16:33:55383 const blink::WebColor& initial_color,
384 const blink::WebVector<blink::WebColorSuggestion>& suggestions);
[email protected]87de04b02014-04-08 22:14:49385 virtual void runModalAlertDialog(const blink::WebString& message);
386 virtual bool runModalConfirmDialog(const blink::WebString& message);
387 virtual bool runModalPromptDialog(const blink::WebString& message,
388 const blink::WebString& default_value,
389 blink::WebString* actual_value);
390 virtual bool runModalBeforeUnloadDialog(bool is_reload,
391 const blink::WebString& message);
[email protected]12cc5112014-03-03 17:01:10392 virtual void showContextMenu(const blink::WebContextMenuData& data);
[email protected]91070342014-03-07 00:29:02393 virtual void clearContextMenu();
[email protected]35b2a972014-04-04 15:50:22394 virtual void willSendRequest(blink::WebLocalFrame* frame,
395 unsigned identifier,
396 blink::WebURLRequest& request,
397 const blink::WebURLResponse& redirect_response);
398 virtual void didReceiveResponse(blink::WebLocalFrame* frame,
399 unsigned identifier,
400 const blink::WebURLResponse& response);
401 virtual void didFinishResourceLoad(blink::WebLocalFrame* frame,
[email protected]255eea092013-06-28 17:19:14402 unsigned identifier);
[email protected]85d85fd2013-06-19 00:57:41403 virtual void didLoadResourceFromMemoryCache(
[email protected]35b2a972014-04-04 15:50:22404 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46405 const blink::WebURLRequest& request,
406 const blink::WebURLResponse& response);
[email protected]35b2a972014-04-04 15:50:22407 virtual void didDisplayInsecureContent(blink::WebLocalFrame* frame);
408 virtual void didRunInsecureContent(blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46409 const blink::WebSecurityOrigin& origin,
410 const blink::WebURL& target);
[email protected]35b2a972014-04-04 15:50:22411 virtual void didAbortLoading(blink::WebLocalFrame* frame);
412 virtual void didCreateScriptContext(blink::WebLocalFrame* frame,
[email protected]85d85fd2013-06-19 00:57:41413 v8::Handle<v8::Context> context,
414 int extension_group,
[email protected]255eea092013-06-28 17:19:14415 int world_id);
[email protected]35b2a972014-04-04 15:50:22416 virtual void willReleaseScriptContext(blink::WebLocalFrame* frame,
[email protected]85d85fd2013-06-19 00:57:41417 v8::Handle<v8::Context> context,
[email protected]255eea092013-06-28 17:19:14418 int world_id);
[email protected]35b2a972014-04-04 15:50:22419 virtual void didFirstVisuallyNonEmptyLayout(blink::WebLocalFrame* frame);
[email protected]35b2a972014-04-04 15:50:22420 virtual void didChangeScrollOffset(blink::WebLocalFrame* frame);
421 virtual void willInsertBody(blink::WebLocalFrame* frame);
[email protected]85d85fd2013-06-19 00:57:41422 virtual void reportFindInPageMatchCount(int request_id,
423 int count,
[email protected]255eea092013-06-28 17:19:14424 bool final_update);
[email protected]85d85fd2013-06-19 00:57:41425 virtual void reportFindInPageSelection(int request_id,
426 int active_match_ordinal,
[email protected]180ef242013-11-07 06:50:46427 const blink::WebRect& sel);
[email protected]35b2a972014-04-04 15:50:22428 virtual void requestStorageQuota(blink::WebLocalFrame* frame,
429 blink::WebStorageQuotaType type,
430 unsigned long long requested_size,
431 blink::WebStorageQuotaCallbacks callbacks);
[email protected]85d85fd2013-06-19 00:57:41432 virtual void willOpenSocketStream(
[email protected]180ef242013-11-07 06:50:46433 blink::WebSocketStreamHandle* handle);
[email protected]a14903e02014-06-02 07:35:12434 virtual void willOpenWebSocket(blink::WebSocketHandle* handle);
[email protected]5ee7f182014-04-25 19:45:26435 virtual blink::WebGeolocationClient* geolocationClient();
[email protected]45920862014-07-02 12:53:02436 virtual blink::WebPushClient* pushClient();
[email protected]85d85fd2013-06-19 00:57:41437 virtual void willStartUsingPeerConnectionHandler(
[email protected]35b2a972014-04-04 15:50:22438 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:46439 blink::WebRTCPeerConnectionHandler* handler);
[email protected]bfe45e22014-04-25 16:47:53440 virtual blink::WebUserMediaClient* userMediaClient();
[email protected]8538385f2014-04-25 19:45:04441 virtual blink::WebMIDIClient* webMIDIClient();
[email protected]85d85fd2013-06-19 00:57:41442 virtual bool willCheckAndDispatchMessageEvent(
[email protected]ce5064f2014-05-07 22:49:20443 blink::WebLocalFrame* source_frame,
444 blink::WebFrame* target_frame,
445 blink::WebSecurityOrigin target_origin,
[email protected]180ef242013-11-07 06:50:46446 blink::WebDOMMessageEvent event);
[email protected]35b2a972014-04-04 15:50:22447 virtual blink::WebString userAgentOverride(blink::WebLocalFrame* frame,
448 const blink::WebURL& url);
449 virtual blink::WebString doNotTrackValue(blink::WebLocalFrame* frame);
450 virtual bool allowWebGL(blink::WebLocalFrame* frame, bool default_value);
451 virtual void didLoseWebGLContext(blink::WebLocalFrame* frame,
[email protected]255eea092013-06-28 17:19:14452 int arb_robustness_status_code);
[email protected]5cdd8fd82014-02-05 20:12:12453 virtual void forwardInputEvent(const blink::WebInputEvent* event);
[email protected]cf78eda2014-06-13 16:57:41454 virtual blink::WebScreenOrientationClient* webScreenOrientationClient();
horo96d38da2014-09-10 10:32:03455 virtual bool isControlledByServiceWorker();
dmazzoni0b5d2482014-09-10 19:45:57456 virtual void postAccessibilityEvent(const blink::WebAXObject& obj,
457 blink::WebAXEvent event);
mlamouriefdca9d2014-09-16 16:55:40458 virtual void didChangeManifest(blink::WebLocalFrame*);
[email protected]85d85fd2013-06-19 00:57:41459
[email protected]96307312014-05-04 01:00:19460 // WebMediaPlayerDelegate implementation:
461 virtual void DidPlay(blink::WebMediaPlayer* player) OVERRIDE;
462 virtual void DidPause(blink::WebMediaPlayer* player) OVERRIDE;
463 virtual void PlayerGone(blink::WebMediaPlayer* player) OVERRIDE;
464
[email protected]c6bc20332014-02-28 18:30:39465 // TODO(nasko): Make all tests in RenderViewImplTest friends and then move
466 // this back to private member.
467 void OnNavigate(const FrameMsg_Navigate_Params& params);
468
[email protected]c52a1412014-06-25 06:09:25469 // Binds this render frame's service registry to a handle to the remote
470 // service registry.
471 void BindServiceRegistry(
472 mojo::ScopedMessagePipeHandle service_provider_handle);
473
mlamouri4fff1992014-09-30 11:22:46474 ManifestManager* manifest_manager();
475
[email protected]2f61bdd2013-07-02 18:38:47476 protected:
477 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id);
478
[email protected]227692c52013-05-31 22:43:04479 private:
[email protected]2e2d9632013-12-03 00:55:26480 friend class RenderFrameObserver;
[email protected]95640212014-07-26 18:14:30481 friend class RendererAccessibilityTest;
avi485e5fd62014-08-25 23:26:14482 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
483 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
484 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
485 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
[email protected]66bbadaf2014-03-28 16:25:54486 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
487 AccessibilityMessagesQueueWhileSwappedOut);
[email protected]4ee64622014-03-21 22:34:15488 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
489 OnExtendSelectionAndDelete);
[email protected]66bbadaf2014-03-28 16:25:54490 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut);
491 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK);
[email protected]4ee64622014-03-21 22:34:15492 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
493 SetEditableSelectionAndComposition);
[email protected]95640212014-07-26 18:14:30494 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
495 OnSetAccessibilityMode);
[email protected]2e2d9632013-12-03 00:55:26496
[email protected]37567b432014-02-12 01:12:22497 typedef std::map<GURL, double> HostZoomLevels;
498
[email protected]2e2d9632013-12-03 00:55:26499 // Functions to add and remove observers for this object.
500 void AddObserver(RenderFrameObserver* observer);
501 void RemoveObserver(RenderFrameObserver* observer);
[email protected]1c2052f2013-08-28 08:24:34502
[email protected]f0906a02014-08-07 07:18:55503 // Builds and sends DidCommitProvisionalLoad to the host.
504 void SendDidCommitProvisionalLoad(blink::WebFrame* frame);
[email protected]37567b432014-02-12 01:12:22505
[email protected]9c9343b2014-03-08 02:56:07506 // Gets the focused element. If no such element exists then the element will
507 // be NULL.
508 blink::WebElement GetFocusedElement();
509
[email protected]b70da4c2014-01-06 19:57:09510 // IPC message handlers ------------------------------------------------------
511 //
512 // The documentation for these functions should be in
513 // content/common/*_messages.h for the message that the function is handling.
[email protected]f76f32232014-03-11 17:36:17514 void OnBeforeUnload();
[email protected]5a7100d2014-05-19 01:29:04515 void OnSwapOut(int proxy_routing_id);
Nasko Oskov85f60222014-08-28 22:53:30516 void OnStop();
[email protected]a09d53ce2014-01-31 00:46:42517 void OnShowContextMenu(const gfx::Point& location);
518 void OnContextMenuClosed(const CustomContextMenuContext& custom_context);
519 void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context,
520 unsigned action);
[email protected]4ee64622014-03-21 22:34:15521 void OnUndo();
522 void OnRedo();
[email protected]9c9343b2014-03-08 02:56:07523 void OnCut();
524 void OnCopy();
525 void OnPaste();
[email protected]4ee64622014-03-21 22:34:15526 void OnPasteAndMatchStyle();
527 void OnDelete();
528 void OnSelectAll();
529 void OnSelectRange(const gfx::Point& start, const gfx::Point& end);
530 void OnUnselect();
[email protected]1f3fc1d2014-04-03 14:50:17531 void OnReplace(const base::string16& text);
532 void OnReplaceMisspelling(const base::string16& text);
[email protected]e31b8ebb2014-03-07 17:59:34533 void OnCSSInsertRequest(const std::string& css);
[email protected]f13ab892014-03-12 06:48:52534 void OnJavaScriptExecuteRequest(const base::string16& javascript,
535 int id,
536 bool notify_result);
zeeshanq3454e9c2014-09-04 21:30:28537 void OnJavaScriptExecuteRequestForTests(const base::string16& javascript,
538 int id,
539 bool notify_result);
[email protected]4ee64622014-03-21 22:34:15540 void OnSetEditableSelectionOffsets(int start, int end);
[email protected]e5e438d62014-03-27 21:47:16541 void OnSetCompositionFromExistingText(
542 int start, int end,
543 const std::vector<blink::WebCompositionUnderline>& underlines);
544 void OnExtendSelectionAndDelete(int before, int after);
[email protected]4fed3702014-04-01 09:08:00545 void OnReload(bool ignore_cache);
[email protected]96bb6132014-06-16 17:22:19546 void OnTextSurroundingSelectionRequest(size_t max_length);
[email protected]2e531f72014-06-20 23:23:39547 void OnAddStyleSheetByURL(const std::string& url);
[email protected]9e6bea412014-08-08 06:35:25548 void OnSetupTransitionView(const std::string& markup);
549 void OnBeginExitTransition(const std::string& css_selector);
[email protected]95640212014-07-26 18:14:30550 void OnSetAccessibilityMode(AccessibilityMode new_mode);
creisbbbeb062014-08-25 18:20:31551 void OnDisownOpener();
avi485e5fd62014-08-25 23:26:14552#if defined(OS_ANDROID)
553 void OnSelectPopupMenuItems(bool canceled,
554 const std::vector<int>& selected_indices);
555#elif defined(OS_MACOSX)
556 void OnSelectPopupMenuItem(int selected_index);
[email protected]4ee64622014-03-21 22:34:15557 void OnCopyToFindPboard();
558#endif
[email protected]9c9343b2014-03-08 02:56:07559
clamy9bfeef42014-09-30 20:50:42560 // PlzNavigate
davidbena5496d62014-10-07 18:52:04561 void OnCommitNavigation(const ResourceResponseHead& response,
562 const GURL& stream_url,
clamy9bfeef42014-09-30 20:50:42563 const CommonNavigationParams& common_params,
564 const CommitNavigationParams& commit_params);
565
[email protected]65920f332014-03-04 21:14:18566 // Virtual since overridden by WebTestProxy for layout tests.
567 virtual blink::WebNavigationPolicy DecidePolicyForNavigation(
568 RenderFrame* render_frame,
[email protected]0c3c54f2014-07-31 01:29:00569 const NavigationPolicyInfo& info);
[email protected]65920f332014-03-04 21:14:18570 void OpenURL(blink::WebFrame* frame,
571 const GURL& url,
572 const Referrer& referrer,
573 blink::WebNavigationPolicy policy);
[email protected]a09d53ce2014-01-31 00:46:42574
[email protected]ef3adfc2014-05-11 00:04:54575 // Update current main frame's encoding and send it to browser window.
576 // Since we want to let users see the right encoding info from menu
577 // before finishing loading, we call the UpdateEncoding in
578 // a) function:DidCommitLoadForFrame. When this function is called,
579 // that means we have got first data. In here we try to get encoding
580 // of page if it has been specified in http header.
581 // b) function:DidReceiveTitle. When this function is called,
582 // that means we have got specified title. Because in most of webpages,
583 // title tags will follow meta tags. In here we try to get encoding of
584 // page if it has been specified in meta tag.
585 // c) function:DidFinishDocumentLoadForFrame. When this function is
586 // called, that means we have got whole html page. In here we should
587 // finally get right encoding of page.
588 void UpdateEncoding(blink::WebFrame* frame,
589 const std::string& encoding_name);
590
[email protected]4ee64622014-03-21 22:34:15591 // Dispatches the current state of selection on the webpage to the browser if
592 // it has changed.
593 // TODO(varunjain): delete this method once we figure out how to keep
594 // selection handles in sync with the webpage.
595 void SyncSelectionIfRequired();
596
[email protected]87de04b02014-04-08 22:14:49597 bool RunJavaScriptMessage(JavaScriptMessageType type,
598 const base::string16& message,
599 const base::string16& default_value,
600 const GURL& frame_url,
601 base::string16* result);
602
[email protected]457736d2014-04-30 15:54:27603 // Loads the appropriate error page for the specified failure into the frame.
604 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request,
605 const blink::WebURLError& error,
606 bool replace);
607
zeeshanq3454e9c2014-09-04 21:30:28608 void HandleJavascriptExecutionResult(const base::string16& javascript,
609 int id,
610 bool notify_result,
611 v8::Handle<v8::Value> result);
612
[email protected]977db4a42014-07-17 08:04:32613 // Initializes |web_user_media_client_|. If this fails, because it wasn't
614 // possible to create a MediaStreamClient (e.g., WebRTC is disabled), then
615 // |web_user_media_client_| will remain NULL.
616 void InitializeUserMediaClient();
[email protected]96307312014-05-04 01:00:19617
618 blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream(
619 const blink::WebURL& url,
620 blink::WebMediaPlayerClient* client);
621
[email protected]ae2477e2014-05-27 23:47:08622 // Creates a factory object used for creating audio and video renderers.
623 // The method is virtual so that layouttests can override it.
624 virtual scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory();
625
clamyda97e8322014-10-07 21:57:25626 // Checks that the RenderView is ready to display the navigation to |url|. If
627 // the return value is false, the navigation should be abandonned.
628 bool PrepareRenderViewForNavigation(
629 const GURL& url,
630 FrameMsg_Navigate_Type::Value navigate_type,
631 const PageState& state,
632 bool check_history,
633 int pending_history_list_offset,
634 int32 page_id,
635 bool* is_reload,
636 blink::WebURLRequest::CachePolicy* cache_policy);
637
[email protected]f3a95312014-06-12 16:46:58638 // Returns the URL being loaded by the |frame_|'s request.
639 GURL GetLoadingUrl() const;
640
[email protected]96307312014-05-04 01:00:19641#if defined(OS_ANDROID)
[email protected]65f3d1aa2014-05-29 01:57:00642 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
[email protected]96307312014-05-04 01:00:19643 const blink::WebURL& url,
jrummell65b7d272014-09-24 20:49:27644 blink::WebMediaPlayerClient* client,
645 blink::WebContentDecryptionModule* initial_cdm);
[email protected]a017938b2014-05-27 21:17:17646
[email protected]65f3d1aa2014-05-29 01:57:00647 RendererMediaPlayerManager* GetMediaPlayerManager();
[email protected]4b556cf2014-06-10 23:21:53648#endif
649
650#if defined(ENABLE_BROWSER_CDMS)
[email protected]65f3d1aa2014-05-29 01:57:00651 RendererCdmManager* GetCdmManager();
[email protected]96307312014-05-04 01:00:19652#endif
653
[email protected]35b2a972014-04-04 15:50:22654 // Stores the WebLocalFrame we are associated with.
655 blink::WebLocalFrame* frame_;
[email protected]b70da4c2014-01-06 19:57:09656
[email protected]abc501e2014-01-27 19:27:26657 base::WeakPtr<RenderViewImpl> render_view_;
[email protected]227692c52013-05-31 22:43:04658 int routing_id_;
[email protected]1c2052f2013-08-28 08:24:34659 bool is_swapped_out_;
[email protected]5a7100d2014-05-19 01:29:04660 // RenderFrameProxy exists only when is_swapped_out_ is true.
661 // TODO(nasko): This can be removed once we don't have a swapped out state on
662 // RenderFrame. See https://crbug.com/357747.
663 RenderFrameProxy* render_frame_proxy_;
[email protected]1c2052f2013-08-28 08:24:34664 bool is_detaching_;
[email protected]227692c52013-05-31 22:43:04665
[email protected]7a4e2532013-12-02 21:30:02666#if defined(ENABLE_PLUGINS)
[email protected]7a4e2532013-12-02 21:30:02667 // Current text input composition text. Empty if no composition is in
668 // progress.
[email protected]fcf75d42013-12-03 20:11:26669 base::string16 pepper_composition_text_;
[email protected]7a4e2532013-12-02 21:30:02670#endif
671
[email protected]f3add922013-12-20 23:17:16672 RendererWebCookieJarImpl cookie_jar_;
673
[email protected]2e2d9632013-12-03 00:55:26674 // All the registered observers.
675 ObserverList<RenderFrameObserver> observers_;
676
[email protected]bffc8302014-01-23 20:52:16677 scoped_refptr<ChildFrameCompositingHelper> compositing_helper_;
678
[email protected]4ecee352014-03-11 21:12:19679 // The node that the context menu was pressed over.
680 blink::WebNode context_menu_node_;
681
[email protected]a09d53ce2014-01-31 00:46:42682 // External context menu requests we're waiting for. "Internal"
683 // (WebKit-originated) context menu events will have an ID of 0 and will not
684 // be in this map.
685 //
686 // We don't want to add internal ones since some of the "special" page
687 // handlers in the browser process just ignore the context menu requests so
688 // avoid showing context menus, and so this will cause right clicks to leak
689 // entries in this map. Most users of the custom context menu (e.g. Pepper
690 // plugins) are normally only on "regular" pages and the regular pages will
691 // always respond properly to the request, so we don't have to worry so
692 // much about leaks.
693 IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_;
694
[email protected]4ee64622014-03-21 22:34:15695 // The text selection the last time DidChangeSelection got called. May contain
696 // additional characters before and after the selected text, for IMEs. The
697 // portion of this string that is the actual selected text starts at index
698 // |selection_range_.GetMin() - selection_text_offset_| and has length
699 // |selection_range_.length()|.
700 base::string16 selection_text_;
701 // The offset corresponding to the start of |selection_text_| in the document.
702 size_t selection_text_offset_;
703 // Range over the document corresponding to the actual selected text (which
704 // could correspond to a substring of |selection_text_|; see above).
705 gfx::Range selection_range_;
706 // Used to inform didChangeSelection() when it is called in the context
707 // of handling a InputMsg_SelectRange IPC.
708 bool handling_select_range_;
709
[email protected]2626d142014-04-22 17:24:02710 // The next group of objects all implement RenderFrameObserver, so are deleted
711 // along with the RenderFrame automatically. This is why we just store weak
712 // references.
713
[email protected]4459599e2014-07-29 22:40:09714 // Dispatches permission requests for Web Notifications.
715 NotificationPermissionDispatcher* notification_permission_dispatcher_;
716
[email protected]2626d142014-04-22 17:24:02717 // Holds a reference to the service which provides desktop notifications.
[email protected]4459599e2014-07-29 22:40:09718 // TODO(peter) Remove this once Web Notifications are routed through Platform.
[email protected]2626d142014-04-22 17:24:02719 NotificationProvider* notification_provider_;
720
[email protected]977db4a42014-07-17 08:04:32721 // Destroyed via the RenderFrameObserver::OnDestruct() mechanism.
perkj1a2d0432014-09-03 13:52:33722 UserMediaClientImpl* web_user_media_client_;
[email protected]96307312014-05-04 01:00:19723
[email protected]52d3e172014-06-16 16:57:02724 // MidiClient attached to this frame; lazily initialized.
725 MidiDispatcher* midi_dispatcher_;
726
[email protected]a017938b2014-05-27 21:17:17727#if defined(OS_ANDROID)
[email protected]4b556cf2014-06-10 23:21:53728 // Manages all media players in this render frame for communicating with the
729 // real media player in the browser process. It's okay to use a raw pointer
730 // since it's a RenderFrameObserver.
[email protected]a017938b2014-05-27 21:17:17731 RendererMediaPlayerManager* media_player_manager_;
[email protected]4b556cf2014-06-10 23:21:53732#endif
733
734#if defined(ENABLE_BROWSER_CDMS)
735 // Manage all CDMs in this render frame for communicating with the real CDM in
736 // the browser process. It's okay to use a raw pointer since it's a
737 // RenderFrameObserver.
[email protected]65f3d1aa2014-05-29 01:57:00738 RendererCdmManager* cdm_manager_;
[email protected]a017938b2014-05-27 21:17:17739#endif
740
[email protected]a6e21c372014-07-12 02:27:21741#if defined(VIDEO_HOLE)
742 // Whether or not this RenderFrameImpl contains a media player. Used to
743 // register as an observer for video-hole-specific events.
744 bool contains_media_player_;
745#endif
746
[email protected]45920862014-07-02 12:53:02747 // The geolocation dispatcher attached to this frame, lazily initialized.
[email protected]8eae0802014-06-02 21:35:55748 GeolocationDispatcher* geolocation_dispatcher_;
749
[email protected]45920862014-07-02 12:53:02750 // The push messaging dispatcher attached to this frame, lazily initialized.
751 PushMessagingDispatcher* push_messaging_dispatcher_;
752
[email protected]c52a1412014-06-25 06:09:25753 ServiceRegistryImpl service_registry_;
754
[email protected]45920862014-07-02 12:53:02755 // The screen orientation dispatcher attached to the frame, lazily
756 // initialized.
[email protected]cf78eda2014-06-13 16:57:41757 ScreenOrientationDispatcher* screen_orientation_dispatcher_;
758
mlamouriefdca9d2014-09-16 16:55:40759 // The Manifest Manager handles the manifest requests from the browser
760 // process.
761 ManifestManager* manifest_manager_;
762
[email protected]95640212014-07-26 18:14:30763 // The current accessibility mode.
764 AccessibilityMode accessibility_mode_;
765
766 // Only valid if |accessibility_mode_| is anything other than
767 // AccessibilityModeOff.
768 RendererAccessibility* renderer_accessibility_;
769
avi485e5fd62014-08-25 23:26:14770#if defined(OS_MACOSX) || defined(OS_ANDROID)
771 // The external popup for the currently showing select popup.
772 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
773#endif
774
[email protected]96307312014-05-04 01:00:19775 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
776
[email protected]227692c52013-05-31 22:43:04777 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
778};
779
780} // namespace content
781
[email protected]85d85fd2013-06-19 00:57:41782#endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_