| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 // Called by RenderWidget when meaningful layout has happened. | 240 // Called by RenderWidget when meaningful layout has happened. |
| 241 // See RenderFrameObserver::DidMeaningfulLayout declaration for details. | 241 // See RenderFrameObserver::DidMeaningfulLayout declaration for details. |
| 242 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type); | 242 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type); |
| 243 | 243 |
| 244 // Out-of-process child frames receive a signal from RenderWidgetCompositor | 244 // Out-of-process child frames receive a signal from RenderWidgetCompositor |
| 245 // when a compositor frame has committed. | 245 // when a compositor frame has committed. |
| 246 void DidCommitCompositorFrame(); | 246 void DidCommitCompositorFrame(); |
| 247 | 247 |
| 248 // Draw commands have been issued by RenderWidgetCompositor. |
| 249 void DidCommitAndDrawCompositorFrame(); |
| 250 |
| 248 // TODO(jam): this is a temporary getter until all the code is transitioned | 251 // TODO(jam): this is a temporary getter until all the code is transitioned |
| 249 // to using RenderFrame instead of RenderView. | 252 // to using RenderFrame instead of RenderView. |
| 250 RenderViewImpl* render_view() { return render_view_.get(); } | 253 RenderViewImpl* render_view() { return render_view_.get(); } |
| 251 | 254 |
| 252 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; } | 255 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; } |
| 253 | 256 |
| 254 // Returns the RenderWidget associated with this frame. | 257 // Returns the RenderWidget associated with this frame. |
| 255 RenderWidget* GetRenderWidget(); | 258 RenderWidget* GetRenderWidget(); |
| 256 | 259 |
| 257 DevToolsAgent* devtools_agent() { return devtools_agent_; } | 260 DevToolsAgent* devtools_agent() { return devtools_agent_; } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 292 |
| 290 // The focused node changed to |node|. If focus was lost from this frame, | 293 // The focused node changed to |node|. If focus was lost from this frame, |
| 291 // |node| will be null. | 294 // |node| will be null. |
| 292 void FocusedNodeChanged(const blink::WebNode& node); | 295 void FocusedNodeChanged(const blink::WebNode& node); |
| 293 | 296 |
| 294 // TODO(dmazzoni): the only reason this is here is to plumb it through to | 297 // TODO(dmazzoni): the only reason this is here is to plumb it through to |
| 295 // RendererAccessibility. It should use the RenderFrameObserver method, once | 298 // RendererAccessibility. It should use the RenderFrameObserver method, once |
| 296 // blink has a separate accessibility tree per frame. | 299 // blink has a separate accessibility tree per frame. |
| 297 void FocusedNodeChangedForAccessibility(const blink::WebNode& node); | 300 void FocusedNodeChangedForAccessibility(const blink::WebNode& node); |
| 298 | 301 |
| 302 // Called when this frame's widget is focused. |
| 303 void RenderWidgetSetFocus(bool enable); |
| 304 |
| 305 // Called when the widget receives a mouse event. |
| 306 void RenderWidgetWillHandleMouseEvent(); |
| 307 |
| 299 #if defined(ENABLE_PLUGINS) | 308 #if defined(ENABLE_PLUGINS) |
| 300 // Get/set the plugin which will be used to handle document find requests. | 309 // Get/set the plugin which will be used to handle document find requests. |
| 301 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { | 310 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { |
| 302 plugin_find_handler_ = plugin; | 311 plugin_find_handler_ = plugin; |
| 303 } | 312 } |
| 304 PepperPluginInstanceImpl* plugin_find_handler() { | 313 PepperPluginInstanceImpl* plugin_find_handler() { |
| 305 return plugin_find_handler_; | 314 return plugin_find_handler_; |
| 306 } | 315 } |
| 307 | 316 |
| 308 // Notification that a PPAPI plugin has been created. | 317 // Notification that a PPAPI plugin has been created. |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 | 649 |
| 641 // Sends the current frame's navigation state to the browser. | 650 // Sends the current frame's navigation state to the browser. |
| 642 void SendUpdateState(); | 651 void SendUpdateState(); |
| 643 | 652 |
| 644 // Creates a MojoBindingsController if Mojo bindings have been enabled for | 653 // Creates a MojoBindingsController if Mojo bindings have been enabled for |
| 645 // this frame. For WebUI, this allows the page to communicate with the browser | 654 // this frame. For WebUI, this allows the page to communicate with the browser |
| 646 // process; for layout tests, this allows the test to mock out services at | 655 // process; for layout tests, this allows the test to mock out services at |
| 647 // the Mojo IPC layer. | 656 // the Mojo IPC layer. |
| 648 void MaybeEnableMojoBindings(); | 657 void MaybeEnableMojoBindings(); |
| 649 | 658 |
| 659 // Plugin-related functions -------------------------------------------------- |
| 660 |
| 661 #if defined(ENABLE_PLUGINS) |
| 662 PepperPluginInstanceImpl* focused_pepper_plugin() { |
| 663 return focused_pepper_plugin_; |
| 664 } |
| 665 PepperPluginInstanceImpl* pepper_last_mouse_event_target() { |
| 666 return pepper_last_mouse_event_target_; |
| 667 } |
| 668 void set_pepper_last_mouse_event_target(PepperPluginInstanceImpl* plugin) { |
| 669 pepper_last_mouse_event_target_ = plugin; |
| 670 } |
| 671 |
| 672 // Indicates that the given instance has been created. |
| 673 void PepperInstanceCreated(PepperPluginInstanceImpl* instance); |
| 674 |
| 675 // Indicates that the given instance is being destroyed. This is called from |
| 676 // the destructor, so it's important that the instance is not dereferenced |
| 677 // from this call. |
| 678 void PepperInstanceDeleted(PepperPluginInstanceImpl* instance); |
| 679 |
| 680 // Notification that the given plugin is focused or unfocused. |
| 681 void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused); |
| 682 #endif // ENABLE_PLUGINS |
| 683 |
| 650 protected: | 684 protected: |
| 651 explicit RenderFrameImpl(const CreateParams& params); | 685 explicit RenderFrameImpl(const CreateParams& params); |
| 652 | 686 |
| 653 private: | 687 private: |
| 654 friend class RenderFrameImplTest; | 688 friend class RenderFrameImplTest; |
| 655 friend class RenderFrameObserver; | 689 friend class RenderFrameObserver; |
| 656 friend class RendererAccessibilityTest; | 690 friend class RendererAccessibilityTest; |
| 657 friend class TestRenderFrame; | 691 friend class TestRenderFrame; |
| 658 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); | 692 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); |
| 659 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 693 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 // stack that interferes with swapping out. | 1231 // stack that interferes with swapping out. |
| 1198 bool suppress_further_dialogs_; | 1232 bool suppress_further_dialogs_; |
| 1199 | 1233 |
| 1200 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1234 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1201 // The external popup for the currently showing select popup. | 1235 // The external popup for the currently showing select popup. |
| 1202 std::unique_ptr<ExternalPopupMenu> external_popup_menu_; | 1236 std::unique_ptr<ExternalPopupMenu> external_popup_menu_; |
| 1203 #endif | 1237 #endif |
| 1204 | 1238 |
| 1205 FrameBlameContext* blame_context_; // Not owned. | 1239 FrameBlameContext* blame_context_; // Not owned. |
| 1206 | 1240 |
| 1241 // Plugins ------------------------------------------------------------------- |
| 1242 #if defined(ENABLE_PLUGINS) |
| 1243 typedef std::set<PepperPluginInstanceImpl*> PepperPluginSet; |
| 1244 PepperPluginSet active_pepper_instances_; |
| 1245 |
| 1246 // Whether or not the focus is on a PPAPI plugin |
| 1247 PepperPluginInstanceImpl* focused_pepper_plugin_; |
| 1248 |
| 1249 // The plugin instance that received the last mouse event. It is set to NULL |
| 1250 // if the last mouse event went to elements other than Pepper plugins. |
| 1251 // |pepper_last_mouse_event_target_| is not owned by this class. We depend on |
| 1252 // the RenderFrameImpl to NULL it out when it destructs. |
| 1253 PepperPluginInstanceImpl* pepper_last_mouse_event_target_; |
| 1254 #endif |
| 1255 |
| 1207 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1256 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1208 | 1257 |
| 1209 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1258 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1210 }; | 1259 }; |
| 1211 | 1260 |
| 1212 } // namespace content | 1261 } // namespace content |
| 1213 | 1262 |
| 1214 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1263 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |