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 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // WebContents construction should take this into account. | 154 // WebContents construction should take this into account. |
155 bool renderer_initiated_creation; | 155 bool renderer_initiated_creation; |
156 | 156 |
157 // True if the WebContents should create its renderer process and main | 157 // True if the WebContents should create its renderer process and main |
158 // RenderFrame before the first navigation. This is useful to reduce | 158 // RenderFrame before the first navigation. This is useful to reduce |
159 // the latency of the first navigation in cases where it might | 159 // the latency of the first navigation in cases where it might |
160 // not happen right away. | 160 // not happen right away. |
161 // Note that the pre-created renderer process may not be used if the first | 161 // Note that the pre-created renderer process may not be used if the first |
162 // navigation requires a dedicated or privileged process, such as a WebUI. | 162 // navigation requires a dedicated or privileged process, such as a WebUI. |
163 bool initialize_renderer; | 163 bool initialize_renderer; |
| 164 |
| 165 // Whether or not the creation is initiated from the context menu. |
| 166 bool created_from_context_menu; |
| 167 |
| 168 // Optional fields |
| 169 |
| 170 // The URL to which the created WebContents will be navigated to. |
| 171 GURL target_url; |
| 172 WebContents* source_web_contents; |
| 173 WindowOpenDisposition disposition; |
| 174 Referrer referrer; |
| 175 ui::PageTransition transition; |
164 }; | 176 }; |
165 | 177 |
166 // Creates a new WebContents. | 178 // Creates a new WebContents. |
167 CONTENT_EXPORT static WebContents* Create(const CreateParams& params); | 179 CONTENT_EXPORT static WebContents* Create(const CreateParams& params); |
168 | 180 |
169 // Similar to Create() above but should be used when you need to prepopulate | 181 // Similar to Create() above but should be used when you need to prepopulate |
170 // the SessionStorageNamespaceMap of the WebContents. This can happen if | 182 // the SessionStorageNamespaceMap of the WebContents. This can happen if |
171 // you duplicate a WebContents, try to reconstitute it from a saved state, | 183 // you duplicate a WebContents, try to reconstitute it from a saved state, |
172 // or when you create a new WebContents based on another one (eg., when | 184 // or when you create a new WebContents based on another one (eg., when |
173 // servicing a window.open() call). | 185 // servicing a window.open() call). |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 765 |
754 private: | 766 private: |
755 // This interface should only be implemented inside content. | 767 // This interface should only be implemented inside content. |
756 friend class WebContentsImpl; | 768 friend class WebContentsImpl; |
757 WebContents() {} | 769 WebContents() {} |
758 }; | 770 }; |
759 | 771 |
760 } // namespace content | 772 } // namespace content |
761 | 773 |
762 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 774 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |