| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 virtual bool OnGoToEntryOffset(int offset); | 302 virtual bool OnGoToEntryOffset(int offset); |
| 303 | 303 |
| 304 // Allows delegate to control whether a WebContents will be created. Returns | 304 // Allows delegate to control whether a WebContents will be created. Returns |
| 305 // true to allow the creation. Default is to allow it. In cases where the | 305 // true to allow the creation. Default is to allow it. In cases where the |
| 306 // delegate handles the creation/navigation itself, it will use |target_url|. | 306 // delegate handles the creation/navigation itself, it will use |target_url|. |
| 307 // The embedder has to synchronously adopt |route_id| or else the view will | 307 // The embedder has to synchronously adopt |route_id| or else the view will |
| 308 // be destroyed. | 308 // be destroyed. |
| 309 virtual bool ShouldCreateWebContents( | 309 virtual bool ShouldCreateWebContents( |
| 310 WebContents* web_contents, | 310 WebContents* web_contents, |
| 311 int route_id, | 311 int route_id, |
| 312 int main_frame_route_id, |
| 312 WindowContainerType window_container_type, | 313 WindowContainerType window_container_type, |
| 313 const base::string16& frame_name, | 314 const base::string16& frame_name, |
| 314 const GURL& target_url, | 315 const GURL& target_url, |
| 315 const std::string& partition_id, | 316 const std::string& partition_id, |
| 316 SessionStorageNamespace* session_storage_namespace); | 317 SessionStorageNamespace* session_storage_namespace); |
| 317 | 318 |
| 318 // Notifies the delegate about the creation of a new WebContents. This | 319 // Notifies the delegate about the creation of a new WebContents. This |
| 319 // typically happens when popups are created. | 320 // typically happens when popups are created. |
| 320 virtual void WebContentsCreated(WebContents* source_contents, | 321 virtual void WebContentsCreated(WebContents* source_contents, |
| 321 int opener_render_frame_id, | 322 int opener_render_frame_id, |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // Called when |this| is no longer the WebContentsDelegate for |source|. | 505 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 505 void Detach(WebContents* source); | 506 void Detach(WebContents* source); |
| 506 | 507 |
| 507 // The WebContents that this is currently a delegate for. | 508 // The WebContents that this is currently a delegate for. |
| 508 std::set<WebContents*> attached_contents_; | 509 std::set<WebContents*> attached_contents_; |
| 509 }; | 510 }; |
| 510 | 511 |
| 511 } // namespace content | 512 } // namespace content |
| 512 | 513 |
| 513 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 514 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |