| 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 26 matching lines...) Expand all Loading... |
| 37 #include "content/public/common/console_message_level.h" | 37 #include "content/public/common/console_message_level.h" |
| 38 #include "content/public/common/javascript_dialog_type.h" | 38 #include "content/public/common/javascript_dialog_type.h" |
| 39 #include "content/public/common/previews_state.h" | 39 #include "content/public/common/previews_state.h" |
| 40 #include "content/public/common/referrer.h" | 40 #include "content/public/common/referrer.h" |
| 41 #include "content/public/common/request_context_type.h" | 41 #include "content/public/common/request_context_type.h" |
| 42 #include "content/public/common/stop_find_action.h" | 42 #include "content/public/common/stop_find_action.h" |
| 43 #include "content/public/renderer/render_frame.h" | 43 #include "content/public/renderer/render_frame.h" |
| 44 #include "content/renderer/frame_blame_context.h" | 44 #include "content/renderer/frame_blame_context.h" |
| 45 #include "content/renderer/mojo/blink_interface_provider_impl.h" | 45 #include "content/renderer/mojo/blink_interface_provider_impl.h" |
| 46 #include "content/renderer/renderer_webcookiejar_impl.h" | 46 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 47 #include "content/renderer/unique_name_helper.h" |
| 47 #include "ipc/ipc_message.h" | 48 #include "ipc/ipc_message.h" |
| 48 #include "ipc/ipc_platform_file.h" | 49 #include "ipc/ipc_platform_file.h" |
| 49 #include "media/blink/webmediaplayer_delegate.h" | 50 #include "media/blink/webmediaplayer_delegate.h" |
| 50 #include "media/blink/webmediaplayer_params.h" | 51 #include "media/blink/webmediaplayer_params.h" |
| 51 #include "media/mojo/interfaces/remoting.mojom.h" | 52 #include "media/mojo/interfaces/remoting.mojom.h" |
| 52 #include "mojo/public/cpp/bindings/associated_binding.h" | 53 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 53 #include "mojo/public/cpp/bindings/binding.h" | 54 #include "mojo/public/cpp/bindings/binding.h" |
| 54 #include "ppapi/features/features.h" | 55 #include "ppapi/features/features.h" |
| 55 #include "services/service_manager/public/cpp/service_info.h" | 56 #include "services/service_manager/public/cpp/service_info.h" |
| 56 #include "services/service_manager/public/interfaces/connector.mojom.h" | 57 #include "services/service_manager/public/interfaces/connector.mojom.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // See RenderFrameObserver::DidMeaningfulLayout declaration for details. | 255 // See RenderFrameObserver::DidMeaningfulLayout declaration for details. |
| 255 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type); | 256 void DidMeaningfulLayout(blink::WebMeaningfulLayout layout_type); |
| 256 | 257 |
| 257 // Out-of-process child frames receive a signal from RenderWidgetCompositor | 258 // Out-of-process child frames receive a signal from RenderWidgetCompositor |
| 258 // when a compositor frame has committed. | 259 // when a compositor frame has committed. |
| 259 void DidCommitCompositorFrame(); | 260 void DidCommitCompositorFrame(); |
| 260 | 261 |
| 261 // Draw commands have been issued by RenderWidgetCompositor. | 262 // Draw commands have been issued by RenderWidgetCompositor. |
| 262 void DidCommitAndDrawCompositorFrame(); | 263 void DidCommitAndDrawCompositorFrame(); |
| 263 | 264 |
| 265 // Returns the unique name of the RenderFrame. |
| 266 const std::string& unique_name() const { return unique_name_helper_.value(); } |
| 267 |
| 264 // TODO(jam): this is a temporary getter until all the code is transitioned | 268 // TODO(jam): this is a temporary getter until all the code is transitioned |
| 265 // to using RenderFrame instead of RenderView. | 269 // to using RenderFrame instead of RenderView. |
| 266 RenderViewImpl* render_view() { return render_view_; } | 270 RenderViewImpl* render_view() { return render_view_; } |
| 267 | 271 |
| 268 const blink::WebHistoryItem& current_history_item() { | 272 const blink::WebHistoryItem& current_history_item() { |
| 269 return current_history_item_; | 273 return current_history_item_; |
| 270 } | 274 } |
| 271 | 275 |
| 272 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; } | 276 RendererWebCookieJarImpl* cookie_jar() { return &cookie_jar_; } |
| 273 | 277 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 const blink::WebPopupMenuInfo& popup_menu_info, | 504 const blink::WebPopupMenuInfo& popup_menu_info, |
| 501 blink::WebExternalPopupMenuClient* popup_menu_client) override; | 505 blink::WebExternalPopupMenuClient* popup_menu_client) override; |
| 502 blink::WebCookieJar* cookieJar() override; | 506 blink::WebCookieJar* cookieJar() override; |
| 503 blink::BlameContext* frameBlameContext() override; | 507 blink::BlameContext* frameBlameContext() override; |
| 504 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override; | 508 blink::WebServiceWorkerProvider* createServiceWorkerProvider() override; |
| 505 void didAccessInitialDocument() override; | 509 void didAccessInitialDocument() override; |
| 506 blink::WebLocalFrame* createChildFrame( | 510 blink::WebLocalFrame* createChildFrame( |
| 507 blink::WebLocalFrame* parent, | 511 blink::WebLocalFrame* parent, |
| 508 blink::WebTreeScopeType scope, | 512 blink::WebTreeScopeType scope, |
| 509 const blink::WebString& name, | 513 const blink::WebString& name, |
| 510 const blink::WebString& unique_name, | 514 const blink::WebString& fallback_name, |
| 511 blink::WebSandboxFlags sandbox_flags, | 515 blink::WebSandboxFlags sandbox_flags, |
| 512 const blink::WebFrameOwnerProperties& frame_owner_properties) override; | 516 const blink::WebFrameOwnerProperties& frame_owner_properties) override; |
| 513 void didChangeOpener(blink::WebFrame* frame) override; | 517 void didChangeOpener(blink::WebFrame* frame) override; |
| 514 void frameDetached(blink::WebLocalFrame* frame, DetachType type) override; | 518 void frameDetached(blink::WebLocalFrame* frame, DetachType type) override; |
| 515 void frameFocused() override; | 519 void frameFocused() override; |
| 516 void willCommitProvisionalLoad() override; | 520 void willCommitProvisionalLoad() override; |
| 517 void didChangeName(const blink::WebString& name, | 521 void didChangeName(const blink::WebString& name) override; |
| 518 const blink::WebString& unique_name) override; | |
| 519 void didEnforceInsecureRequestPolicy( | 522 void didEnforceInsecureRequestPolicy( |
| 520 blink::WebInsecureRequestPolicy policy) override; | 523 blink::WebInsecureRequestPolicy policy) override; |
| 521 void didUpdateToUniqueOrigin( | 524 void didUpdateToUniqueOrigin( |
| 522 bool is_potentially_trustworthy_unique_origin) override; | 525 bool is_potentially_trustworthy_unique_origin) override; |
| 523 void didChangeSandboxFlags(blink::WebFrame* child_frame, | 526 void didChangeSandboxFlags(blink::WebFrame* child_frame, |
| 524 blink::WebSandboxFlags flags) override; | 527 blink::WebSandboxFlags flags) override; |
| 525 void didSetFeaturePolicyHeader( | 528 void didSetFeaturePolicyHeader( |
| 526 const blink::WebParsedFeaturePolicy& parsed_header) override; | 529 const blink::WebParsedFeaturePolicy& parsed_header) override; |
| 527 void didAddContentSecurityPolicy( | 530 void didAddContentSecurityPolicy( |
| 528 const blink::WebString& header_value, | 531 const blink::WebString& header_value, |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 806 |
| 804 // Functions to add and remove observers for this object. | 807 // Functions to add and remove observers for this object. |
| 805 void AddObserver(RenderFrameObserver* observer); | 808 void AddObserver(RenderFrameObserver* observer); |
| 806 void RemoveObserver(RenderFrameObserver* observer); | 809 void RemoveObserver(RenderFrameObserver* observer); |
| 807 | 810 |
| 808 bool IsLocalRoot() const; | 811 bool IsLocalRoot() const; |
| 809 const RenderFrameImpl* GetLocalRoot() const; | 812 const RenderFrameImpl* GetLocalRoot() const; |
| 810 | 813 |
| 811 // Builds and sends DidCommitProvisionalLoad to the host. | 814 // Builds and sends DidCommitProvisionalLoad to the host. |
| 812 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, | 815 void SendDidCommitProvisionalLoad(blink::WebFrame* frame, |
| 813 blink::WebHistoryCommitType commit_type, | 816 blink::WebHistoryCommitType commit_type); |
| 814 const blink::WebHistoryItem& item); | |
| 815 | 817 |
| 816 // Swaps the current frame into the frame tree, replacing the | 818 // Swaps the current frame into the frame tree, replacing the |
| 817 // RenderFrameProxy it is associated with. Return value indicates whether | 819 // RenderFrameProxy it is associated with. Return value indicates whether |
| 818 // the swap operation succeeded. This should only be used for provisional | 820 // the swap operation succeeded. This should only be used for provisional |
| 819 // frames associated with a proxy, while the proxy is still in the frame | 821 // frames associated with a proxy, while the proxy is still in the frame |
| 820 // tree. If the associated proxy has been detached before this is called, | 822 // tree. If the associated proxy has been detached before this is called, |
| 821 // this returns false and aborts the swap. | 823 // this returns false and aborts the swap. |
| 822 bool SwapIn(); | 824 bool SwapIn(); |
| 823 | 825 |
| 824 // IPC message handlers ------------------------------------------------------ | 826 // IPC message handlers ------------------------------------------------------ |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 // constructor until BindToWebFrame is called, and it is null after | 1124 // constructor until BindToWebFrame is called, and it is null after |
| 1123 // frameDetached is called until destruction (which is asynchronous in the | 1125 // frameDetached is called until destruction (which is asynchronous in the |
| 1124 // case of the main frame, but not subframes). | 1126 // case of the main frame, but not subframes). |
| 1125 blink::WebLocalFrame* frame_; | 1127 blink::WebLocalFrame* frame_; |
| 1126 | 1128 |
| 1127 // Boolean value indicating whether this RenderFrameImpl object is for the | 1129 // Boolean value indicating whether this RenderFrameImpl object is for the |
| 1128 // main frame or not. It remains accurate during destruction, even when | 1130 // main frame or not. It remains accurate during destruction, even when |
| 1129 // |frame_| has been invalidated. | 1131 // |frame_| has been invalidated. |
| 1130 bool is_main_frame_; | 1132 bool is_main_frame_; |
| 1131 | 1133 |
| 1134 UniqueNameHelper unique_name_helper_; |
| 1135 |
| 1132 // When a frame is detached in response to a message from the browser process, | 1136 // When a frame is detached in response to a message from the browser process, |
| 1133 // this RenderFrame should not be sending notifications back to it. This | 1137 // this RenderFrame should not be sending notifications back to it. This |
| 1134 // boolean is used to indicate this case. | 1138 // boolean is used to indicate this case. |
| 1135 bool in_browser_initiated_detach_; | 1139 bool in_browser_initiated_detach_; |
| 1136 | 1140 |
| 1137 // Indicates whether the frame has been inserted into the frame tree yet or | 1141 // Indicates whether the frame has been inserted into the frame tree yet or |
| 1138 // not. | 1142 // not. |
| 1139 // | 1143 // |
| 1140 // When a frame is created by the browser process, it is for a pending | 1144 // When a frame is created by the browser process, it is for a pending |
| 1141 // navigation. In this case, it is not immediately attached to the frame tree | 1145 // navigation. In this case, it is not immediately attached to the frame tree |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 std::unique_ptr<PendingNavigationInfo> pending_navigation_info_; | 1424 std::unique_ptr<PendingNavigationInfo> pending_navigation_info_; |
| 1421 | 1425 |
| 1422 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 1426 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 1423 | 1427 |
| 1424 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 1428 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 1425 }; | 1429 }; |
| 1426 | 1430 |
| 1427 } // namespace content | 1431 } // namespace content |
| 1428 | 1432 |
| 1429 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 1433 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |