[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 1 | // 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] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 8 | #include <vector> |
| 9 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 10 | #include "base/basictypes.h" |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 11 | #include "base/files/file_path.h" |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 12 | #include "base/gtest_prod_util.h" |
| 13 | #include "base/id_map.h" |
[email protected] | abc501e | 2014-01-27 19:27:26 | [diff] [blame] | 14 | #include "base/memory/weak_ptr.h" |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 15 | #include "base/observer_list.h" |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 16 | #include "base/process/process_handle.h" |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 17 | #include "content/common/accessibility_mode_enums.h" |
clamy | da97e832 | 2014-10-07 21:57:25 | [diff] [blame] | 18 | #include "content/common/frame_message_enums.h" |
[email protected] | c52a141 | 2014-06-25 06:09:25 | [diff] [blame] | 19 | #include "content/common/mojo/service_registry_impl.h" |
[email protected] | 87de04b0 | 2014-04-08 22:14:49 | [diff] [blame] | 20 | #include "content/public/common/javascript_message_type.h" |
[email protected] | 65920f33 | 2014-03-04 21:14:18 | [diff] [blame] | 21 | #include "content/public/common/referrer.h" |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 22 | #include "content/public/renderer/render_frame.h" |
[email protected] | 5a7100d | 2014-05-19 01:29:04 | [diff] [blame] | 23 | #include "content/renderer/render_frame_proxy.h" |
[email protected] | f3add92 | 2013-12-20 23:17:16 | [diff] [blame] | 24 | #include "content/renderer/renderer_webcookiejar_impl.h" |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 25 | #include "ipc/ipc_message.h" |
acolwell | 9e0840d | 2014-09-06 19:01:32 | [diff] [blame] | 26 | #include "media/blink/webmediaplayer_delegate.h" |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 27 | #include "third_party/WebKit/public/web/WebAXObject.h" |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 28 | #include "third_party/WebKit/public/web/WebDataSource.h" |
| 29 | #include "third_party/WebKit/public/web/WebFrameClient.h" |
[email protected] | 68057554 | 2014-04-03 17:12:52 | [diff] [blame] | 30 | #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
zhenw | d47fd72 | 2014-11-13 00:43:47 | [diff] [blame] | 31 | #include "third_party/WebKit/public/web/WebTransitionElementData.h" |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 32 | #include "ui/gfx/range/range.h" |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 33 | |
tommycli | d481c48 | 2014-12-03 01:50:41 | [diff] [blame] | 34 | #if defined(ENABLE_PLUGINS) |
tommycli | 59bd86c | 2014-12-10 02:09:38 | [diff] [blame] | 35 | #include "content/renderer/pepper/plugin_power_saver_helper.h" |
tommycli | d481c48 | 2014-12-03 01:50:41 | [diff] [blame] | 36 | #endif |
| 37 | |
[email protected] | a017938b | 2014-05-27 21:17:17 | [diff] [blame] | 38 | #if defined(OS_ANDROID) |
| 39 | #include "content/renderer/media/android/renderer_media_player_manager.h" |
| 40 | #endif |
| 41 | |
clamy | 9bfeef4 | 2014-09-30 20:50:42 | [diff] [blame] | 42 | class GURL; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 43 | class TransportDIB; |
zhenw | 70986bd | 2014-10-20 18:50:26 | [diff] [blame] | 44 | struct FrameHostMsg_AddNavigationTransitionData_Params; |
[email protected] | c6bc2033 | 2014-02-28 18:30:39 | [diff] [blame] | 45 | struct FrameMsg_Navigate_Params; |
clamy | 79b3da6 | 2014-10-14 08:50:37 | [diff] [blame] | 46 | struct FrameMsg_RequestNavigation_Params; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 47 | |
| 48 | namespace blink { |
[email protected] | 5ee7f18 | 2014-04-25 19:45:26 | [diff] [blame] | 49 | class WebGeolocationClient; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 50 | class WebMouseEvent; |
[email protected] | 82ce5b9 | 2014-03-22 05:15:26 | [diff] [blame] | 51 | class WebContentDecryptionModule; |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 52 | class WebMediaPlayer; |
[email protected] | 4592086 | 2014-07-02 12:53:02 | [diff] [blame] | 53 | class WebPushClient; |
[email protected] | 82ce5b9 | 2014-03-22 05:15:26 | [diff] [blame] | 54 | class WebSecurityOrigin; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 55 | struct WebCompositionUnderline; |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 56 | struct WebContextMenuData; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 57 | struct WebCursorInfo; |
zhenw | d47fd72 | 2014-11-13 00:43:47 | [diff] [blame] | 58 | struct WebTransitionElementData; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | namespace gfx { |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 62 | class Point; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 63 | class Range; |
| 64 | class Rect; |
| 65 | } |
| 66 | |
jrummell | 109c3a60 | 2014-12-18 01:08:50 | [diff] [blame] | 67 | namespace media { |
| 68 | class WebEncryptedMediaClientImpl; |
| 69 | } |
| 70 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 71 | namespace content { |
| 72 | |
[email protected] | bffc830 | 2014-01-23 20:52:16 | [diff] [blame] | 73 | class ChildFrameCompositingHelper; |
avi | 485e5fd6 | 2014-08-25 23:26:14 | [diff] [blame] | 74 | class ExternalPopupMenu; |
[email protected] | 8eae080 | 2014-06-02 21:35:55 | [diff] [blame] | 75 | class GeolocationDispatcher; |
mlamouri | efdca9d | 2014-09-16 16:55:40 | [diff] [blame] | 76 | class ManifestManager; |
[email protected] | 977db4a4 | 2014-07-17 08:04:32 | [diff] [blame] | 77 | class MediaStreamDispatcher; |
[email protected] | ae2477e | 2014-05-27 23:47:08 | [diff] [blame] | 78 | class MediaStreamRendererFactory; |
[email protected] | 52d3e17 | 2014-06-16 16:57:02 | [diff] [blame] | 79 | class MidiDispatcher; |
[email protected] | 4459599e | 2014-07-29 22:40:09 | [diff] [blame] | 80 | class NotificationPermissionDispatcher; |
clamy | da97e832 | 2014-10-07 21:57:25 | [diff] [blame] | 81 | class PageState; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 82 | class PepperPluginInstanceImpl; |
[email protected] | 4592086 | 2014-07-02 12:53:02 | [diff] [blame] | 83 | class PushMessagingDispatcher; |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 84 | class RendererAccessibility; |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 85 | class RendererCdmManager; |
| 86 | class RendererMediaPlayerManager; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 87 | class RendererPpapiHost; |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 88 | class RenderFrameObserver; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 89 | class RenderViewImpl; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 90 | class RenderWidget; |
| 91 | class RenderWidgetFullscreenPepper; |
[email protected] | cf78eda | 2014-06-13 16:57:41 | [diff] [blame] | 92 | class ScreenOrientationDispatcher; |
perkj | 1a2d043 | 2014-09-03 13:52:33 | [diff] [blame] | 93 | class UserMediaClientImpl; |
clamy | 9bfeef4 | 2014-09-30 20:50:42 | [diff] [blame] | 94 | struct CommitNavigationParams; |
| 95 | struct CommonNavigationParams; |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 96 | struct CustomContextMenuContext; |
alexmos | bc7eafa | 2014-12-06 01:38:09 | [diff] [blame] | 97 | struct FrameReplicationState; |
clamy | 79b3da6 | 2014-10-14 08:50:37 | [diff] [blame] | 98 | struct RequestNavigationParams; |
davidben | a5496d6 | 2014-10-07 18:52:04 | [diff] [blame] | 99 | struct ResourceResponseHead; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 100 | |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 101 | class CONTENT_EXPORT RenderFrameImpl |
| 102 | : public RenderFrame, |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 103 | NON_EXPORTED_BASE(public blink::WebFrameClient), |
acolwell | 9e0840d | 2014-09-06 19:01:32 | [diff] [blame] | 104 | NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 105 | public: |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 106 | // Creates a new RenderFrame. |render_view| is the RenderView object that this |
| 107 | // frame belongs to. |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 108 | // Callers *must* call |SetWebFrame| immediately after creation. |
[email protected] | 82307f6b | 2014-08-07 03:30:12 | [diff] [blame] | 109 | // Note: This is called only when RenderFrame is created by Blink through |
| 110 | // createChildFrame. |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 111 | // TODO(creis): We should structure this so that |SetWebFrame| isn't needed. |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 112 | static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); |
| 113 | |
[email protected] | 82307f6b | 2014-08-07 03:30:12 | [diff] [blame] | 114 | // Creates a new RenderFrame with |routing_id| as a child of the RenderFrame |
| 115 | // identified by |parent_routing_id| or as the top-level frame if the latter |
japhet | e6adf14 | 2014-10-31 00:01:49 | [diff] [blame] | 116 | // is MSG_ROUTING_NONE. If |proxy_routing_id| is MSG_ROUTING_NONE, it creates |
| 117 | // the Blink WebLocalFrame and inserts it in the proper place in the frame |
| 118 | // tree. Otherwise, the frame is semi-orphaned until it commits, at which |
| 119 | // point it replaces the proxy identified by |proxy_routing_id|. |
[email protected] | 82307f6b | 2014-08-07 03:30:12 | [diff] [blame] | 120 | // Note: This is called only when RenderFrame is being created in response to |
| 121 | // IPC message from the browser process. All other frame creation is driven |
| 122 | // through Blink and Create. |
japhet | e6adf14 | 2014-10-31 00:01:49 | [diff] [blame] | 123 | static void CreateFrame(int routing_id, |
| 124 | int parent_routing_id, |
| 125 | int proxy_routing_id); |
[email protected] | 82307f6b | 2014-08-07 03:30:12 | [diff] [blame] | 126 | |
[email protected] | 5a7100d | 2014-05-19 01:29:04 | [diff] [blame] | 127 | // Returns the RenderFrameImpl for the given routing ID. |
| 128 | static RenderFrameImpl* FromRoutingID(int routing_id); |
| 129 | |
[email protected] | a5ac6dc | 2014-01-15 07:02:14 | [diff] [blame] | 130 | // Just like RenderFrame::FromWebFrame but returns the implementation. |
| 131 | static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 132 | |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 133 | // Used by content_layouttest_support to hook into the creation of |
| 134 | // RenderFrameImpls. |
dongseong.hwang | b721ddf | 2014-12-10 21:22:50 | [diff] [blame] | 135 | using CreateRenderFrameImplFunction = RenderFrameImpl* (*)(RenderViewImpl*, |
| 136 | int32); |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 137 | static void InstallCreateHook( |
dongseong.hwang | b721ddf | 2014-12-10 21:22:50 | [diff] [blame] | 138 | CreateRenderFrameImplFunction create_render_frame_impl); |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 139 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 140 | virtual ~RenderFrameImpl(); |
| 141 | |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 142 | bool is_swapped_out() const { |
| 143 | return is_swapped_out_; |
| 144 | } |
| 145 | |
[email protected] | 5a7100d | 2014-05-19 01:29:04 | [diff] [blame] | 146 | // TODO(nasko): This can be removed once we don't have a swapped out state on |
| 147 | // RenderFrames. See https://crbug.com/357747. |
| 148 | void set_render_frame_proxy(RenderFrameProxy* proxy) { |
| 149 | render_frame_proxy_ = proxy; |
| 150 | } |
| 151 | |
[email protected] | bffc830 | 2014-01-23 20:52:16 | [diff] [blame] | 152 | // Out-of-process child frames receive a signal from RenderWidgetCompositor |
| 153 | // when a compositor frame has committed. |
| 154 | void DidCommitCompositorFrame(); |
| 155 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 156 | // TODO(jam): this is a temporary getter until all the code is transitioned |
| 157 | // to using RenderFrame instead of RenderView. |
[email protected] | abc501e | 2014-01-27 19:27:26 | [diff] [blame] | 158 | RenderViewImpl* render_view() { return render_view_.get(); } |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 159 | |
[email protected] | f3add92 | 2013-12-20 23:17:16 | [diff] [blame] | 160 | RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; } |
| 161 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 162 | // Returns the RenderWidget associated with this frame. |
| 163 | RenderWidget* GetRenderWidget(); |
| 164 | |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 165 | // This is called right after creation with the WebLocalFrame for this |
[email protected] | 0287e76 | 2014-04-11 13:07:58 | [diff] [blame] | 166 | // RenderFrame. It must be called before Initialize. |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 167 | void SetWebFrame(blink::WebLocalFrame* web_frame); |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 168 | |
[email protected] | 0287e76 | 2014-04-11 13:07:58 | [diff] [blame] | 169 | // This method must be called after the frame has been added to the frame |
| 170 | // tree. It creates all objects that depend on the frame being at its proper |
| 171 | // spot. |
| 172 | void Initialize(); |
| 173 | |
[email protected] | de3c5d8 | 2014-05-28 22:12:59 | [diff] [blame] | 174 | // Notifications from RenderWidget. |
| 175 | void WasHidden(); |
| 176 | void WasShown(); |
| 177 | |
[email protected] | 723971b | 2014-02-12 11:08:25 | [diff] [blame] | 178 | // Start/Stop loading notifications. |
| 179 | // TODO(nasko): Those are page-level methods at this time and come from |
| 180 | // WebViewClient. We should move them to be WebFrameClient calls and put |
| 181 | // logic in the browser side to balance starts/stops. |
[email protected] | e3b10d1 | 2014-03-28 16:06:09 | [diff] [blame] | 182 | // |to_different_document| will be true unless the load is a fragment |
| 183 | // navigation, or triggered by history.pushState/replaceState. |
[email protected] | 6dd5c32 | 2014-03-12 07:58:46 | [diff] [blame] | 184 | virtual void didStartLoading(bool to_different_document); |
| 185 | virtual void didStopLoading(); |
| 186 | virtual void didChangeLoadProgress(double load_progress); |
[email protected] | 723971b | 2014-02-12 11:08:25 | [diff] [blame] | 187 | |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 188 | AccessibilityMode accessibility_mode() { |
| 189 | return accessibility_mode_; |
| 190 | } |
| 191 | |
| 192 | RendererAccessibility* renderer_accessibility() { |
| 193 | return renderer_accessibility_; |
| 194 | } |
| 195 | |
| 196 | void HandleWebAccessibilityEvent(const blink::WebAXObject& obj, |
| 197 | blink::WebAXEvent event); |
| 198 | |
| 199 | // TODO(dmazzoni): the only reason this is here is to plumb it through to |
| 200 | // RendererAccessibility. It should be part of RenderFrameObserver, once |
| 201 | // blink has a separate accessibility tree per frame. |
| 202 | void FocusedNodeChanged(const blink::WebNode& node); |
| 203 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 204 | #if defined(ENABLE_PLUGINS) |
[email protected] | 271ff579 | 2013-12-04 22:29:31 | [diff] [blame] | 205 | // Notification that a PPAPI plugin has been created. |
| 206 | void PepperPluginCreated(RendererPpapiHost* host); |
| 207 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 208 | // Notifies that |instance| has changed the cursor. |
| 209 | // This will update the cursor appearance if it is currently over the plugin |
| 210 | // instance. |
| 211 | void PepperDidChangeCursor(PepperPluginInstanceImpl* instance, |
| 212 | const blink::WebCursorInfo& cursor); |
| 213 | |
| 214 | // Notifies that |instance| has received a mouse event. |
| 215 | void PepperDidReceiveMouseEvent(PepperPluginInstanceImpl* instance); |
| 216 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 217 | // Informs the render view that a PPAPI plugin has changed text input status. |
| 218 | void PepperTextInputTypeChanged(PepperPluginInstanceImpl* instance); |
| 219 | void PepperCaretPositionChanged(PepperPluginInstanceImpl* instance); |
| 220 | |
| 221 | // Cancels current composition. |
| 222 | void PepperCancelComposition(PepperPluginInstanceImpl* instance); |
| 223 | |
| 224 | // Informs the render view that a PPAPI plugin has changed selection. |
| 225 | void PepperSelectionChanged(PepperPluginInstanceImpl* instance); |
| 226 | |
| 227 | // Creates a fullscreen container for a pepper plugin instance. |
| 228 | RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer( |
| 229 | PepperPluginInstanceImpl* plugin); |
| 230 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 231 | bool IsPepperAcceptingCompositionEvents() const; |
| 232 | |
| 233 | // Notification that the given plugin has crashed. |
| 234 | void PluginCrashed(const base::FilePath& plugin_path, |
| 235 | base::ProcessId plugin_pid); |
| 236 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 237 | // Simulates IME events for testing purpose. |
| 238 | void SimulateImeSetComposition( |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 239 | const base::string16& text, |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 240 | const std::vector<blink::WebCompositionUnderline>& underlines, |
| 241 | int selection_start, |
| 242 | int selection_end); |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 243 | void SimulateImeConfirmComposition(const base::string16& text, |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 244 | const gfx::Range& replacement_range); |
| 245 | |
| 246 | // TODO(jam): remove these once the IPC handler moves from RenderView to |
| 247 | // RenderFrame. |
| 248 | void OnImeSetComposition( |
tommycli | e6633ca7 | 2014-10-31 00:40:42 | [diff] [blame] | 249 | const base::string16& text, |
| 250 | const std::vector<blink::WebCompositionUnderline>& underlines, |
| 251 | int selection_start, |
| 252 | int selection_end); |
| 253 | void OnImeConfirmComposition(const base::string16& text, |
| 254 | const gfx::Range& replacement_range, |
| 255 | bool keep_selection); |
| 256 | #endif // defined(ENABLE_PLUGINS) |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 257 | |
[email protected] | 977db4a4 | 2014-07-17 08:04:32 | [diff] [blame] | 258 | // May return NULL in some cases, especially if userMediaClient() returns |
| 259 | // NULL. |
| 260 | MediaStreamDispatcher* GetMediaStreamDispatcher(); |
| 261 | |
avi | 485e5fd6 | 2014-08-25 23:26:14 | [diff] [blame] | 262 | #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 263 | void DidHideExternalPopupMenu(); |
| 264 | #endif |
| 265 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 266 | // IPC::Sender |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 267 | bool Send(IPC::Message* msg) override; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 268 | |
| 269 | // IPC::Listener |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 270 | bool OnMessageReceived(const IPC::Message& msg) override; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 271 | |
[email protected] | 271ff579 | 2013-12-04 22:29:31 | [diff] [blame] | 272 | // RenderFrame implementation: |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 273 | RenderView* GetRenderView() override; |
| 274 | int GetRoutingID() override; |
| 275 | blink::WebLocalFrame* GetWebFrame() override; |
| 276 | WebPreferences& GetWebkitPreferences() override; |
| 277 | int ShowContextMenu(ContextMenuClient* client, |
| 278 | const ContextMenuParams& params) override; |
| 279 | void CancelContextMenu(int request_id) override; |
| 280 | blink::WebNode GetContextMenuNode() const override; |
tommycli | 59bd86c | 2014-12-10 02:09:38 | [diff] [blame] | 281 | blink::WebPlugin* CreatePlugin( |
| 282 | blink::WebFrame* frame, |
| 283 | const WebPluginInfo& info, |
| 284 | const blink::WebPluginParams& params, |
| 285 | PluginPowerSaverMode power_saver_mode) override; |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 286 | void LoadURLExternally(blink::WebLocalFrame* frame, |
| 287 | const blink::WebURLRequest& request, |
| 288 | blink::WebNavigationPolicy policy) override; |
| 289 | void ExecuteJavaScript(const base::string16& javascript) override; |
| 290 | bool IsHidden() override; |
| 291 | ServiceRegistry* GetServiceRegistry() override; |
tommycli | d481c48 | 2014-12-03 01:50:41 | [diff] [blame] | 292 | #if defined(ENABLE_PLUGINS) |
tommycli | 59bd86c | 2014-12-10 02:09:38 | [diff] [blame] | 293 | void RegisterPeripheralPlugin( |
| 294 | const GURL& content_origin, |
| 295 | const base::Closure& unthrottle_callback) override; |
| 296 | bool ShouldThrottleContent(const blink::WebPluginParams& params, |
| 297 | const GURL& page_frame_url, |
| 298 | GURL* poster_image, |
| 299 | bool* cross_origin_main_content) const override; |
| 300 | void WhitelistContentOrigin(const GURL& content_origin) override; |
tommycli | d481c48 | 2014-12-03 01:50:41 | [diff] [blame] | 301 | #endif |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 302 | bool IsFTPDirectoryListing() override; |
| 303 | void AttachGuest(int element_instance_id) override; |
fsamuel | a95fef4 | 2014-12-03 20:16:52 | [diff] [blame] | 304 | void DetachGuest(int element_instance_id) override; |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 305 | void SetSelectedText(const base::string16& selection_text, |
| 306 | size_t offset, |
| 307 | const gfx::Range& range) override; |
| 308 | void EnsureMojoBuiltinsAreAvailable(v8::Isolate* isolate, |
| 309 | v8::Handle<v8::Context> context) override; |
[email protected] | 271ff579 | 2013-12-04 22:29:31 | [diff] [blame] | 310 | |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 311 | // blink::WebFrameClient implementation: |
jbroman | 73e9f796 | 2014-10-30 00:43:45 | [diff] [blame] | 312 | blink::WebPluginPlaceholder* createPluginPlaceholder( |
| 313 | blink::WebLocalFrame*, |
| 314 | const blink::WebPluginParams&) override; |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 315 | virtual blink::WebPlugin* createPlugin(blink::WebLocalFrame* frame, |
| 316 | const blink::WebPluginParams& params); |
jrummell | 65b7d27 | 2014-09-24 20:49:27 | [diff] [blame] | 317 | // TODO(jrummell): Remove this method once blink updated. |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 318 | virtual blink::WebMediaPlayer* createMediaPlayer( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 319 | blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 320 | const blink::WebURL& url, |
| 321 | blink::WebMediaPlayerClient* client); |
jrummell | 65b7d27 | 2014-09-24 20:49:27 | [diff] [blame] | 322 | virtual blink::WebMediaPlayer* createMediaPlayer( |
| 323 | blink::WebLocalFrame* frame, |
| 324 | const blink::WebURL& url, |
| 325 | blink::WebMediaPlayerClient* client, |
| 326 | blink::WebContentDecryptionModule* initial_cdm); |
jrummell | 109c3a60 | 2014-12-18 01:08:50 | [diff] [blame] | 327 | // TODO(jrummell): remove once blink uses encryptedMediaClient(). |
[email protected] | 82ce5b9 | 2014-03-22 05:15:26 | [diff] [blame] | 328 | virtual blink::WebContentDecryptionModule* createContentDecryptionModule( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 329 | blink::WebLocalFrame* frame, |
[email protected] | 82ce5b9 | 2014-03-22 05:15:26 | [diff] [blame] | 330 | const blink::WebSecurityOrigin& security_origin, |
| 331 | const blink::WebString& key_system); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 332 | virtual blink::WebApplicationCacheHost* createApplicationCacheHost( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 333 | blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 334 | blink::WebApplicationCacheHostClient* client); |
| 335 | virtual blink::WebWorkerPermissionClientProxy* |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 336 | createWorkerPermissionClientProxy(blink::WebLocalFrame* frame); |
[email protected] | b20c322 | 2014-08-22 00:50:22 | [diff] [blame] | 337 | virtual blink::WebExternalPopupMenu* createExternalPopupMenu( |
| 338 | const blink::WebPopupMenuInfo& popup_menu_info, |
| 339 | blink::WebExternalPopupMenuClient* popup_menu_client); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 340 | virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 341 | virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 342 | blink::WebLocalFrame* frame); |
| 343 | virtual void didAccessInitialDocument(blink::WebLocalFrame* frame); |
| 344 | virtual blink::WebFrame* createChildFrame(blink::WebLocalFrame* parent, |
| 345 | const blink::WebString& name); |
| 346 | virtual void didDisownOpener(blink::WebLocalFrame* frame); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 347 | virtual void frameDetached(blink::WebFrame* frame); |
[email protected] | 9c9343b | 2014-03-08 02:56:07 | [diff] [blame] | 348 | virtual void frameFocused(); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 349 | virtual void willClose(blink::WebFrame* frame); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 350 | virtual void didChangeName(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 351 | const blink::WebString& name); |
[email protected] | f5b6dd112 | 2013-10-04 02:42:50 | [diff] [blame] | 352 | virtual void didMatchCSS( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 353 | blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 354 | const blink::WebVector<blink::WebString>& newly_matching_selectors, |
| 355 | const blink::WebVector<blink::WebString>& stopped_matching_selectors); |
[email protected] | c31a8480 | 2014-04-03 15:55:49 | [diff] [blame] | 356 | virtual bool shouldReportDetailedMessageForSource( |
| 357 | const blink::WebString& source); |
| 358 | virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
| 359 | const blink::WebString& source_name, |
| 360 | unsigned source_line, |
| 361 | const blink::WebString& stack_trace); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 362 | virtual void loadURLExternally(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 363 | const blink::WebURLRequest& request, |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 364 | blink::WebNavigationPolicy policy, |
| 365 | const blink::WebString& suggested_name); |
[email protected] | 1a4e975 | 2013-12-31 20:10:58 | [diff] [blame] | 366 | // The WebDataSource::ExtraData* is assumed to be a DocumentState* subclass. |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 367 | virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
[email protected] | 0c3c54f | 2014-07-31 01:29:00 | [diff] [blame] | 368 | const NavigationPolicyInfo& info); |
[email protected] | 68057554 | 2014-04-03 17:12:52 | [diff] [blame] | 369 | virtual blink::WebHistoryItem historyItemForNewChildFrame( |
| 370 | blink::WebFrame* frame); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 371 | virtual void willSendSubmitEvent(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 372 | const blink::WebFormElement& form); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 373 | virtual void willSubmitForm(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 374 | const blink::WebFormElement& form); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 375 | virtual void didCreateDataSource(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 376 | blink::WebDataSource* datasource); |
[email protected] | 0c3c54f | 2014-07-31 01:29:00 | [diff] [blame] | 377 | virtual void didStartProvisionalLoad(blink::WebLocalFrame* frame, |
japhet | 69a0630 | 2014-12-12 19:37:14 | [diff] [blame] | 378 | bool is_transition_navigation, |
| 379 | double triggering_event_time); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 380 | virtual void didReceiveServerRedirectForProvisionalLoad( |
[email protected] | 45d877f | 2014-04-05 07:36:22 | [diff] [blame] | 381 | blink::WebLocalFrame* frame); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 382 | virtual void didFailProvisionalLoad( |
[email protected] | 45d877f | 2014-04-05 07:36:22 | [diff] [blame] | 383 | blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 384 | const blink::WebURLError& error); |
[email protected] | 68057554 | 2014-04-03 17:12:52 | [diff] [blame] | 385 | virtual void didCommitProvisionalLoad( |
[email protected] | 45d877f | 2014-04-05 07:36:22 | [diff] [blame] | 386 | blink::WebLocalFrame* frame, |
[email protected] | 68057554 | 2014-04-03 17:12:52 | [diff] [blame] | 387 | const blink::WebHistoryItem& item, |
| 388 | blink::WebHistoryCommitType commit_type); |
rob | 5ef11ff | 2014-11-17 23:56:20 | [diff] [blame] | 389 | virtual void didCreateNewDocument(blink::WebLocalFrame* frame); |
[email protected] | 06181e5 | 2014-05-10 11:59:09 | [diff] [blame] | 390 | virtual void didClearWindowObject(blink::WebLocalFrame* frame); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 391 | virtual void didCreateDocumentElement(blink::WebLocalFrame* frame); |
| 392 | virtual void didReceiveTitle(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 393 | const blink::WebString& title, |
| 394 | blink::WebTextDirection direction); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 395 | virtual void didChangeIcon(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 396 | blink::WebIconURL::Type icon_type); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 397 | virtual void didFinishDocumentLoad(blink::WebLocalFrame* frame); |
| 398 | virtual void didHandleOnloadEvents(blink::WebLocalFrame* frame); |
| 399 | virtual void didFailLoad(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 400 | const blink::WebURLError& error); |
[email protected] | 45d877f | 2014-04-05 07:36:22 | [diff] [blame] | 401 | virtual void didFinishLoad(blink::WebLocalFrame* frame); |
| 402 | virtual void didNavigateWithinPage(blink::WebLocalFrame* frame, |
[email protected] | 68057554 | 2014-04-03 17:12:52 | [diff] [blame] | 403 | const blink::WebHistoryItem& item, |
| 404 | blink::WebHistoryCommitType commit_type); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 405 | virtual void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame); |
[email protected] | 9e6bea41 | 2014-08-08 06:35:25 | [diff] [blame] | 406 | virtual void addNavigationTransitionData( |
zhenw | d47fd72 | 2014-11-13 00:43:47 | [diff] [blame] | 407 | const blink::WebTransitionElementData& data); |
[email protected] | 37b64c5 | 2014-07-11 21:14:05 | [diff] [blame] | 408 | virtual void didChangeThemeColor(); |
[email protected] | 4459599e | 2014-07-29 22:40:09 | [diff] [blame] | 409 | virtual void requestNotificationPermission( |
| 410 | const blink::WebSecurityOrigin& origin, |
| 411 | blink::WebNotificationPermissionCallback* callback); |
[email protected] | c3f2c70 | 2014-03-19 23:39:48 | [diff] [blame] | 412 | virtual void didChangeSelection(bool is_empty_selection); |
[email protected] | f3c59d6 | 2014-04-09 16:33:55 | [diff] [blame] | 413 | virtual blink::WebColorChooser* createColorChooser( |
[email protected] | eb8c216a | 2014-04-09 19:19:19 | [diff] [blame] | 414 | blink::WebColorChooserClient* client, |
[email protected] | f3c59d6 | 2014-04-09 16:33:55 | [diff] [blame] | 415 | const blink::WebColor& initial_color, |
| 416 | const blink::WebVector<blink::WebColorSuggestion>& suggestions); |
[email protected] | 87de04b0 | 2014-04-08 22:14:49 | [diff] [blame] | 417 | virtual void runModalAlertDialog(const blink::WebString& message); |
| 418 | virtual bool runModalConfirmDialog(const blink::WebString& message); |
| 419 | virtual bool runModalPromptDialog(const blink::WebString& message, |
| 420 | const blink::WebString& default_value, |
| 421 | blink::WebString* actual_value); |
| 422 | virtual bool runModalBeforeUnloadDialog(bool is_reload, |
| 423 | const blink::WebString& message); |
[email protected] | 12cc511 | 2014-03-03 17:01:10 | [diff] [blame] | 424 | virtual void showContextMenu(const blink::WebContextMenuData& data); |
[email protected] | 9107034 | 2014-03-07 00:29:02 | [diff] [blame] | 425 | virtual void clearContextMenu(); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 426 | virtual void willSendRequest(blink::WebLocalFrame* frame, |
| 427 | unsigned identifier, |
| 428 | blink::WebURLRequest& request, |
| 429 | const blink::WebURLResponse& redirect_response); |
| 430 | virtual void didReceiveResponse(blink::WebLocalFrame* frame, |
| 431 | unsigned identifier, |
| 432 | const blink::WebURLResponse& response); |
| 433 | virtual void didFinishResourceLoad(blink::WebLocalFrame* frame, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 434 | unsigned identifier); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 435 | virtual void didLoadResourceFromMemoryCache( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 436 | blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 437 | const blink::WebURLRequest& request, |
| 438 | const blink::WebURLResponse& response); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 439 | virtual void didDisplayInsecureContent(blink::WebLocalFrame* frame); |
| 440 | virtual void didRunInsecureContent(blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 441 | const blink::WebSecurityOrigin& origin, |
| 442 | const blink::WebURL& target); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 443 | virtual void didAbortLoading(blink::WebLocalFrame* frame); |
| 444 | virtual void didCreateScriptContext(blink::WebLocalFrame* frame, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 445 | v8::Handle<v8::Context> context, |
| 446 | int extension_group, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 447 | int world_id); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 448 | virtual void willReleaseScriptContext(blink::WebLocalFrame* frame, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 449 | v8::Handle<v8::Context> context, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 450 | int world_id); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 451 | virtual void didFirstVisuallyNonEmptyLayout(blink::WebLocalFrame* frame); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 452 | virtual void didChangeScrollOffset(blink::WebLocalFrame* frame); |
| 453 | virtual void willInsertBody(blink::WebLocalFrame* frame); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 454 | virtual void reportFindInPageMatchCount(int request_id, |
| 455 | int count, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 456 | bool final_update); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 457 | virtual void reportFindInPageSelection(int request_id, |
| 458 | int active_match_ordinal, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 459 | const blink::WebRect& sel); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 460 | virtual void requestStorageQuota(blink::WebLocalFrame* frame, |
| 461 | blink::WebStorageQuotaType type, |
| 462 | unsigned long long requested_size, |
| 463 | blink::WebStorageQuotaCallbacks callbacks); |
[email protected] | a14903e0 | 2014-06-02 07:35:12 | [diff] [blame] | 464 | virtual void willOpenWebSocket(blink::WebSocketHandle* handle); |
[email protected] | 5ee7f18 | 2014-04-25 19:45:26 | [diff] [blame] | 465 | virtual blink::WebGeolocationClient* geolocationClient(); |
[email protected] | 4592086 | 2014-07-02 12:53:02 | [diff] [blame] | 466 | virtual blink::WebPushClient* pushClient(); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 467 | virtual void willStartUsingPeerConnectionHandler( |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 468 | blink::WebLocalFrame* frame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 469 | blink::WebRTCPeerConnectionHandler* handler); |
[email protected] | bfe45e2 | 2014-04-25 16:47:53 | [diff] [blame] | 470 | virtual blink::WebUserMediaClient* userMediaClient(); |
jrummell | 109c3a60 | 2014-12-18 01:08:50 | [diff] [blame] | 471 | virtual blink::WebEncryptedMediaClient* encryptedMediaClient(); |
[email protected] | 8538385f | 2014-04-25 19:45:04 | [diff] [blame] | 472 | virtual blink::WebMIDIClient* webMIDIClient(); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 473 | virtual bool willCheckAndDispatchMessageEvent( |
[email protected] | ce5064f | 2014-05-07 22:49:20 | [diff] [blame] | 474 | blink::WebLocalFrame* source_frame, |
| 475 | blink::WebFrame* target_frame, |
| 476 | blink::WebSecurityOrigin target_origin, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 477 | blink::WebDOMMessageEvent event); |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 478 | virtual blink::WebString userAgentOverride(blink::WebLocalFrame* frame, |
| 479 | const blink::WebURL& url); |
| 480 | virtual blink::WebString doNotTrackValue(blink::WebLocalFrame* frame); |
| 481 | virtual bool allowWebGL(blink::WebLocalFrame* frame, bool default_value); |
| 482 | virtual void didLoseWebGLContext(blink::WebLocalFrame* frame, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 483 | int arb_robustness_status_code); |
[email protected] | cf78eda | 2014-06-13 16:57:41 | [diff] [blame] | 484 | virtual blink::WebScreenOrientationClient* webScreenOrientationClient(); |
nhiroki | febadeed | 2014-10-29 04:02:47 | [diff] [blame] | 485 | virtual bool isControlledByServiceWorker(blink::WebDataSource& data_source); |
| 486 | virtual int64_t serviceWorkerID(blink::WebDataSource& data_source); |
dmazzoni | 0b5d248 | 2014-09-10 19:45:57 | [diff] [blame] | 487 | virtual void postAccessibilityEvent(const blink::WebAXObject& obj, |
| 488 | blink::WebAXEvent event); |
dmazzoni | 1a69e2b3 | 2014-11-06 20:34:28 | [diff] [blame] | 489 | virtual void handleAccessibilityFindInPageResult( |
| 490 | int identifier, |
| 491 | int match_index, |
| 492 | const blink::WebAXObject& start_object, |
| 493 | int start_offset, |
| 494 | const blink::WebAXObject& end_object, |
| 495 | int end_offset); |
mlamouri | efdca9d | 2014-09-16 16:55:40 | [diff] [blame] | 496 | virtual void didChangeManifest(blink::WebLocalFrame*); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 497 | |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 498 | // WebMediaPlayerDelegate implementation: |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 499 | void DidPlay(blink::WebMediaPlayer* player) override; |
| 500 | void DidPause(blink::WebMediaPlayer* player) override; |
| 501 | void PlayerGone(blink::WebMediaPlayer* player) override; |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 502 | |
[email protected] | c6bc2033 | 2014-02-28 18:30:39 | [diff] [blame] | 503 | // TODO(nasko): Make all tests in RenderViewImplTest friends and then move |
| 504 | // this back to private member. |
| 505 | void OnNavigate(const FrameMsg_Navigate_Params& params); |
| 506 | |
nasko | 78f06bc | 2014-11-18 18:18:57 | [diff] [blame] | 507 | // Make this frame show an empty, unscriptable page. |
| 508 | // TODO(nasko): Remove this method once swapped out state is no longer used. |
| 509 | void NavigateToSwappedOutURL(); |
| 510 | |
[email protected] | c52a141 | 2014-06-25 06:09:25 | [diff] [blame] | 511 | // Binds this render frame's service registry to a handle to the remote |
| 512 | // service registry. |
| 513 | void BindServiceRegistry( |
| 514 | mojo::ScopedMessagePipeHandle service_provider_handle); |
| 515 | |
mlamouri | 4fff199 | 2014-09-30 11:22:46 | [diff] [blame] | 516 | ManifestManager* manifest_manager(); |
| 517 | |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 518 | protected: |
| 519 | RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); |
| 520 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 521 | private: |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 522 | friend class RenderFrameObserver; |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 523 | friend class RendererAccessibilityTest; |
avi | 485e5fd6 | 2014-08-25 23:26:14 | [diff] [blame] | 524 | FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); |
| 525 | FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
| 526 | FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
| 527 | FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
[email protected] | 66bbadaf | 2014-03-28 16:25:54 | [diff] [blame] | 528 | FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, |
| 529 | AccessibilityMessagesQueueWhileSwappedOut); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 530 | FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 531 | OnExtendSelectionAndDelete); |
[email protected] | 66bbadaf | 2014-03-28 16:25:54 | [diff] [blame] | 532 | FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut); |
| 533 | FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK); |
alexmos | bc7eafa | 2014-12-06 01:38:09 | [diff] [blame] | 534 | FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OriginReplicationForSwapOut); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 535 | FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 536 | SetEditableSelectionAndComposition); |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 537 | FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 538 | OnSetAccessibilityMode); |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 539 | |
[email protected] | 37567b43 | 2014-02-12 01:12:22 | [diff] [blame] | 540 | typedef std::map<GURL, double> HostZoomLevels; |
| 541 | |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 542 | // Functions to add and remove observers for this object. |
| 543 | void AddObserver(RenderFrameObserver* observer); |
| 544 | void RemoveObserver(RenderFrameObserver* observer); |
[email protected] | 1c2052f | 2013-08-28 08:24:34 | [diff] [blame] | 545 | |
[email protected] | f0906a0 | 2014-08-07 07:18:55 | [diff] [blame] | 546 | // Builds and sends DidCommitProvisionalLoad to the host. |
| 547 | void SendDidCommitProvisionalLoad(blink::WebFrame* frame); |
[email protected] | 37567b43 | 2014-02-12 01:12:22 | [diff] [blame] | 548 | |
[email protected] | 9c9343b | 2014-03-08 02:56:07 | [diff] [blame] | 549 | // Gets the focused element. If no such element exists then the element will |
| 550 | // be NULL. |
| 551 | blink::WebElement GetFocusedElement(); |
| 552 | |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 553 | // IPC message handlers ------------------------------------------------------ |
| 554 | // |
| 555 | // The documentation for these functions should be in |
| 556 | // content/common/*_messages.h for the message that the function is handling. |
[email protected] | f76f3223 | 2014-03-11 17:36:17 | [diff] [blame] | 557 | void OnBeforeUnload(); |
alexmos | bc7eafa | 2014-12-06 01:38:09 | [diff] [blame] | 558 | void OnSwapOut(int proxy_routing_id, |
nasko | 3e8c20e | 2014-12-18 06:54:56 | [diff] [blame^] | 559 | bool is_loading, |
alexmos | bc7eafa | 2014-12-06 01:38:09 | [diff] [blame] | 560 | const FrameReplicationState& replicated_frame_state); |
Nasko Oskov | 85f6022 | 2014-08-28 22:53:30 | [diff] [blame] | 561 | void OnStop(); |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 562 | void OnShowContextMenu(const gfx::Point& location); |
| 563 | void OnContextMenuClosed(const CustomContextMenuContext& custom_context); |
| 564 | void OnCustomContextMenuAction(const CustomContextMenuContext& custom_context, |
| 565 | unsigned action); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 566 | void OnUndo(); |
| 567 | void OnRedo(); |
[email protected] | 9c9343b | 2014-03-08 02:56:07 | [diff] [blame] | 568 | void OnCut(); |
| 569 | void OnCopy(); |
| 570 | void OnPaste(); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 571 | void OnPasteAndMatchStyle(); |
| 572 | void OnDelete(); |
| 573 | void OnSelectAll(); |
christiank | aeed986 | 2014-11-05 10:49:14 | [diff] [blame] | 574 | void OnSelectRange(const gfx::Point& base, const gfx::Point& extent); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 575 | void OnUnselect(); |
christiank | aeed986 | 2014-11-05 10:49:14 | [diff] [blame] | 576 | void OnMoveRangeSelectionExtent(const gfx::Point& point); |
[email protected] | 1f3fc1d | 2014-04-03 14:50:17 | [diff] [blame] | 577 | void OnReplace(const base::string16& text); |
| 578 | void OnReplaceMisspelling(const base::string16& text); |
[email protected] | e31b8ebb | 2014-03-07 17:59:34 | [diff] [blame] | 579 | void OnCSSInsertRequest(const std::string& css); |
[email protected] | f13ab89 | 2014-03-12 06:48:52 | [diff] [blame] | 580 | void OnJavaScriptExecuteRequest(const base::string16& javascript, |
| 581 | int id, |
| 582 | bool notify_result); |
zeeshanq | 3454e9c | 2014-09-04 21:30:28 | [diff] [blame] | 583 | void OnJavaScriptExecuteRequestForTests(const base::string16& javascript, |
| 584 | int id, |
| 585 | bool notify_result); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 586 | void OnSetEditableSelectionOffsets(int start, int end); |
[email protected] | e5e438d6 | 2014-03-27 21:47:16 | [diff] [blame] | 587 | void OnSetCompositionFromExistingText( |
| 588 | int start, int end, |
| 589 | const std::vector<blink::WebCompositionUnderline>& underlines); |
sammc | bc9e9933 | 2014-12-18 00:55:24 | [diff] [blame] | 590 | void OnExecuteNoValueEditCommand(const std::string& name); |
[email protected] | e5e438d6 | 2014-03-27 21:47:16 | [diff] [blame] | 591 | void OnExtendSelectionAndDelete(int before, int after); |
[email protected] | 4fed370 | 2014-04-01 09:08:00 | [diff] [blame] | 592 | void OnReload(bool ignore_cache); |
[email protected] | 96bb613 | 2014-06-16 17:22:19 | [diff] [blame] | 593 | void OnTextSurroundingSelectionRequest(size_t max_length); |
[email protected] | 2e531f7 | 2014-06-20 23:23:39 | [diff] [blame] | 594 | void OnAddStyleSheetByURL(const std::string& url); |
[email protected] | 9e6bea41 | 2014-08-08 06:35:25 | [diff] [blame] | 595 | void OnSetupTransitionView(const std::string& markup); |
zhenw | e8f14fc | 2014-11-25 01:00:54 | [diff] [blame] | 596 | void OnBeginExitTransition(const std::string& css_selector, |
| 597 | bool exit_to_native_app); |
zhenw | 5a70789 | 2014-12-10 02:31:03 | [diff] [blame] | 598 | void OnRevertExitTransition(); |
zhenw | abf9b9d | 2014-11-15 04:04:18 | [diff] [blame] | 599 | void OnHideTransitionElements(const std::string& css_selector); |
| 600 | void OnShowTransitionElements(const std::string& css_selector); |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 601 | void OnSetAccessibilityMode(AccessibilityMode new_mode); |
creis | bbbeb06 | 2014-08-25 18:20:31 | [diff] [blame] | 602 | void OnDisownOpener(); |
avi | 485e5fd6 | 2014-08-25 23:26:14 | [diff] [blame] | 603 | #if defined(OS_ANDROID) |
| 604 | void OnSelectPopupMenuItems(bool canceled, |
| 605 | const std::vector<int>& selected_indices); |
| 606 | #elif defined(OS_MACOSX) |
| 607 | void OnSelectPopupMenuItem(int selected_index); |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 608 | void OnCopyToFindPboard(); |
| 609 | #endif |
[email protected] | 9c9343b | 2014-03-08 02:56:07 | [diff] [blame] | 610 | |
clamy | 9bfeef4 | 2014-09-30 20:50:42 | [diff] [blame] | 611 | // PlzNavigate |
clamy | 79b3da6 | 2014-10-14 08:50:37 | [diff] [blame] | 612 | void OnRequestNavigation(const CommonNavigationParams& common_params, |
| 613 | const RequestNavigationParams& request_params); |
davidben | a5496d6 | 2014-10-07 18:52:04 | [diff] [blame] | 614 | void OnCommitNavigation(const ResourceResponseHead& response, |
| 615 | const GURL& stream_url, |
clamy | 9bfeef4 | 2014-09-30 20:50:42 | [diff] [blame] | 616 | const CommonNavigationParams& common_params, |
| 617 | const CommitNavigationParams& commit_params); |
| 618 | |
[email protected] | 65920f33 | 2014-03-04 21:14:18 | [diff] [blame] | 619 | // Virtual since overridden by WebTestProxy for layout tests. |
| 620 | virtual blink::WebNavigationPolicy DecidePolicyForNavigation( |
| 621 | RenderFrame* render_frame, |
[email protected] | 0c3c54f | 2014-07-31 01:29:00 | [diff] [blame] | 622 | const NavigationPolicyInfo& info); |
[email protected] | 65920f33 | 2014-03-04 21:14:18 | [diff] [blame] | 623 | void OpenURL(blink::WebFrame* frame, |
| 624 | const GURL& url, |
| 625 | const Referrer& referrer, |
| 626 | blink::WebNavigationPolicy policy); |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 627 | |
[email protected] | ef3adfc | 2014-05-11 00:04:54 | [diff] [blame] | 628 | // Update current main frame's encoding and send it to browser window. |
| 629 | // Since we want to let users see the right encoding info from menu |
| 630 | // before finishing loading, we call the UpdateEncoding in |
| 631 | // a) function:DidCommitLoadForFrame. When this function is called, |
| 632 | // that means we have got first data. In here we try to get encoding |
| 633 | // of page if it has been specified in http header. |
| 634 | // b) function:DidReceiveTitle. When this function is called, |
| 635 | // that means we have got specified title. Because in most of webpages, |
| 636 | // title tags will follow meta tags. In here we try to get encoding of |
| 637 | // page if it has been specified in meta tag. |
| 638 | // c) function:DidFinishDocumentLoadForFrame. When this function is |
| 639 | // called, that means we have got whole html page. In here we should |
| 640 | // finally get right encoding of page. |
| 641 | void UpdateEncoding(blink::WebFrame* frame, |
| 642 | const std::string& encoding_name); |
| 643 | |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 644 | // Dispatches the current state of selection on the webpage to the browser if |
| 645 | // it has changed. |
| 646 | // TODO(varunjain): delete this method once we figure out how to keep |
| 647 | // selection handles in sync with the webpage. |
| 648 | void SyncSelectionIfRequired(); |
| 649 | |
[email protected] | 87de04b0 | 2014-04-08 22:14:49 | [diff] [blame] | 650 | bool RunJavaScriptMessage(JavaScriptMessageType type, |
| 651 | const base::string16& message, |
| 652 | const base::string16& default_value, |
| 653 | const GURL& frame_url, |
| 654 | base::string16* result); |
| 655 | |
[email protected] | 457736d | 2014-04-30 15:54:27 | [diff] [blame] | 656 | // Loads the appropriate error page for the specified failure into the frame. |
| 657 | void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, |
| 658 | const blink::WebURLError& error, |
| 659 | bool replace); |
| 660 | |
zeeshanq | 3454e9c | 2014-09-04 21:30:28 | [diff] [blame] | 661 | void HandleJavascriptExecutionResult(const base::string16& javascript, |
| 662 | int id, |
| 663 | bool notify_result, |
| 664 | v8::Handle<v8::Value> result); |
| 665 | |
[email protected] | 977db4a4 | 2014-07-17 08:04:32 | [diff] [blame] | 666 | // Initializes |web_user_media_client_|. If this fails, because it wasn't |
| 667 | // possible to create a MediaStreamClient (e.g., WebRTC is disabled), then |
| 668 | // |web_user_media_client_| will remain NULL. |
| 669 | void InitializeUserMediaClient(); |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 670 | |
| 671 | blink::WebMediaPlayer* CreateWebMediaPlayerForMediaStream( |
| 672 | const blink::WebURL& url, |
| 673 | blink::WebMediaPlayerClient* client); |
| 674 | |
[email protected] | ae2477e | 2014-05-27 23:47:08 | [diff] [blame] | 675 | // Creates a factory object used for creating audio and video renderers. |
| 676 | // The method is virtual so that layouttests can override it. |
| 677 | virtual scoped_ptr<MediaStreamRendererFactory> CreateRendererFactory(); |
| 678 | |
clamy | da97e832 | 2014-10-07 21:57:25 | [diff] [blame] | 679 | // Checks that the RenderView is ready to display the navigation to |url|. If |
sungmann.cho | 12349f0e | 2014-12-05 23:42:19 | [diff] [blame] | 680 | // the return value is false, the navigation should be abandoned. |
clamy | da97e832 | 2014-10-07 21:57:25 | [diff] [blame] | 681 | bool PrepareRenderViewForNavigation( |
| 682 | const GURL& url, |
| 683 | FrameMsg_Navigate_Type::Value navigate_type, |
| 684 | const PageState& state, |
avi | 2b17759 | 2014-12-10 02:08:02 | [diff] [blame] | 685 | bool check_for_stale_navigation, |
| 686 | bool is_history_navigation, |
| 687 | int current_history_list_offset, |
clamy | da97e832 | 2014-10-07 21:57:25 | [diff] [blame] | 688 | int32 page_id, |
| 689 | bool* is_reload, |
| 690 | blink::WebURLRequest::CachePolicy* cache_policy); |
| 691 | |
clamy | ece3888 | 2014-11-19 15:00:20 | [diff] [blame] | 692 | // PlzNavigate |
| 693 | // Sends a FrameHostMsg_BeginNavigation to the browser based on the contents |
| 694 | // of the WebURLRequest. |
| 695 | void BeginNavigation(blink::WebURLRequest* request); |
| 696 | |
[email protected] | f3a9531 | 2014-06-12 16:46:58 | [diff] [blame] | 697 | // Returns the URL being loaded by the |frame_|'s request. |
| 698 | GURL GetLoadingUrl() const; |
| 699 | |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 700 | #if defined(OS_ANDROID) |
[email protected] | 65f3d1aa | 2014-05-29 01:57:00 | [diff] [blame] | 701 | blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 702 | const blink::WebURL& url, |
jrummell | 65b7d27 | 2014-09-24 20:49:27 | [diff] [blame] | 703 | blink::WebMediaPlayerClient* client, |
| 704 | blink::WebContentDecryptionModule* initial_cdm); |
[email protected] | a017938b | 2014-05-27 21:17:17 | [diff] [blame] | 705 | |
[email protected] | 65f3d1aa | 2014-05-29 01:57:00 | [diff] [blame] | 706 | RendererMediaPlayerManager* GetMediaPlayerManager(); |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 707 | #endif |
| 708 | |
| 709 | #if defined(ENABLE_BROWSER_CDMS) |
[email protected] | 65f3d1aa | 2014-05-29 01:57:00 | [diff] [blame] | 710 | RendererCdmManager* GetCdmManager(); |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 711 | #endif |
| 712 | |
[email protected] | 35b2a97 | 2014-04-04 15:50:22 | [diff] [blame] | 713 | // Stores the WebLocalFrame we are associated with. |
| 714 | blink::WebLocalFrame* frame_; |
[email protected] | b70da4c | 2014-01-06 19:57:09 | [diff] [blame] | 715 | |
[email protected] | abc501e | 2014-01-27 19:27:26 | [diff] [blame] | 716 | base::WeakPtr<RenderViewImpl> render_view_; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 717 | int routing_id_; |
[email protected] | 1c2052f | 2013-08-28 08:24:34 | [diff] [blame] | 718 | bool is_swapped_out_; |
[email protected] | 5a7100d | 2014-05-19 01:29:04 | [diff] [blame] | 719 | // RenderFrameProxy exists only when is_swapped_out_ is true. |
| 720 | // TODO(nasko): This can be removed once we don't have a swapped out state on |
| 721 | // RenderFrame. See https://crbug.com/357747. |
| 722 | RenderFrameProxy* render_frame_proxy_; |
[email protected] | 1c2052f | 2013-08-28 08:24:34 | [diff] [blame] | 723 | bool is_detaching_; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 724 | |
japhet | e6adf14 | 2014-10-31 00:01:49 | [diff] [blame] | 725 | // If this frame was created to replace a proxy, this will store the routing |
| 726 | // id of the proxy to replace at commit-time, at which time it will be |
| 727 | // cleared. |
| 728 | // TODO(creis): Remove this after switching to PlzNavigate. |
| 729 | int proxy_routing_id_; |
| 730 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 731 | #if defined(ENABLE_PLUGINS) |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 732 | // Current text input composition text. Empty if no composition is in |
| 733 | // progress. |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 734 | base::string16 pepper_composition_text_; |
tommycli | eb25b2a | 2014-11-03 19:45:09 | [diff] [blame] | 735 | |
tommycli | 59bd86c | 2014-12-10 02:09:38 | [diff] [blame] | 736 | PluginPowerSaverHelper* plugin_power_saver_helper_; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 737 | #endif |
| 738 | |
[email protected] | f3add92 | 2013-12-20 23:17:16 | [diff] [blame] | 739 | RendererWebCookieJarImpl cookie_jar_; |
| 740 | |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 741 | // All the registered observers. |
| 742 | ObserverList<RenderFrameObserver> observers_; |
| 743 | |
[email protected] | bffc830 | 2014-01-23 20:52:16 | [diff] [blame] | 744 | scoped_refptr<ChildFrameCompositingHelper> compositing_helper_; |
| 745 | |
[email protected] | 4ecee35 | 2014-03-11 21:12:19 | [diff] [blame] | 746 | // The node that the context menu was pressed over. |
| 747 | blink::WebNode context_menu_node_; |
| 748 | |
[email protected] | a09d53ce | 2014-01-31 00:46:42 | [diff] [blame] | 749 | // External context menu requests we're waiting for. "Internal" |
| 750 | // (WebKit-originated) context menu events will have an ID of 0 and will not |
| 751 | // be in this map. |
| 752 | // |
| 753 | // We don't want to add internal ones since some of the "special" page |
| 754 | // handlers in the browser process just ignore the context menu requests so |
| 755 | // avoid showing context menus, and so this will cause right clicks to leak |
| 756 | // entries in this map. Most users of the custom context menu (e.g. Pepper |
| 757 | // plugins) are normally only on "regular" pages and the regular pages will |
| 758 | // always respond properly to the request, so we don't have to worry so |
| 759 | // much about leaks. |
| 760 | IDMap<ContextMenuClient, IDMapExternalPointer> pending_context_menus_; |
| 761 | |
[email protected] | 4ee6462 | 2014-03-21 22:34:15 | [diff] [blame] | 762 | // The text selection the last time DidChangeSelection got called. May contain |
| 763 | // additional characters before and after the selected text, for IMEs. The |
| 764 | // portion of this string that is the actual selected text starts at index |
| 765 | // |selection_range_.GetMin() - selection_text_offset_| and has length |
| 766 | // |selection_range_.length()|. |
| 767 | base::string16 selection_text_; |
| 768 | // The offset corresponding to the start of |selection_text_| in the document. |
| 769 | size_t selection_text_offset_; |
| 770 | // Range over the document corresponding to the actual selected text (which |
| 771 | // could correspond to a substring of |selection_text_|; see above). |
| 772 | gfx::Range selection_range_; |
| 773 | // Used to inform didChangeSelection() when it is called in the context |
| 774 | // of handling a InputMsg_SelectRange IPC. |
| 775 | bool handling_select_range_; |
| 776 | |
[email protected] | 2626d14 | 2014-04-22 17:24:02 | [diff] [blame] | 777 | // The next group of objects all implement RenderFrameObserver, so are deleted |
| 778 | // along with the RenderFrame automatically. This is why we just store weak |
| 779 | // references. |
| 780 | |
[email protected] | 4459599e | 2014-07-29 22:40:09 | [diff] [blame] | 781 | // Dispatches permission requests for Web Notifications. |
| 782 | NotificationPermissionDispatcher* notification_permission_dispatcher_; |
| 783 | |
[email protected] | 977db4a4 | 2014-07-17 08:04:32 | [diff] [blame] | 784 | // Destroyed via the RenderFrameObserver::OnDestruct() mechanism. |
perkj | 1a2d043 | 2014-09-03 13:52:33 | [diff] [blame] | 785 | UserMediaClientImpl* web_user_media_client_; |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 786 | |
jrummell | 109c3a60 | 2014-12-18 01:08:50 | [diff] [blame] | 787 | // EncryptedMediaClient attached to this frame; lazily initialized. |
| 788 | media::WebEncryptedMediaClientImpl* web_encrypted_media_client_; |
| 789 | |
[email protected] | 52d3e17 | 2014-06-16 16:57:02 | [diff] [blame] | 790 | // MidiClient attached to this frame; lazily initialized. |
| 791 | MidiDispatcher* midi_dispatcher_; |
| 792 | |
[email protected] | a017938b | 2014-05-27 21:17:17 | [diff] [blame] | 793 | #if defined(OS_ANDROID) |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 794 | // Manages all media players in this render frame for communicating with the |
| 795 | // real media player in the browser process. It's okay to use a raw pointer |
| 796 | // since it's a RenderFrameObserver. |
[email protected] | a017938b | 2014-05-27 21:17:17 | [diff] [blame] | 797 | RendererMediaPlayerManager* media_player_manager_; |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 798 | #endif |
| 799 | |
| 800 | #if defined(ENABLE_BROWSER_CDMS) |
| 801 | // Manage all CDMs in this render frame for communicating with the real CDM in |
| 802 | // the browser process. It's okay to use a raw pointer since it's a |
| 803 | // RenderFrameObserver. |
[email protected] | 65f3d1aa | 2014-05-29 01:57:00 | [diff] [blame] | 804 | RendererCdmManager* cdm_manager_; |
[email protected] | a017938b | 2014-05-27 21:17:17 | [diff] [blame] | 805 | #endif |
| 806 | |
[email protected] | a6e21c37 | 2014-07-12 02:27:21 | [diff] [blame] | 807 | #if defined(VIDEO_HOLE) |
| 808 | // Whether or not this RenderFrameImpl contains a media player. Used to |
| 809 | // register as an observer for video-hole-specific events. |
| 810 | bool contains_media_player_; |
| 811 | #endif |
| 812 | |
[email protected] | 4592086 | 2014-07-02 12:53:02 | [diff] [blame] | 813 | // The geolocation dispatcher attached to this frame, lazily initialized. |
[email protected] | 8eae080 | 2014-06-02 21:35:55 | [diff] [blame] | 814 | GeolocationDispatcher* geolocation_dispatcher_; |
| 815 | |
[email protected] | 4592086 | 2014-07-02 12:53:02 | [diff] [blame] | 816 | // The push messaging dispatcher attached to this frame, lazily initialized. |
| 817 | PushMessagingDispatcher* push_messaging_dispatcher_; |
| 818 | |
[email protected] | c52a141 | 2014-06-25 06:09:25 | [diff] [blame] | 819 | ServiceRegistryImpl service_registry_; |
| 820 | |
[email protected] | 4592086 | 2014-07-02 12:53:02 | [diff] [blame] | 821 | // The screen orientation dispatcher attached to the frame, lazily |
| 822 | // initialized. |
[email protected] | cf78eda | 2014-06-13 16:57:41 | [diff] [blame] | 823 | ScreenOrientationDispatcher* screen_orientation_dispatcher_; |
| 824 | |
mlamouri | efdca9d | 2014-09-16 16:55:40 | [diff] [blame] | 825 | // The Manifest Manager handles the manifest requests from the browser |
| 826 | // process. |
| 827 | ManifestManager* manifest_manager_; |
| 828 | |
[email protected] | 9564021 | 2014-07-26 18:14:30 | [diff] [blame] | 829 | // The current accessibility mode. |
| 830 | AccessibilityMode accessibility_mode_; |
| 831 | |
| 832 | // Only valid if |accessibility_mode_| is anything other than |
| 833 | // AccessibilityModeOff. |
| 834 | RendererAccessibility* renderer_accessibility_; |
| 835 | |
avi | 485e5fd6 | 2014-08-25 23:26:14 | [diff] [blame] | 836 | #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 837 | // The external popup for the currently showing select popup. |
| 838 | scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
| 839 | #endif |
| 840 | |
[email protected] | 9630731 | 2014-05-04 01:00:19 | [diff] [blame] | 841 | base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 842 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 843 | DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 844 | }; |
| 845 | |
| 846 | } // namespace content |
| 847 | |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 848 | #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |