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 #include <vector> |
13 | 14 |
14 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
15 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
16 #include "content/public/browser/global_request_id.h" | 17 #include "content/public/browser/global_request_id.h" |
17 #include "content/public/browser/site_instance.h" | 18 #include "content/public/browser/site_instance.h" |
18 #include "content/public/common/child_process_host.h" | 19 #include "content/public/common/child_process_host.h" |
19 #include "content/public/common/referrer.h" | 20 #include "content/public/common/referrer.h" |
20 #include "content/public/common/resource_request_body.h" | 21 #include "content/public/common/resource_request_body.h" |
21 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
22 #include "ui/base/page_transition_types.h" | 23 #include "ui/base/page_transition_types.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 76 |
76 // Routing id of the source RenderFrameHost. | 77 // Routing id of the source RenderFrameHost. |
77 int source_render_frame_id = MSG_ROUTING_NONE; | 78 int source_render_frame_id = MSG_ROUTING_NONE; |
78 | 79 |
79 // Process id of the source RenderFrameHost. | 80 // Process id of the source RenderFrameHost. |
80 int source_render_process_id = ChildProcessHost::kInvalidUniqueID; | 81 int source_render_process_id = ChildProcessHost::kInvalidUniqueID; |
81 | 82 |
82 // The disposition requested by the navigation source. | 83 // The disposition requested by the navigation source. |
83 WindowOpenDisposition disposition; | 84 WindowOpenDisposition disposition; |
84 | 85 |
85 // Controls creation of new web contents (in case |disposition| asks for a new | |
86 // tab or window). If |force_new_process_for_new_contents| is true, then we | |
87 // try to put the new contents in a new renderer, even if they are same-site | |
88 // as |source_site_instance| (this is subject to renderer process limits). | |
89 bool force_new_process_for_new_contents; | |
90 | |
91 // The transition type of navigation. | 86 // The transition type of navigation. |
92 ui::PageTransition transition; | 87 ui::PageTransition transition; |
93 | 88 |
94 // Whether this navigation is initiated by the renderer process. | 89 // Whether this navigation is initiated by the renderer process. |
95 bool is_renderer_initiated; | 90 bool is_renderer_initiated; |
96 | 91 |
97 // Indicates whether this navigation should replace the current | 92 // Indicates whether this navigation should replace the current |
98 // navigation entry. | 93 // navigation entry. |
99 bool should_replace_current_entry; | 94 bool should_replace_current_entry; |
100 | 95 |
(...skipping 15 matching lines...) Expand all Loading... |
116 // Opens a URL with the given disposition. The transition specifies how this | 111 // Opens a URL with the given disposition. The transition specifies how this |
117 // navigation should be recorded in the history system (for example, typed). | 112 // navigation should be recorded in the history system (for example, typed). |
118 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't | 113 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't |
119 // opened immediately. | 114 // opened immediately. |
120 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; | 115 virtual WebContents* OpenURL(const OpenURLParams& params) = 0; |
121 }; | 116 }; |
122 | 117 |
123 } // namespace content | 118 } // namespace content |
124 | 119 |
125 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ | 120 #endif // CONTENT_PUBLIC_BROWSER_PAGE_NAVIGATOR_H_ |
OLD | NEW |