| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 class ScreenOrientationDispatcher; | 105 class ScreenOrientationDispatcher; |
| 106 class UserMediaClientImpl; | 106 class UserMediaClientImpl; |
| 107 enum class SandboxFlags; | 107 enum class SandboxFlags; |
| 108 struct CommonNavigationParams; | 108 struct CommonNavigationParams; |
| 109 struct CustomContextMenuContext; | 109 struct CustomContextMenuContext; |
| 110 struct FrameReplicationState; | 110 struct FrameReplicationState; |
| 111 struct NavigationParams; | 111 struct NavigationParams; |
| 112 struct RequestNavigationParams; | 112 struct RequestNavigationParams; |
| 113 struct ResourceResponseHead; | 113 struct ResourceResponseHead; |
| 114 struct StartNavigationParams; | 114 struct StartNavigationParams; |
| 115 struct StreamOverrideParameters; |
| 115 | 116 |
| 116 class CONTENT_EXPORT RenderFrameImpl | 117 class CONTENT_EXPORT RenderFrameImpl |
| 117 : public RenderFrame, | 118 : public RenderFrame, |
| 118 NON_EXPORTED_BASE(public blink::WebFrameClient), | 119 NON_EXPORTED_BASE(public blink::WebFrameClient), |
| 119 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { | 120 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { |
| 120 public: | 121 public: |
| 121 // Creates a new RenderFrame. |render_view| is the RenderView object that this | 122 // Creates a new RenderFrame. |render_view| is the RenderView object that this |
| 122 // frame belongs to. | 123 // frame belongs to. |
| 123 // Callers *must* call |SetWebFrame| immediately after creation. | 124 // Callers *must* call |SetWebFrame| immediately after creation. |
| 124 // Note: This is called only when RenderFrame is created by Blink through | 125 // Note: This is called only when RenderFrame is created by Blink through |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 | 660 |
| 660 // Virtual since overridden by WebTestProxy for layout tests. | 661 // Virtual since overridden by WebTestProxy for layout tests. |
| 661 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( | 662 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( |
| 662 RenderFrame* render_frame, | 663 RenderFrame* render_frame, |
| 663 const NavigationPolicyInfo& info); | 664 const NavigationPolicyInfo& info); |
| 664 void OpenURL(blink::WebFrame* frame, | 665 void OpenURL(blink::WebFrame* frame, |
| 665 const GURL& url, | 666 const GURL& url, |
| 666 const Referrer& referrer, | 667 const Referrer& referrer, |
| 667 blink::WebNavigationPolicy policy); | 668 blink::WebNavigationPolicy policy); |
| 668 | 669 |
| 670 // Performs a navigation in the frame. This provides a unified function for |
| 671 // the current code path and the browser-side navigation path (in |
| 672 // development). Currently used by OnNavigate, with all *NavigationParams |
| 673 // provided by the browser. |stream_params| should be null. |
| 674 // PlzNavigate: used by OnCommitNavigation, with |common_params| and |
| 675 // |request_params| received by the browser. |stream_params| should be non |
| 676 // null and created from the information provided by the browser. |
| 677 // |start_params| is not used. |
| 678 void NavigateInternal(const CommonNavigationParams& common_params, |
| 679 const StartNavigationParams& start_params, |
| 680 const RequestNavigationParams& request_params, |
| 681 scoped_ptr<StreamOverrideParameters> stream_params); |
| 682 |
| 669 // Update current main frame's encoding and send it to browser window. | 683 // Update current main frame's encoding and send it to browser window. |
| 670 // Since we want to let users see the right encoding info from menu | 684 // Since we want to let users see the right encoding info from menu |
| 671 // before finishing loading, we call the UpdateEncoding in | 685 // before finishing loading, we call the UpdateEncoding in |
| 672 // a) function:DidCommitLoadForFrame. When this function is called, | 686 // a) function:DidCommitLoadForFrame. When this function is called, |
| 673 // that means we have got first data. In here we try to get encoding | 687 // that means we have got first data. In here we try to get encoding |
| 674 // of page if it has been specified in http header. | 688 // of page if it has been specified in http header. |
| 675 // b) function:DidReceiveTitle. When this function is called, | 689 // b) function:DidReceiveTitle. When this function is called, |
| 676 // that means we have got specified title. Because in most of webpages, | 690 // that means we have got specified title. Because in most of webpages, |
| 677 // title tags will follow meta tags. In here we try to get encoding of | 691 // title tags will follow meta tags. In here we try to get encoding of |
| 678 // page if it has been specified in meta tag. | 692 // page if it has been specified in meta tag. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 932 #endif | 946 #endif |
| 933 | 947 |
| 934 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; | 948 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; |
| 935 | 949 |
| 936 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); | 950 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); |
| 937 }; | 951 }; |
| 938 | 952 |
| 939 } // namespace content | 953 } // namespace content |
| 940 | 954 |
| 941 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ | 955 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ |
| OLD | NEW |