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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 971653004: Remove the FrameMsg_Navigate_Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@history-params
Patch Set: Addressed Nasko's comments 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "base/time/time.h" 16 #include "base/time/time.h"
17 #include "content/browser/accessibility/browser_accessibility_manager.h" 17 #include "content/browser/accessibility/browser_accessibility_manager.h"
18 #include "content/browser/site_instance_impl.h" 18 #include "content/browser/site_instance_impl.h"
19 #include "content/common/accessibility_mode_enums.h" 19 #include "content/common/accessibility_mode_enums.h"
20 #include "content/common/content_export.h" 20 #include "content/common/content_export.h"
21 #include "content/common/frame_message_enums.h" 21 #include "content/common/frame_message_enums.h"
22 #include "content/common/frame_replication_state.h" 22 #include "content/common/frame_replication_state.h"
23 #include "content/common/mojo/service_registry_impl.h" 23 #include "content/common/mojo/service_registry_impl.h"
24 #include "content/common/navigation_params.h"
24 #include "content/public/browser/render_frame_host.h" 25 #include "content/public/browser/render_frame_host.h"
25 #include "content/public/common/javascript_message_type.h" 26 #include "content/public/common/javascript_message_type.h"
26 #include "net/http/http_response_headers.h" 27 #include "net/http/http_response_headers.h"
27 #include "third_party/WebKit/public/web/WebTextDirection.h" 28 #include "third_party/WebKit/public/web/WebTextDirection.h"
28 #include "ui/accessibility/ax_node_data.h" 29 #include "ui/accessibility/ax_node_data.h"
29 #include "ui/base/page_transition_types.h" 30 #include "ui/base/page_transition_types.h"
30 31
31 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
32 #include "content/browser/mojo/service_registry_android.h" 33 #include "content/browser/mojo/service_registry_android.h"
33 #endif 34 #endif
34 35
35 class GURL; 36 class GURL;
36 struct AccessibilityHostMsg_EventParams; 37 struct AccessibilityHostMsg_EventParams;
37 struct AccessibilityHostMsg_FindInPageResultParams; 38 struct AccessibilityHostMsg_FindInPageResultParams;
38 struct AccessibilityHostMsg_LocationChangeParams; 39 struct AccessibilityHostMsg_LocationChangeParams;
39 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 40 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
40 struct FrameHostMsg_OpenURL_Params; 41 struct FrameHostMsg_OpenURL_Params;
41 struct FrameHostMsg_BeginNavigation_Params;
42 struct FrameMsg_Navigate_Params;
43 #if defined(OS_MACOSX) || defined(OS_ANDROID) 42 #if defined(OS_MACOSX) || defined(OS_ANDROID)
44 struct FrameHostMsg_ShowPopup_Params; 43 struct FrameHostMsg_ShowPopup_Params;
45 #endif 44 #endif
46 45
47 namespace base { 46 namespace base {
48 class FilePath; 47 class FilePath;
49 class ListValue; 48 class ListValue;
50 } 49 }
51 50
52 namespace content { 51 namespace content {
53 52
54 class CrossProcessFrameConnector; 53 class CrossProcessFrameConnector;
55 class CrossSiteTransferringRequest; 54 class CrossSiteTransferringRequest;
56 class FrameTree; 55 class FrameTree;
57 class FrameTreeNode; 56 class FrameTreeNode;
58 class PermissionServiceContext; 57 class PermissionServiceContext;
59 class RenderFrameHostDelegate; 58 class RenderFrameHostDelegate;
60 class RenderFrameProxyHost; 59 class RenderFrameProxyHost;
61 class RenderProcessHost; 60 class RenderProcessHost;
62 class RenderViewHostImpl; 61 class RenderViewHostImpl;
63 class RenderWidgetHostDelegate; 62 class RenderWidgetHostDelegate;
64 class RenderWidgetHostImpl; 63 class RenderWidgetHostImpl;
65 class RenderWidgetHostView; 64 class RenderWidgetHostView;
66 class ResourceRequestBody; 65 class ResourceRequestBody;
67 class StreamHandle; 66 class StreamHandle;
68 class TimeoutMonitor; 67 class TimeoutMonitor;
69 struct BeginNavigationParams;
70 struct CommitNavigationParams;
71 struct CommonNavigationParams;
72 struct ContextMenuParams; 68 struct ContextMenuParams;
73 struct GlobalRequestID; 69 struct GlobalRequestID;
74 struct HistoryNavigationParams;
75 struct Referrer; 70 struct Referrer;
76 struct ResourceResponse; 71 struct ResourceResponse;
77 struct TransitionLayerData; 72 struct TransitionLayerData;
78 73
79 // Flag arguments for RenderFrameHost creation. 74 // Flag arguments for RenderFrameHost creation.
80 enum CreateRenderFrameFlags { 75 enum CreateRenderFrameFlags {
81 // The RFH will be initially placed on the swapped out hosts list. 76 // The RFH will be initially placed on the swapped out hosts list.
82 CREATE_RF_SWAPPED_OUT = 1 << 0, 77 CREATE_RF_SWAPPED_OUT = 1 << 0,
83 // The new RenderFrame is being created for a navigation of the 78 // The new RenderFrame is being created for a navigation of the
84 // top-level frame. 79 // top-level frame.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // The current state of this RFH. 289 // The current state of this RFH.
295 RenderFrameHostImplState rfh_state() const { return rfh_state_; } 290 RenderFrameHostImplState rfh_state() const { return rfh_state_; }
296 291
297 // Sends the given navigation message. Use this rather than sending it 292 // Sends the given navigation message. Use this rather than sending it
298 // yourself since this does the internal bookkeeping described below. This 293 // yourself since this does the internal bookkeeping described below. This
299 // function takes ownership of the provided message pointer. 294 // function takes ownership of the provided message pointer.
300 // 295 //
301 // If a cross-site request is in progress, we may be suspended while waiting 296 // If a cross-site request is in progress, we may be suspended while waiting
302 // for the onbeforeunload handler, so this function might buffer the message 297 // for the onbeforeunload handler, so this function might buffer the message
303 // rather than sending it. 298 // rather than sending it.
304 void Navigate(const FrameMsg_Navigate_Params& params); 299 void Navigate(const CommonNavigationParams& common_params,
nasko 2015/03/11 13:59:00 Is there a specific reason this doesn't take the N
clamy 2015/03/11 16:50:07 No, however this makes the logic in the function a
300 const StartNavigationParams& start_params,
301 const CommitNavigationParams& commit_params,
302 const HistoryNavigationParams& history_params);
305 303
306 // Load the specified URL; this is a shortcut for Navigate(). 304 // Load the specified URL; this is a shortcut for Navigate().
307 void NavigateToURL(const GURL& url); 305 void NavigateToURL(const GURL& url);
308 306
309 // Treat this prospective navigation as though it originated from the frame. 307 // Treat this prospective navigation as though it originated from the frame.
310 // Used, e.g., for a navigation request that originated from a RemoteFrame. 308 // Used, e.g., for a navigation request that originated from a RemoteFrame.
311 // |source_site_instance| is the SiteInstance of the frame that initiated the 309 // |source_site_instance| is the SiteInstance of the frame that initiated the
312 // navigation. 310 // navigation.
313 // TODO(creis): Remove this method and have RenderFrameProxyHost call 311 // TODO(creis): Remove this method and have RenderFrameProxyHost call
314 // RequestOpenURL with its FrameTreeNode. 312 // RequestOpenURL with its FrameTreeNode.
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // the renderer process. Currently only used for subframes. 621 // the renderer process. Currently only used for subframes.
624 // TODO(creis): Use this for main frames as well when RVH goes away. 622 // TODO(creis): Use this for main frames as well when RVH goes away.
625 bool render_frame_created_; 623 bool render_frame_created_;
626 624
627 // Whether we should buffer outgoing Navigate messages rather than sending 625 // Whether we should buffer outgoing Navigate messages rather than sending
628 // them. This will be true when a RenderFrameHost is created for a cross-site 626 // them. This will be true when a RenderFrameHost is created for a cross-site
629 // request, until we hear back from the onbeforeunload handler of the old 627 // request, until we hear back from the onbeforeunload handler of the old
630 // RenderFrameHost. 628 // RenderFrameHost.
631 bool navigations_suspended_; 629 bool navigations_suspended_;
632 630
633 // We only buffer the params for a suspended navigation while this RFH is the 631 // Holds the parameters for a suspended navigation. This can only happen while
634 // pending RenderFrameHost of a RenderFrameHostManager. There will only ever 632 // this RFH is the pending RenderFrameHost of a RenderFrameHostManager. There
635 // be one suspended navigation, because RenderFrameHostManager will destroy 633 // will only ever be one suspended navigation, because RenderFrameHostManager
636 // the pending RenderFrameHost and create a new one if a second navigation 634 // will destroy the pending RenderFrameHost and create a new one if a second
637 // occurs. 635 // navigation occurs.
638 scoped_ptr<FrameMsg_Navigate_Params> suspended_nav_params_; 636 // PlzNavigate: unused as navigations are never suspended.
637 scoped_ptr<NavigationParams> suspended_nav_params_;
639 638
640 // When the last BeforeUnload message was sent. 639 // When the last BeforeUnload message was sent.
641 base::TimeTicks send_before_unload_start_time_; 640 base::TimeTicks send_before_unload_start_time_;
642 641
643 // Used to track whether sudden termination is allowed for this frame. 642 // Used to track whether sudden termination is allowed for this frame.
644 // has_beforeunload_handlers_ and has_unload_handlers_ are also used to avoid 643 // has_beforeunload_handlers_ and has_unload_handlers_ are also used to avoid
645 // asking the renderer process to run BeforeUnload or Unload during 644 // asking the renderer process to run BeforeUnload or Unload during
646 // navigation. The browser can set override_sudden_termination_status_ to 645 // navigation. The browser can set override_sudden_termination_status_ to
647 // true, in which case sudden termination will be allowed. This is used when a 646 // true, in which case sudden termination will be allowed. This is used when a
648 // renderer executing BeforeUnload or Unload is unresponsive. All other values 647 // renderer executing BeforeUnload or Unload is unresponsive. All other values
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 707
709 // NOTE: This must be the last member. 708 // NOTE: This must be the last member.
710 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_; 709 base::WeakPtrFactory<RenderFrameHostImpl> weak_ptr_factory_;
711 710
712 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl); 711 DISALLOW_COPY_AND_ASSIGN(RenderFrameHostImpl);
713 }; 712 };
714 713
715 } // namespace content 714 } // namespace content
716 715
717 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_ 716 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698