OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // PageNavigator defines an interface that can be used to express the user's | 5 // PageNavigator defines an interface that can be used to express the user's |
6 // intention to navigate to a particular URL. The implementing class should | 6 // intention to navigate to a particular URL. The implementing class should |
7 // perform the navigation. | 7 // perform the navigation. |
8 | 8 |
9 #ifndef CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 9 #ifndef CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
10 #define CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 10 #define CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/browser/global_request_id.h" | 16 #include "content/public/browser/global_request_id.h" |
17 #include "content/public/browser/render_frame_host.h" | |
17 #include "content/public/browser/site_instance.h" | 18 #include "content/public/browser/site_instance.h" |
18 #include "content/public/common/referrer.h" | 19 #include "content/public/common/referrer.h" |
19 #include "content/public/common/resource_request_body.h" | 20 #include "content/public/common/resource_request_body.h" |
20 #include "ui/base/page_transition_types.h" | 21 #include "ui/base/page_transition_types.h" |
21 #include "ui/base/window_open_disposition.h" | 22 #include "ui/base/window_open_disposition.h" |
22 #include "url/gurl.h" | 23 #include "url/gurl.h" |
23 | 24 |
24 namespace content { | 25 namespace content { |
25 | 26 |
26 class WebContents; | 27 class WebContents; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 scoped_refptr<ResourceRequestBody> post_data; | 65 scoped_refptr<ResourceRequestBody> post_data; |
65 | 66 |
66 // Extra headers to add to the request for this page. Headers are | 67 // Extra headers to add to the request for this page. Headers are |
67 // represented as "<name>: <value>" and separated by \r\n. The entire string | 68 // represented as "<name>: <value>" and separated by \r\n. The entire string |
68 // is terminated by \r\n. May be empty if no extra headers are needed. | 69 // is terminated by \r\n. May be empty if no extra headers are needed. |
69 std::string extra_headers; | 70 std::string extra_headers; |
70 | 71 |
71 // The browser-global FrameTreeNode ID or -1 to indicate the main frame. | 72 // The browser-global FrameTreeNode ID or -1 to indicate the main frame. |
72 int frame_tree_node_id; | 73 int frame_tree_node_id; |
73 | 74 |
75 // Routing id of the source RenderFrameHost. | |
76 int frame_id; | |
nasko
2017/02/14 00:10:23
nit: render_frame_id
Patrick Noland
2017/02/14 01:16:16
Done.
| |
77 // Process id of the source RenderFrameHost. | |
nasko
2017/02/14 00:10:23
nit: Leave an extra empty line between to match ho
Patrick Noland
2017/02/14 01:16:16
Done.
| |
78 int process_id; | |
nasko
2017/02/14 00:10:23
nit: render_process_id
Patrick Noland
2017/02/14 01:16:16
Done.
| |
79 | |
74 // The disposition requested by the navigation source. | 80 // The disposition requested by the navigation source. |
75 WindowOpenDisposition disposition; | 81 WindowOpenDisposition disposition; |
76 | 82 |
77 // The transition type of navigation. | 83 // The transition type of navigation. |
78 ui::PageTransition transition; | 84 ui::PageTransition transition; |
79 | 85 |
80 // Whether this navigation is initiated by the renderer process. | 86 // Whether this navigation is initiated by the renderer process. |
81 bool is_renderer_initiated; | 87 bool is_renderer_initiated; |
82 | 88 |
83 // Indicates whether this navigation should replace the current | 89 // Indicates whether this navigation should replace the current |
(...skipping 18 matching lines...) Expand all Loading... | |
102 // Opens a URL with the given disposition. The transition specifies how this | 108 // Opens a URL with the given disposition. The transition specifies how this |
103 // navigation should be recorded in the history system (for example, typed). | 109 // navigation should be recorded in the history system (for example, typed). |
104 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't | 110 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't |
105 // opened immediately. | 111 // opened immediately. |
106 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; | 112 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; |
107 }; | 113 }; |
108 | 114 |
109 } // namespace content | 115 } // namespace content |
110 | 116 |
111 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 117 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
OLD | NEW |