| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "content/renderer/renderer_webcookiejar_impl.h" | 26 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 27 #include "ipc/ipc_message.h" | 27 #include "ipc/ipc_message.h" |
| 28 #include "media/blink/webmediaplayer_delegate.h" | 28 #include "media/blink/webmediaplayer_delegate.h" |
| 29 #include "media/blink/webmediaplayer_params.h" | 29 #include "media/blink/webmediaplayer_params.h" |
| 30 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 30 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
| 31 #include "mojo/application/public/interfaces/shell.mojom.h" | 31 #include "mojo/application/public/interfaces/shell.mojom.h" |
| 32 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 32 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
| 33 #include "third_party/WebKit/public/web/WebAXObject.h" | 33 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 34 #include "third_party/WebKit/public/web/WebDataSource.h" | 34 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 35 #include "third_party/WebKit/public/web/WebFrameClient.h" | 35 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 36 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" |
| 36 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" | 37 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" |
| 37 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" | 38 #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" |
| 38 #include "ui/gfx/range/range.h" | 39 #include "ui/gfx/range/range.h" |
| 39 | 40 |
| 40 #if defined(ENABLE_PLUGINS) | 41 #if defined(ENABLE_PLUGINS) |
| 41 #include "content/renderer/pepper/plugin_power_saver_helper.h" | 42 #include "content/renderer/pepper/plugin_power_saver_helper.h" |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 #if defined(OS_ANDROID) | 45 #if defined(OS_ANDROID) |
| 45 #include "content/renderer/media/android/renderer_media_player_manager.h" | 46 #include "content/renderer/media/android/renderer_media_player_manager.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // the frame tree after the frame identified by | 143 // the frame tree after the frame identified by |
| 143 // |previous_sibling_routing_id|, or as the first child if | 144 // |previous_sibling_routing_id|, or as the first child if |
| 144 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is | 145 // |previous_sibling_routing_id| is MSG_ROUTING_NONE. Otherwise, the frame is |
| 145 // semi-orphaned until it commits, at which point it replaces the proxy | 146 // semi-orphaned until it commits, at which point it replaces the proxy |
| 146 // identified by |proxy_routing_id|. The frame's opener is set to the frame | 147 // identified by |proxy_routing_id|. The frame's opener is set to the frame |
| 147 // identified by |opener_routing_id|. The frame is created as a child of the | 148 // identified by |opener_routing_id|. The frame is created as a child of the |
| 148 // RenderFrame identified by |parent_routing_id| or as the top-level frame if | 149 // RenderFrame identified by |parent_routing_id| or as the top-level frame if |
| 149 // the latter is MSG_ROUTING_NONE. Note: This is called only when | 150 // the latter is MSG_ROUTING_NONE. Note: This is called only when |
| 150 // RenderFrame is being created in response to IPC message from the browser | 151 // RenderFrame is being created in response to IPC message from the browser |
| 151 // process. All other frame creation is driven through Blink and Create. | 152 // process. All other frame creation is driven through Blink and Create. |
| 152 static void CreateFrame(int routing_id, | 153 static void CreateFrame( |
| 153 int proxy_routing_id, | 154 int routing_id, |
| 154 int opener_routing_id, | 155 int proxy_routing_id, |
| 155 int parent_routing_id, | 156 int opener_routing_id, |
| 156 int previous_sibling_routing_id, | 157 int parent_routing_id, |
| 157 const FrameReplicationState& replicated_state, | 158 int previous_sibling_routing_id, |
| 158 CompositorDependencies* compositor_deps, | 159 const FrameReplicationState& replicated_state, |
| 159 const FrameMsg_NewFrame_WidgetParams& params); | 160 CompositorDependencies* compositor_deps, |
| 161 const FrameMsg_NewFrame_WidgetParams& params, |
| 162 const blink::WebFrameOwnerProperties& frameOwner_properties); |
| 160 | 163 |
| 161 // Returns the RenderFrameImpl for the given routing ID. | 164 // Returns the RenderFrameImpl for the given routing ID. |
| 162 static RenderFrameImpl* FromRoutingID(int routing_id); | 165 static RenderFrameImpl* FromRoutingID(int routing_id); |
| 163 | 166 |
| 164 // Just like RenderFrame::FromWebFrame but returns the implementation. | 167 // Just like RenderFrame::FromWebFrame but returns the implementation. |
| 165 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); | 168 static RenderFrameImpl* FromWebFrame(blink::WebFrame* web_frame); |
| 166 | 169 |
| 167 // Used by content_layouttest_support to hook into the creation of | 170 // Used by content_layouttest_support to hook into the creation of |
| 168 // RenderFrameImpls. | 171 // RenderFrameImpls. |
| 169 struct CreateParams { | 172 struct CreateParams { |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 const blink::WebPopupMenuInfo& popup_menu_info, | 389 const blink::WebPopupMenuInfo& popup_menu_info, |
| 387 blink::WebExternalPopupMenuClient* popup_menu_client); | 390 blink::WebExternalPopupMenuClient* popup_menu_client); |
| 388 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); | 391 virtual blink::WebCookieJar* cookieJar(blink::WebLocalFrame* frame); |
| 389 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( | 392 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider( |
| 390 blink::WebLocalFrame* frame); | 393 blink::WebLocalFrame* frame); |
| 391 virtual void didAccessInitialDocument(blink::WebLocalFrame* frame); | 394 virtual void didAccessInitialDocument(blink::WebLocalFrame* frame); |
| 392 virtual blink::WebFrame* createChildFrame( | 395 virtual blink::WebFrame* createChildFrame( |
| 393 blink::WebLocalFrame* parent, | 396 blink::WebLocalFrame* parent, |
| 394 blink::WebTreeScopeType scope, | 397 blink::WebTreeScopeType scope, |
| 395 const blink::WebString& name, | 398 const blink::WebString& name, |
| 396 blink::WebSandboxFlags sandboxFlags); | 399 blink::WebSandboxFlags sandboxFlags, |
| 400 const blink::WebFrameOwnerProperties& frameOwnerProperties); |
| 397 virtual void didChangeOpener(blink::WebFrame* frame); | 401 virtual void didChangeOpener(blink::WebFrame* frame); |
| 398 virtual void frameDetached(blink::WebFrame* frame, DetachType type); | 402 virtual void frameDetached(blink::WebFrame* frame, DetachType type); |
| 399 virtual void frameFocused(); | 403 virtual void frameFocused(); |
| 400 virtual void willClose(blink::WebFrame* frame); | 404 virtual void willClose(blink::WebFrame* frame); |
| 401 virtual void didChangeName(blink::WebLocalFrame* frame, | 405 virtual void didChangeName(blink::WebLocalFrame* frame, |
| 402 const blink::WebString& name); | 406 const blink::WebString& name); |
| 403 virtual void didChangeSandboxFlags(blink::WebFrame* child_frame, | 407 virtual void didChangeSandboxFlags(blink::WebFrame* child_frame, |
| 404 blink::WebSandboxFlags flags); | 408 blink::WebSandboxFlags flags); |
| 409 virtual void didChangeScrollingMode( |
| 410 blink::WebFrame* child_frame, |
| 411 blink::WebFrameOwnerProperties::ScrollingMode scrolling_mode); |
| 412 virtual void didChangeMarginWidth(blink::WebFrame* child_frame, |
| 413 int marginWidth); |
| 414 virtual void didChangeMarginHeight(blink::WebFrame* child_frame, |
| 415 int marginHeight); |
| 405 virtual void didMatchCSS( | 416 virtual void didMatchCSS( |
| 406 blink::WebLocalFrame* frame, | 417 blink::WebLocalFrame* frame, |
| 407 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 418 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
| 408 const blink::WebVector<blink::WebString>& stopped_matching_selectors); | 419 const blink::WebVector<blink::WebString>& stopped_matching_selectors); |
| 409 virtual bool shouldReportDetailedMessageForSource( | 420 virtual bool shouldReportDetailedMessageForSource( |
| 410 const blink::WebString& source); | 421 const blink::WebString& source); |
| 411 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, | 422 virtual void didAddMessageToConsole(const blink::WebConsoleMessage& message, |
| 412 const blink::WebString& source_name, | 423 const blink::WebString& source_name, |
| 413 unsigned source_line, | 424 unsigned source_line, |
| 414 const blink::WebString& stack_trace); | 425 const blink::WebString& stack_trace); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 int start, int end, | 700 int start, int end, |
| 690 const std::vector<blink::WebCompositionUnderline>& underlines); | 701 const std::vector<blink::WebCompositionUnderline>& underlines); |
| 691 void OnExecuteNoValueEditCommand(const std::string& name); | 702 void OnExecuteNoValueEditCommand(const std::string& name); |
| 692 void OnExtendSelectionAndDelete(int before, int after); | 703 void OnExtendSelectionAndDelete(int before, int after); |
| 693 void OnReload(bool ignore_cache); | 704 void OnReload(bool ignore_cache); |
| 694 void OnTextSurroundingSelectionRequest(size_t max_length); | 705 void OnTextSurroundingSelectionRequest(size_t max_length); |
| 695 void OnSetAccessibilityMode(AccessibilityMode new_mode); | 706 void OnSetAccessibilityMode(AccessibilityMode new_mode); |
| 696 void OnSnapshotAccessibilityTree(int callback_id); | 707 void OnSnapshotAccessibilityTree(int callback_id); |
| 697 void OnUpdateOpener(int opener_routing_id); | 708 void OnUpdateOpener(int opener_routing_id); |
| 698 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); | 709 void OnDidUpdateSandboxFlags(blink::WebSandboxFlags flags); |
| 710 void OnSetFrameOwnerProperties( |
| 711 const blink::WebFrameOwnerProperties& frame_owner_properties); |
| 699 void OnTextTrackSettingsChanged( | 712 void OnTextTrackSettingsChanged( |
| 700 const FrameMsg_TextTrackSettings_Params& params); | 713 const FrameMsg_TextTrackSettings_Params& params); |
| 701 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); | 714 void OnPostMessageEvent(const FrameMsg_PostMessage_Params& params); |
| 702 #if defined(OS_ANDROID) | 715 #if defined(OS_ANDROID) |
| 703 void OnSelectPopupMenuItems(bool canceled, | 716 void OnSelectPopupMenuItems(bool canceled, |
| 704 const std::vector<int>& selected_indices); | 717 const std::vector<int>& selected_indices); |
| 705 #elif defined(OS_MACOSX) | 718 #elif defined(OS_MACOSX) |
| 706 void OnSelectPopupMenuItem(int selected_index); | 719 void OnSelectPopupMenuItem(int selected_index); |
| 707 void OnCopyToFindPboard(); | 720 void OnCopyToFindPboard(); |
| 708 #endif | 721 #endif |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 GURL GetLoadingUrl() const; | 829 GURL GetLoadingUrl() const; |
| 817 | 830 |
| 818 // If we initiated a navigation, this function will populate |document_state| | 831 // If we initiated a navigation, this function will populate |document_state| |
| 819 // with the navigation information saved in OnNavigate(). | 832 // with the navigation information saved in OnNavigate(). |
| 820 void PopulateDocumentStateFromPending(DocumentState* document_state); | 833 void PopulateDocumentStateFromPending(DocumentState* document_state); |
| 821 | 834 |
| 822 // Returns a new NavigationState populated with the navigation information | 835 // Returns a new NavigationState populated with the navigation information |
| 823 // saved in OnNavigate(). | 836 // saved in OnNavigate(). |
| 824 NavigationState* CreateNavigationStateFromPending(); | 837 NavigationState* CreateNavigationStateFromPending(); |
| 825 | 838 |
| 839 void DidChangeFrameOwnerProperties(int frame_routing_id); |
| 840 |
| 826 #if defined(OS_ANDROID) | 841 #if defined(OS_ANDROID) |
| 827 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( | 842 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( |
| 828 blink::WebMediaPlayerClient* client, | 843 blink::WebMediaPlayerClient* client, |
| 829 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, | 844 blink::WebMediaPlayerEncryptedMediaClient* encrypted_client, |
| 830 const media::WebMediaPlayerParams& params); | 845 const media::WebMediaPlayerParams& params); |
| 831 | 846 |
| 832 RendererMediaPlayerManager* GetMediaPlayerManager(); | 847 RendererMediaPlayerManager* GetMediaPlayerManager(); |
| 833 #endif | 848 #endif |
| 834 | 849 |
| 835 bool AreSecureCodecsSupported(); | 850 bool AreSecureCodecsSupported(); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 // process. | 1032 // process. |
| 1018 ManifestManager* manifest_manager_; | 1033 ManifestManager* manifest_manager_; |
| 1019 | 1034 |
| 1020 // The current accessibility mode. | 1035 // The current accessibility mode. |
| 1021 AccessibilityMode accessibility_mode_; | 1036 AccessibilityMode accessibility_mode_; |
| 1022 | 1037 |
| 1023 // Only valid if |accessibility_mode_| is anything other than | 1038 // Only valid if |accessibility_mode_| is anything other than |
| 1024 // AccessibilityModeOff. | 1039 // AccessibilityModeOff. |
| 1025 RendererAccessibility* renderer_accessibility_; | 1040 RendererAccessibility* renderer_accessibility_; |
| 1026 | 1041 |
| 1042 blink::WebFrameOwnerProperties frame_owner_properties_; |
| 1043 |
| 1027 scoped_ptr<PermissionDispatcher> permission_client_; | 1044 scoped_ptr<PermissionDispatcher> permission_client_; |
| 1028 | 1045 |
| 1029 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; | 1046 scoped_ptr<blink::WebAppBannerClient> app_banner_client_; |
| 1030 | 1047 |
| 1031 scoped_ptr<blink::WebBluetooth> bluetooth_; | 1048 scoped_ptr<blink::WebBluetooth> bluetooth_; |
| 1032 | 1049 |
| 1033 scoped_ptr<blink::WebUSBClient> usb_client_; | 1050 scoped_ptr<blink::WebUSBClient> usb_client_; |
| 1034 | 1051 |
| 1035 #if defined(ENABLE_WEBVR) | 1052 #if defined(ENABLE_WEBVR) |
| 1036 // The VR dispatcher attached to the frame, lazily initialized. | 1053 // The VR dispatcher attached to the frame, lazily initialized. |
| 1037 scoped_ptr<VRDispatcher> vr_dispatcher_; | 1054 scoped_ptr<VRDispatcher> vr_dispatcher_; |
| 1038 #endif | 1055 #endif |
| 1039 | 1056 |
| 1040 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1057 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1041 // The external popup for the currently showing select popup. | 1058 // The external popup for the currently showing select popup. |
| 1042 scoped_ptr<ExternalPopupMenu> external_popup_menu_; | 1059 scoped_ptr<ExternalPopupMenu> external_popup_menu_; |
| 1043 #endif | 1060 #endif |
| 1044 | 1061 |
| 1045 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1062 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1046 | 1063 |
| 1047 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1064 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1048 }; | 1065 }; |
| 1049 | 1066 |
| 1050 } // namespace content | 1067 } // namespace content |
| 1051 | 1068 |
| 1052 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1069 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |