Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 1027863002: Move provisional navigation parameters to RenderFrame, and use the HistoryController to distribute … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: take 2 Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 namespace media { 68 namespace media {
69 class MediaPermission; 69 class MediaPermission;
70 class WebEncryptedMediaClientImpl; 70 class WebEncryptedMediaClientImpl;
71 } 71 }
72 72
73 namespace content { 73 namespace content {
74 74
75 class ChildFrameCompositingHelper; 75 class ChildFrameCompositingHelper;
76 class CompositorDependencies; 76 class CompositorDependencies;
77 class DocumentState;
77 class ExternalPopupMenu; 78 class ExternalPopupMenu;
78 class GeolocationDispatcher; 79 class GeolocationDispatcher;
79 class ManifestManager; 80 class ManifestManager;
80 class MediaStreamDispatcher; 81 class MediaStreamDispatcher;
81 class MediaStreamRendererFactory; 82 class MediaStreamRendererFactory;
82 class MediaPermissionDispatcher; 83 class MediaPermissionDispatcher;
83 class MidiDispatcher; 84 class MidiDispatcher;
85 class NavigationState;
84 class NotificationPermissionDispatcher; 86 class NotificationPermissionDispatcher;
85 class PageState; 87 class PageState;
86 class PepperPluginInstanceImpl; 88 class PepperPluginInstanceImpl;
87 class PermissionManager; 89 class PermissionManager;
88 class PresentationDispatcher; 90 class PresentationDispatcher;
89 class PushMessagingDispatcher; 91 class PushMessagingDispatcher;
90 class RendererAccessibility; 92 class RendererAccessibility;
91 class RendererCdmManager; 93 class RendererCdmManager;
92 class RendererMediaPlayerManager; 94 class RendererMediaPlayerManager;
93 class RendererPpapiHost; 95 class RendererPpapiHost;
94 class RenderFrameObserver; 96 class RenderFrameObserver;
95 class RenderViewImpl; 97 class RenderViewImpl;
96 class RenderWidget; 98 class RenderWidget;
97 class RenderWidgetFullscreenPepper; 99 class RenderWidgetFullscreenPepper;
98 class ScreenOrientationDispatcher; 100 class ScreenOrientationDispatcher;
99 class UserMediaClientImpl; 101 class UserMediaClientImpl;
100 enum class SandboxFlags; 102 enum class SandboxFlags;
101 struct CommitNavigationParams; 103 struct CommitNavigationParams;
102 struct CommonNavigationParams; 104 struct CommonNavigationParams;
103 struct CustomContextMenuContext; 105 struct CustomContextMenuContext;
104 struct FrameReplicationState; 106 struct FrameReplicationState;
105 struct HistoryNavigationParams; 107 struct HistoryNavigationParams;
108 struct NavigationParams;
106 struct RequestNavigationParams; 109 struct RequestNavigationParams;
107 struct ResourceResponseHead; 110 struct ResourceResponseHead;
108 struct StartNavigationParams; 111 struct StartNavigationParams;
109 112
110 class CONTENT_EXPORT RenderFrameImpl 113 class CONTENT_EXPORT RenderFrameImpl
111 : public RenderFrame, 114 : public RenderFrame,
112 NON_EXPORTED_BASE(public blink::WebFrameClient), 115 NON_EXPORTED_BASE(public blink::WebFrameClient),
113 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) { 116 NON_EXPORTED_BASE(public media::WebMediaPlayerDelegate) {
114 public: 117 public:
115 // Creates a new RenderFrame. |render_view| is the RenderView object that this 118 // Creates a new RenderFrame. |render_view| is the RenderView object that this
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // TODO(nasko): Remove this method once swapped out state is no longer used. 543 // TODO(nasko): Remove this method once swapped out state is no longer used.
541 void NavigateToSwappedOutURL(); 544 void NavigateToSwappedOutURL();
542 545
543 // Binds this render frame's service registry. 546 // Binds this render frame's service registry.
544 void BindServiceRegistry( 547 void BindServiceRegistry(
545 mojo::InterfaceRequest<mojo::ServiceProvider> services, 548 mojo::InterfaceRequest<mojo::ServiceProvider> services,
546 mojo::ServiceProviderPtr exposed_services); 549 mojo::ServiceProviderPtr exposed_services);
547 550
548 ManifestManager* manifest_manager(); 551 ManifestManager* manifest_manager();
549 552
553 // TODO(creis): Remove when the only caller, the HistoryController, is no
554 // more.
555 void SetProvisionalNavigationParams(
556 scoped_ptr<NavigationParams> navigation_params);
557
550 protected: 558 protected:
551 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); 559 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id);
552 560
553 private: 561 private:
554 friend class RenderFrameObserver; 562 friend class RenderFrameObserver;
555 friend class RendererAccessibilityTest; 563 friend class RendererAccessibilityTest;
556 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); 564 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
557 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 565 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
558 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); 566 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
559 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); 567 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 // of the WebURLRequest. 727 // of the WebURLRequest.
720 void BeginNavigation(blink::WebURLRequest* request); 728 void BeginNavigation(blink::WebURLRequest* request);
721 729
722 // Loads a data url. 730 // Loads a data url.
723 void LoadDataURL(const CommonNavigationParams& params, 731 void LoadDataURL(const CommonNavigationParams& params,
724 blink::WebFrame* frame); 732 blink::WebFrame* frame);
725 733
726 // Returns the URL being loaded by the |frame_|'s request. 734 // Returns the URL being loaded by the |frame_|'s request.
727 GURL GetLoadingUrl() const; 735 GURL GetLoadingUrl() const;
728 736
737 // If we initiated a navigation, this function will populate |document_state|
738 // with the navigation information saved in OnNavigate().
739 void PopulateDocumentStateFromPending(DocumentState* document_state);
740
741 // Returns a new NavigationState populated with the navigation information
742 // saved in OnNavigate().
743 NavigationState* CreateNavigationStateFromPending();
744
729 #if defined(OS_ANDROID) 745 #if defined(OS_ANDROID)
730 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer( 746 blink::WebMediaPlayer* CreateAndroidWebMediaPlayer(
731 const blink::WebURL& url, 747 const blink::WebURL& url,
732 blink::WebMediaPlayerClient* client, 748 blink::WebMediaPlayerClient* client,
733 media::MediaPermission* media_permission, 749 media::MediaPermission* media_permission,
734 blink::WebContentDecryptionModule* initial_cdm); 750 blink::WebContentDecryptionModule* initial_cdm);
735 751
736 RendererMediaPlayerManager* GetMediaPlayerManager(); 752 RendererMediaPlayerManager* GetMediaPlayerManager();
737 #endif 753 #endif
738 754
(...skipping 22 matching lines...) Expand all
761 // TODO(creis): Remove this after switching to PlzNavigate. 777 // TODO(creis): Remove this after switching to PlzNavigate.
762 int proxy_routing_id_; 778 int proxy_routing_id_;
763 779
764 // Used when the RenderFrame is a local root. For now, RenderWidgets are 780 // Used when the RenderFrame is a local root. For now, RenderWidgets are
765 // added only when a child frame is in a different process from its parent 781 // added only when a child frame is in a different process from its parent
766 // frame, but eventually this will also apply to top-level frames. 782 // frame, but eventually this will also apply to top-level frames.
767 // TODO(kenrb): Correct the above statement when top-level frames have their 783 // TODO(kenrb): Correct the above statement when top-level frames have their
768 // own RenderWidgets. 784 // own RenderWidgets.
769 scoped_refptr<RenderWidget> render_widget_; 785 scoped_refptr<RenderWidget> render_widget_;
770 786
787 // Temporarily holds state pertaining to a navigation that has been initiated
788 // until the NavigationState corresponding to the new navigation is created in
789 // didCreateDataSource().
790 scoped_ptr<NavigationParams> provisional_navigation_params_;
Charlie Reis 2015/03/23 22:23:02 I've always considered "provisional" as the Blink
Avi (use Gerrit) 2015/03/24 20:33:46 That's OK with me. I called it "pending" because
791
771 #if defined(ENABLE_PLUGINS) 792 #if defined(ENABLE_PLUGINS)
772 // Current text input composition text. Empty if no composition is in 793 // Current text input composition text. Empty if no composition is in
773 // progress. 794 // progress.
774 base::string16 pepper_composition_text_; 795 base::string16 pepper_composition_text_;
775 796
776 PluginPowerSaverHelper* plugin_power_saver_helper_; 797 PluginPowerSaverHelper* plugin_power_saver_helper_;
777 #endif 798 #endif
778 799
779 RendererWebCookieJarImpl cookie_jar_; 800 RendererWebCookieJarImpl cookie_jar_;
780 801
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 #endif 909 #endif
889 910
890 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 911 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
891 912
892 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 913 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
893 }; 914 };
894 915
895 } // namespace content 916 } // namespace content
896 917
897 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 918 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698