| Index: content/common/navigation_params.h
|
| diff --git a/content/common/navigation_params.h b/content/common/navigation_params.h
|
| index 105130740e309c150cf97dfef2ef918ad4a14e2d..fe8c71a797833bdd8539ef9ba92da9eaec214f44 100644
|
| --- a/content/common/navigation_params.h
|
| +++ b/content/common/navigation_params.h
|
| @@ -36,6 +36,21 @@ namespace content {
|
| // about:blank. In these cases, no request needs to be sent.
|
| bool CONTENT_EXPORT ShouldMakeNetworkRequestForURL(const GURL& url);
|
|
|
| +// PlzNavigate
|
| +// Struct keeping track of the Javascript SourceLocation that triggered the
|
| +// navigation. This is initialized based on information from Blink at the start
|
| +// of navigation, and passed back to Blink when the navigation commits.
|
| +struct CONTENT_EXPORT SourceLocation {
|
| + SourceLocation();
|
| + SourceLocation(const std::string& url,
|
| + unsigned int line_number,
|
| + unsigned int column_number);
|
| + ~SourceLocation();
|
| + std::string url;
|
| + unsigned int line_number;
|
| + unsigned int column_number;
|
| +};
|
| +
|
| // The following structures hold parameters used during a navigation. In
|
| // particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and
|
| // FrameHostMsg_BeginNavigation.
|
| @@ -59,7 +74,8 @@ struct CONTENT_EXPORT CommonNavigationParams {
|
| PreviewsState previews_state,
|
| const base::TimeTicks& navigation_start,
|
| std::string method,
|
| - const scoped_refptr<ResourceRequestBodyImpl>& post_data);
|
| + const scoped_refptr<ResourceRequestBodyImpl>& post_data,
|
| + base::Optional<SourceLocation> source_location);
|
| CommonNavigationParams(const CommonNavigationParams& other);
|
| ~CommonNavigationParams();
|
|
|
| @@ -120,6 +136,13 @@ struct CONTENT_EXPORT CommonNavigationParams {
|
|
|
| // Body of HTTP POST request.
|
| scoped_refptr<ResourceRequestBodyImpl> post_data;
|
| +
|
| + // PlzNavigate
|
| + // Information about the Javascript source for this navigation. Used for
|
| + // providing information in console error messages triggered by the
|
| + // navigation. If the navigation was not caused by Javascript, this should not
|
| + // be set.
|
| + base::Optional<SourceLocation> source_location;
|
| };
|
|
|
| // Provided by the renderer ----------------------------------------------------
|
|
|