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_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // Returns true to allow WebContents to continue with the default processing. | 286 // Returns true to allow WebContents to continue with the default processing. |
287 virtual bool OnGoToEntryOffset(int offset); | 287 virtual bool OnGoToEntryOffset(int offset); |
288 | 288 |
289 // Allows delegate to control whether a WebContents will be created. Returns | 289 // Allows delegate to control whether a WebContents will be created. Returns |
290 // true to allow the creation. Default is to allow it. In cases where the | 290 // true to allow the creation. Default is to allow it. In cases where the |
291 // delegate handles the creation/navigation itself, it will use |target_url|. | 291 // delegate handles the creation/navigation itself, it will use |target_url|. |
292 // The embedder has to synchronously adopt |route_id| or else the view will | 292 // The embedder has to synchronously adopt |route_id| or else the view will |
293 // be destroyed. | 293 // be destroyed. |
294 virtual bool ShouldCreateWebContents( | 294 virtual bool ShouldCreateWebContents( |
295 WebContents* web_contents, | 295 WebContents* web_contents, |
296 int route_id, | 296 int32 route_id, |
297 int main_frame_route_id, | 297 int32 main_frame_route_id, |
| 298 int32 main_frame_widget_route_id, |
| 299 int32 surface_id, |
298 WindowContainerType window_container_type, | 300 WindowContainerType window_container_type, |
299 const std::string& frame_name, | 301 const std::string& frame_name, |
300 const GURL& target_url, | 302 const GURL& target_url, |
301 const std::string& partition_id, | 303 const std::string& partition_id, |
302 SessionStorageNamespace* session_storage_namespace); | 304 SessionStorageNamespace* session_storage_namespace); |
303 | 305 |
304 // Notifies the delegate about the creation of a new WebContents. This | 306 // Notifies the delegate about the creation of a new WebContents. This |
305 // typically happens when popups are created. | 307 // typically happens when popups are created. |
306 virtual void WebContentsCreated(WebContents* source_contents, | 308 virtual void WebContentsCreated(WebContents* source_contents, |
307 int opener_render_frame_id, | 309 int opener_render_frame_id, |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 // Called when |this| is no longer the WebContentsDelegate for |source|. | 514 // Called when |this| is no longer the WebContentsDelegate for |source|. |
513 void Detach(WebContents* source); | 515 void Detach(WebContents* source); |
514 | 516 |
515 // The WebContents that this is currently a delegate for. | 517 // The WebContents that this is currently a delegate for. |
516 std::set<WebContents*> attached_contents_; | 518 std::set<WebContents*> attached_contents_; |
517 }; | 519 }; |
518 | 520 |
519 } // namespace content | 521 } // namespace content |
520 | 522 |
521 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 523 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |