[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 <set> |
| 9 | #include <vector> |
| 10 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 11 | #include "base/basictypes.h" |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 12 | #include "base/files/file_path.h" |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 13 | #include "base/observer_list.h" |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 14 | #include "base/process/process_handle.h" |
| 15 | #include "base/strings/string16.h" |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 16 | #include "content/public/renderer/render_frame.h" |
| 17 | #include "ipc/ipc_message.h" |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 18 | #include "third_party/WebKit/public/web/WebDataSource.h" |
| 19 | #include "third_party/WebKit/public/web/WebFrameClient.h" |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 20 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 21 | class TransportDIB; |
| 22 | |
| 23 | namespace blink { |
| 24 | class WebMouseEvent; |
| 25 | struct WebCompositionUnderline; |
| 26 | struct WebCursorInfo; |
| 27 | } |
| 28 | |
| 29 | namespace gfx { |
| 30 | class Range; |
| 31 | class Rect; |
| 32 | } |
| 33 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 34 | namespace content { |
| 35 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 36 | class PepperPluginInstanceImpl; |
| 37 | class RendererPpapiHost; |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 38 | class RenderFrameObserver; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 39 | class RenderViewImpl; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 40 | class RenderWidget; |
| 41 | class RenderWidgetFullscreenPepper; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 42 | |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 43 | class CONTENT_EXPORT RenderFrameImpl |
| 44 | : public RenderFrame, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 45 | NON_EXPORTED_BASE(public blink::WebFrameClient) { |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 46 | public: |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 47 | // Creates a new RenderFrame. |render_view| is the RenderView object that this |
| 48 | // frame belongs to. |
| 49 | static RenderFrameImpl* Create(RenderViewImpl* render_view, int32 routing_id); |
| 50 | |
| 51 | // Used by content_layouttest_support to hook into the creation of |
| 52 | // RenderFrameImpls. |
| 53 | static void InstallCreateHook( |
| 54 | RenderFrameImpl* (*create_render_frame_impl)(RenderViewImpl*, int32)); |
| 55 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 56 | virtual ~RenderFrameImpl(); |
| 57 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 58 | // TODO(jam): this is a temporary getter until all the code is transitioned |
| 59 | // to using RenderFrame instead of RenderView. |
| 60 | RenderViewImpl* render_view() { return render_view_; } |
| 61 | |
| 62 | // Returns the RenderWidget associated with this frame. |
| 63 | RenderWidget* GetRenderWidget(); |
| 64 | |
| 65 | #if defined(ENABLE_PLUGINS) |
[email protected] | 271ff579 | 2013-12-04 22:29:31 | [diff] [blame] | 66 | // Notification that a PPAPI plugin has been created. |
| 67 | void PepperPluginCreated(RendererPpapiHost* host); |
| 68 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 69 | // Indicates that the given instance has been created. |
| 70 | void PepperInstanceCreated(PepperPluginInstanceImpl* instance); |
| 71 | |
| 72 | // Indicates that the given instance is being destroyed. This is called from |
| 73 | // the destructor, so it's important that the instance is not dereferenced |
| 74 | // from this call. |
| 75 | void PepperInstanceDeleted(PepperPluginInstanceImpl* instance); |
| 76 | |
| 77 | // Notifies that |instance| has changed the cursor. |
| 78 | // This will update the cursor appearance if it is currently over the plugin |
| 79 | // instance. |
| 80 | void PepperDidChangeCursor(PepperPluginInstanceImpl* instance, |
| 81 | const blink::WebCursorInfo& cursor); |
| 82 | |
| 83 | // Notifies that |instance| has received a mouse event. |
| 84 | void PepperDidReceiveMouseEvent(PepperPluginInstanceImpl* instance); |
| 85 | |
| 86 | // Notification that the given plugin is focused or unfocused. |
| 87 | void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused); |
| 88 | |
| 89 | // Informs the render view that a PPAPI plugin has changed text input status. |
| 90 | void PepperTextInputTypeChanged(PepperPluginInstanceImpl* instance); |
| 91 | void PepperCaretPositionChanged(PepperPluginInstanceImpl* instance); |
| 92 | |
| 93 | // Cancels current composition. |
| 94 | void PepperCancelComposition(PepperPluginInstanceImpl* instance); |
| 95 | |
| 96 | // Informs the render view that a PPAPI plugin has changed selection. |
| 97 | void PepperSelectionChanged(PepperPluginInstanceImpl* instance); |
| 98 | |
| 99 | // Creates a fullscreen container for a pepper plugin instance. |
| 100 | RenderWidgetFullscreenPepper* CreatePepperFullscreenContainer( |
| 101 | PepperPluginInstanceImpl* plugin); |
| 102 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 103 | bool IsPepperAcceptingCompositionEvents() const; |
| 104 | |
| 105 | // Notification that the given plugin has crashed. |
| 106 | void PluginCrashed(const base::FilePath& plugin_path, |
| 107 | base::ProcessId plugin_pid); |
| 108 | |
| 109 | // These map to virtual methods on RenderWidget that are used to call out to |
| 110 | // RenderView. |
| 111 | // TODO(jam): once we get rid of RenderView, RenderFrame will own RenderWidget |
| 112 | // and methods would be on a delegate interface. |
| 113 | void DidInitiatePaint(); |
| 114 | void DidFlushPaint(); |
| 115 | PepperPluginInstanceImpl* GetBitmapForOptimizedPluginPaint( |
| 116 | const gfx::Rect& paint_bounds, |
| 117 | TransportDIB** dib, |
| 118 | gfx::Rect* location, |
| 119 | gfx::Rect* clip, |
| 120 | float* scale_factor); |
| 121 | void PageVisibilityChanged(bool shown); |
| 122 | void OnSetFocus(bool enable); |
| 123 | void WillHandleMouseEvent(const blink::WebMouseEvent& event); |
| 124 | |
| 125 | // Simulates IME events for testing purpose. |
| 126 | void SimulateImeSetComposition( |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 127 | const base::string16& text, |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 128 | const std::vector<blink::WebCompositionUnderline>& underlines, |
| 129 | int selection_start, |
| 130 | int selection_end); |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 131 | void SimulateImeConfirmComposition(const base::string16& text, |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 132 | const gfx::Range& replacement_range); |
| 133 | |
| 134 | // TODO(jam): remove these once the IPC handler moves from RenderView to |
| 135 | // RenderFrame. |
| 136 | void OnImeSetComposition( |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 137 | const base::string16& text, |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 138 | const std::vector<blink::WebCompositionUnderline>& underlines, |
| 139 | int selection_start, |
| 140 | int selection_end); |
| 141 | void OnImeConfirmComposition( |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 142 | const base::string16& text, |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 143 | const gfx::Range& replacement_range, |
| 144 | bool keep_selection); |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 145 | #endif // ENABLE_PLUGINS |
| 146 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 147 | // IPC::Sender |
| 148 | virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 149 | |
| 150 | // IPC::Listener |
| 151 | virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 152 | |
[email protected] | 271ff579 | 2013-12-04 22:29:31 | [diff] [blame] | 153 | // RenderFrame implementation: |
[email protected] | b849847b | 2013-12-10 21:57:58 | [diff] [blame^] | 154 | virtual RenderView* GetRenderView() OVERRIDE; |
[email protected] | 60eca4eb | 2013-12-06 00:02:16 | [diff] [blame] | 155 | virtual int GetRoutingID() OVERRIDE; |
[email protected] | 271ff579 | 2013-12-04 22:29:31 | [diff] [blame] | 156 | virtual blink::WebPlugin* CreatePlugin( |
| 157 | blink::WebFrame* frame, |
| 158 | const WebPluginInfo& info, |
| 159 | const blink::WebPluginParams& params) OVERRIDE; |
| 160 | |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 161 | // blink::WebFrameClient implementation ------------------------------------- |
| 162 | virtual blink::WebPlugin* createPlugin( |
| 163 | blink::WebFrame* frame, |
| 164 | const blink::WebPluginParams& params); |
| 165 | virtual blink::WebMediaPlayer* createMediaPlayer( |
| 166 | blink::WebFrame* frame, |
| 167 | const blink::WebURL& url, |
| 168 | blink::WebMediaPlayerClient* client); |
| 169 | virtual blink::WebApplicationCacheHost* createApplicationCacheHost( |
| 170 | blink::WebFrame* frame, |
| 171 | blink::WebApplicationCacheHostClient* client); |
| 172 | virtual blink::WebWorkerPermissionClientProxy* |
| 173 | createWorkerPermissionClientProxy(blink::WebFrame* frame); |
| 174 | virtual blink::WebCookieJar* cookieJar(blink::WebFrame* frame); |
| 175 | virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
| 176 | blink::WebFrame* frame, |
| 177 | blink::WebServiceWorkerProviderClient*); |
| 178 | virtual void didAccessInitialDocument(blink::WebFrame* frame); |
| 179 | virtual blink::WebFrame* createChildFrame(blink::WebFrame* parent, |
| 180 | const blink::WebString& name); |
| 181 | virtual void didDisownOpener(blink::WebFrame* frame); |
| 182 | virtual void frameDetached(blink::WebFrame* frame); |
| 183 | virtual void willClose(blink::WebFrame* frame); |
| 184 | virtual void didChangeName(blink::WebFrame* frame, |
| 185 | const blink::WebString& name); |
[email protected] | f5b6dd112 | 2013-10-04 02:42:50 | [diff] [blame] | 186 | virtual void didMatchCSS( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 187 | blink::WebFrame* frame, |
| 188 | const blink::WebVector<blink::WebString>& newly_matching_selectors, |
| 189 | const blink::WebVector<blink::WebString>& stopped_matching_selectors); |
| 190 | virtual void loadURLExternally(blink::WebFrame* frame, |
| 191 | const blink::WebURLRequest& request, |
| 192 | blink::WebNavigationPolicy policy); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 193 | virtual void loadURLExternally( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 194 | blink::WebFrame* frame, |
| 195 | const blink::WebURLRequest& request, |
| 196 | blink::WebNavigationPolicy policy, |
| 197 | const blink::WebString& suggested_name); |
| 198 | virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
| 199 | blink::WebFrame* frame, |
| 200 | blink::WebDataSource::ExtraData* extra_data, |
| 201 | const blink::WebURLRequest& request, |
| 202 | blink::WebNavigationType type, |
| 203 | blink::WebNavigationPolicy default_policy, |
[email protected] | f6ae17fc | 2013-08-19 22:56:17 | [diff] [blame] | 204 | bool is_redirect); |
| 205 | // DEPRECATED |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 206 | virtual blink::WebNavigationPolicy decidePolicyForNavigation( |
| 207 | blink::WebFrame* frame, |
| 208 | const blink::WebURLRequest& request, |
| 209 | blink::WebNavigationType type, |
| 210 | blink::WebNavigationPolicy default_policy, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 211 | bool is_redirect); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 212 | virtual void willSendSubmitEvent(blink::WebFrame* frame, |
| 213 | const blink::WebFormElement& form); |
| 214 | virtual void willSubmitForm(blink::WebFrame* frame, |
| 215 | const blink::WebFormElement& form); |
| 216 | virtual void didCreateDataSource(blink::WebFrame* frame, |
| 217 | blink::WebDataSource* datasource); |
| 218 | virtual void didStartProvisionalLoad(blink::WebFrame* frame); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 219 | virtual void didReceiveServerRedirectForProvisionalLoad( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 220 | blink::WebFrame* frame); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 221 | virtual void didFailProvisionalLoad( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 222 | blink::WebFrame* frame, |
| 223 | const blink::WebURLError& error); |
| 224 | virtual void didCommitProvisionalLoad(blink::WebFrame* frame, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 225 | bool is_new_navigation); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 226 | virtual void didClearWindowObject(blink::WebFrame* frame); |
| 227 | virtual void didCreateDocumentElement(blink::WebFrame* frame); |
| 228 | virtual void didReceiveTitle(blink::WebFrame* frame, |
| 229 | const blink::WebString& title, |
| 230 | blink::WebTextDirection direction); |
| 231 | virtual void didChangeIcon(blink::WebFrame* frame, |
| 232 | blink::WebIconURL::Type icon_type); |
| 233 | virtual void didFinishDocumentLoad(blink::WebFrame* frame); |
| 234 | virtual void didHandleOnloadEvents(blink::WebFrame* frame); |
| 235 | virtual void didFailLoad(blink::WebFrame* frame, |
| 236 | const blink::WebURLError& error); |
| 237 | virtual void didFinishLoad(blink::WebFrame* frame); |
| 238 | virtual void didNavigateWithinPage(blink::WebFrame* frame, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 239 | bool is_new_navigation); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 240 | virtual void didUpdateCurrentHistoryItem(blink::WebFrame* frame); |
| 241 | virtual void willRequestAfterPreconnect(blink::WebFrame* frame, |
| 242 | blink::WebURLRequest& request); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 243 | virtual void willSendRequest( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 244 | blink::WebFrame* frame, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 245 | unsigned identifier, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 246 | blink::WebURLRequest& request, |
| 247 | const blink::WebURLResponse& redirect_response); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 248 | virtual void didReceiveResponse( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 249 | blink::WebFrame* frame, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 250 | unsigned identifier, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 251 | const blink::WebURLResponse& response); |
| 252 | virtual void didFinishResourceLoad(blink::WebFrame* frame, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 253 | unsigned identifier); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 254 | virtual void didLoadResourceFromMemoryCache( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 255 | blink::WebFrame* frame, |
| 256 | const blink::WebURLRequest& request, |
| 257 | const blink::WebURLResponse& response); |
| 258 | virtual void didDisplayInsecureContent(blink::WebFrame* frame); |
| 259 | virtual void didRunInsecureContent(blink::WebFrame* frame, |
| 260 | const blink::WebSecurityOrigin& origin, |
| 261 | const blink::WebURL& target); |
| 262 | virtual void didAbortLoading(blink::WebFrame* frame); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 263 | virtual void didExhaustMemoryAvailableForScript( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 264 | blink::WebFrame* frame); |
| 265 | virtual void didCreateScriptContext(blink::WebFrame* frame, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 266 | v8::Handle<v8::Context> context, |
| 267 | int extension_group, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 268 | int world_id); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 269 | virtual void willReleaseScriptContext(blink::WebFrame* frame, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 270 | v8::Handle<v8::Context> context, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 271 | int world_id); |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 272 | virtual void didFirstVisuallyNonEmptyLayout(blink::WebFrame* frame); |
| 273 | virtual void didChangeContentsSize(blink::WebFrame* frame, |
| 274 | const blink::WebSize& size); |
| 275 | virtual void didChangeScrollOffset(blink::WebFrame* frame); |
| 276 | virtual void willInsertBody(blink::WebFrame* frame); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 277 | virtual void reportFindInPageMatchCount(int request_id, |
| 278 | int count, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 279 | bool final_update); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 280 | virtual void reportFindInPageSelection(int request_id, |
| 281 | int active_match_ordinal, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 282 | const blink::WebRect& sel); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 283 | virtual void requestStorageQuota( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 284 | blink::WebFrame* frame, |
| 285 | blink::WebStorageQuotaType type, |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 286 | unsigned long long requested_size, |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 287 | blink::WebStorageQuotaCallbacks* callbacks); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 288 | virtual void willOpenSocketStream( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 289 | blink::WebSocketStreamHandle* handle); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 290 | virtual void willStartUsingPeerConnectionHandler( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 291 | blink::WebFrame* frame, |
| 292 | blink::WebRTCPeerConnectionHandler* handler); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 293 | virtual bool willCheckAndDispatchMessageEvent( |
[email protected] | 180ef24 | 2013-11-07 06:50:46 | [diff] [blame] | 294 | blink::WebFrame* sourceFrame, |
| 295 | blink::WebFrame* targetFrame, |
| 296 | blink::WebSecurityOrigin targetOrigin, |
| 297 | blink::WebDOMMessageEvent event); |
| 298 | virtual blink::WebString userAgentOverride( |
| 299 | blink::WebFrame* frame, |
| 300 | const blink::WebURL& url); |
| 301 | virtual blink::WebString doNotTrackValue(blink::WebFrame* frame); |
| 302 | virtual bool allowWebGL(blink::WebFrame* frame, bool default_value); |
| 303 | virtual void didLoseWebGLContext(blink::WebFrame* frame, |
[email protected] | 255eea09 | 2013-06-28 17:19:14 | [diff] [blame] | 304 | int arb_robustness_status_code); |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 305 | |
[email protected] | 2f61bdd | 2013-07-02 18:38:47 | [diff] [blame] | 306 | protected: |
| 307 | RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); |
| 308 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 309 | private: |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 310 | friend class RenderFrameObserver; |
| 311 | |
| 312 | // Functions to add and remove observers for this object. |
| 313 | void AddObserver(RenderFrameObserver* observer); |
| 314 | void RemoveObserver(RenderFrameObserver* observer); |
[email protected] | 1c2052f | 2013-08-28 08:24:34 | [diff] [blame] | 315 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 316 | RenderViewImpl* render_view_; |
| 317 | int routing_id_; |
[email protected] | 1c2052f | 2013-08-28 08:24:34 | [diff] [blame] | 318 | bool is_swapped_out_; |
| 319 | bool is_detaching_; |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 320 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 321 | #if defined(ENABLE_PLUGINS) |
| 322 | typedef std::set<PepperPluginInstanceImpl*> PepperPluginSet; |
| 323 | PepperPluginSet active_pepper_instances_; |
| 324 | |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 325 | // Current text input composition text. Empty if no composition is in |
| 326 | // progress. |
[email protected] | fcf75d4 | 2013-12-03 20:11:26 | [diff] [blame] | 327 | base::string16 pepper_composition_text_; |
[email protected] | 7a4e253 | 2013-12-02 21:30:02 | [diff] [blame] | 328 | #endif |
| 329 | |
[email protected] | 2e2d963 | 2013-12-03 00:55:26 | [diff] [blame] | 330 | // All the registered observers. |
| 331 | ObserverList<RenderFrameObserver> observers_; |
| 332 | |
[email protected] | 227692c5 | 2013-05-31 22:43:04 | [diff] [blame] | 333 | DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 334 | }; |
| 335 | |
| 336 | } // namespace content |
| 337 | |
[email protected] | 85d85fd | 2013-06-19 00:57:41 | [diff] [blame] | 338 | #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |