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

Side by Side Diff: content/public/browser/navigation_handle.h

Issue 1667163002: Add methods to NavigationHandle to allow refactoring webNavigation to use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "content/public/browser/navigation_throttle.h" 9 #include "content/public/browser/navigation_throttle.h"
10 #include "content/public/common/referrer.h" 10 #include "content/public/common/referrer.h"
(...skipping 23 matching lines...) Expand all
34 // some may change during navigation (e.g. due to server redirects). 34 // some may change during navigation (e.g. due to server redirects).
35 35
36 // The URL the frame is navigating to. This may change during the navigation 36 // The URL the frame is navigating to. This may change during the navigation
37 // when encountering a server redirect. 37 // when encountering a server redirect.
38 virtual const GURL& GetURL() = 0; 38 virtual const GURL& GetURL() = 0;
39 39
40 // Whether the navigation is taking place in the main frame or in a subframe. 40 // Whether the navigation is taking place in the main frame or in a subframe.
41 // This remains constant over the navigation lifetime. 41 // This remains constant over the navigation lifetime.
42 virtual bool IsInMainFrame() = 0; 42 virtual bool IsInMainFrame() = 0;
43 43
44 // Whether the navigation is taking place in a frame, which is a direct child
Charlie Reis 2016/02/04 20:46:05 nit: in a frame that is a (The current phrasing m
nasko 2016/02/04 23:36:59 Done.
45 // of the main frame. This remains constant over the navigation lifetime.
46 virtual bool IsParentMainFrame() = 0;
47
48 // Whether the navigation is synchronous or not. Examples of synchronous
49 // navigations are:
50 // * reference fragment navigations
51 // * pushState/popState
52 // * navigating to about:blank
Charlie Reis 2016/02/04 20:46:05 Double check with dcheng on the about:blank case.
nasko 2016/02/04 23:36:59 Removing for now, to ensure I'm not misleading.
53 virtual bool IsSynchronousNavigation() = 0;
54
55 // Whether the navigation is for iframe with srcdoc attribute.
Charlie Reis 2016/02/04 20:46:05 nit: for an
nasko 2016/02/04 23:36:59 Done.
56 virtual bool IsSrcdoc() = 0;
57
58 // Whether the navigation has encountered a server redirect or not.
Charlie Reis 2016/02/04 20:46:05 Hmm, I'm not sure this should be in "available at
nasko 2016/02/04 23:36:59 Good point. It was clustered with the rest of the
59 virtual bool WasRedirected() = 0;
Charlie Reis 2016/02/04 20:46:05 Hmm, I always like to be explicit about server vs
nasko 2016/02/04 23:36:59 Done.
60
61 // Returns the FrameTreeNode ID for the frame in which the navigation is
62 // performed. This ID is browser-global and uniquely identifies a frame that
63 // hosts content. The identifier is fixed at the creation of the frame and
64 // stays constant for the lifetime of the frame.
65 virtual int GetFrameTreeNodeId() = 0;
66
67 // Retruns the FrameTreeNode ID for the parent frame. If this navigation is
68 // taking place in the main frame, the value returned is -1.
69 virtual int GetParentFrameTreeNodeId() = 0;
70
44 // The WebContents the navigation is taking place in. 71 // The WebContents the navigation is taking place in.
45 WebContents* GetWebContents(); 72 WebContents* GetWebContents();
46 73
47 // The time the navigation started, recorded either in the renderer or in the 74 // The time the navigation started, recorded either in the renderer or in the
48 // browser process. Corresponds to Navigation Timing API. 75 // browser process. Corresponds to Navigation Timing API.
49 virtual const base::TimeTicks& NavigationStart() = 0; 76 virtual const base::TimeTicks& NavigationStart() = 0;
50 77
51 // Parameters available at network request start time ------------------------ 78 // Parameters available at network request start time ------------------------
52 // 79 //
53 // The following parameters are only available when the network request is 80 // The following parameters are only available when the network request is
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 virtual NavigationThrottle::ThrottleCheckResult 165 virtual NavigationThrottle::ThrottleCheckResult
139 CallWillRedirectRequestForTesting(const GURL& new_url, 166 CallWillRedirectRequestForTesting(const GURL& new_url,
140 bool new_method_is_post, 167 bool new_method_is_post,
141 const GURL& new_referrer_url, 168 const GURL& new_referrer_url,
142 bool new_is_external_protocol) = 0; 169 bool new_is_external_protocol) = 0;
143 }; 170 };
144 171
145 } // namespace content 172 } // namespace content
146 173
147 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 174 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698