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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // typically happens when popups are created. | 300 // typically happens when popups are created. |
301 virtual void WebContentsCreated(WebContents* source_contents, | 301 virtual void WebContentsCreated(WebContents* source_contents, |
302 int64 source_frame_id, | 302 int64 source_frame_id, |
303 const GURL& target_url, | 303 const GURL& target_url, |
304 WebContents* new_contents) {} | 304 WebContents* new_contents) {} |
305 | 305 |
306 // Notifies the delegate that the content restrictions for this tab has | 306 // Notifies the delegate that the content restrictions for this tab has |
307 // changed. | 307 // changed. |
308 virtual void ContentRestrictionsChanged(WebContents* source) {} | 308 virtual void ContentRestrictionsChanged(WebContents* source) {} |
309 | 309 |
| 310 #if defined(OS_ANDROID) |
| 311 // Returns true if the delegate wants to handle the url instead. Default |
| 312 // returns false. |
| 313 virtual bool ShouldOverrideLoading(const GURL& url); |
| 314 #endif |
| 315 |
310 // Notification that the tab is hung. | 316 // Notification that the tab is hung. |
311 virtual void RendererUnresponsive(WebContents* source) {} | 317 virtual void RendererUnresponsive(WebContents* source) {} |
312 | 318 |
313 // Notification that the tab is no longer hung. | 319 // Notification that the tab is no longer hung. |
314 virtual void RendererResponsive(WebContents* source) {} | 320 virtual void RendererResponsive(WebContents* source) {} |
315 | 321 |
316 // Notification that a worker associated with this tab has crashed. | 322 // Notification that a worker associated with this tab has crashed. |
317 virtual void WorkerCrashed(WebContents* source) {} | 323 virtual void WorkerCrashed(WebContents* source) {} |
318 | 324 |
319 // Invoked when a main fram navigation occurs. | 325 // Invoked when a main fram navigation occurs. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 // Called when |this| is no longer the WebContentsDelegate for |source|. | 440 // Called when |this| is no longer the WebContentsDelegate for |source|. |
435 void Detach(WebContents* source); | 441 void Detach(WebContents* source); |
436 | 442 |
437 // The WebContents that this is currently a delegate for. | 443 // The WebContents that this is currently a delegate for. |
438 std::set<WebContents*> attached_contents_; | 444 std::set<WebContents*> attached_contents_; |
439 }; | 445 }; |
440 | 446 |
441 } // namespace content | 447 } // namespace content |
442 | 448 |
443 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 449 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |