| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // should be opened in a new tab or window. | 77 // should be opened in a new tab or window. |
| 78 // | 78 // |
| 79 // A nullptr source indicates the current tab (callers should probably use | 79 // A nullptr source indicates the current tab (callers should probably use |
| 80 // OpenURL() for these cases which does it for you). | 80 // OpenURL() for these cases which does it for you). |
| 81 | 81 |
| 82 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't | 82 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't |
| 83 // opened immediately. | 83 // opened immediately. |
| 84 virtual WebContents* OpenURLFromTab(WebContents* source, | 84 virtual WebContents* OpenURLFromTab(WebContents* source, |
| 85 const OpenURLParams& params); | 85 const OpenURLParams& params); |
| 86 | 86 |
| 87 // Allows the delegate to optionally cancel navigations that attempt to |
| 88 // transfer to a different process between the start of the network load and |
| 89 // commit. Defaults to true. |
| 90 virtual bool ShouldTransferNavigation(); |
| 91 |
| 87 // Called to inform the delegate that the WebContents's navigation state | 92 // Called to inform the delegate that the WebContents's navigation state |
| 88 // changed. The |changed_flags| indicates the parts of the navigation state | 93 // changed. The |changed_flags| indicates the parts of the navigation state |
| 89 // that have been updated. | 94 // that have been updated. |
| 90 virtual void NavigationStateChanged(WebContents* source, | 95 virtual void NavigationStateChanged(WebContents* source, |
| 91 InvalidateTypes changed_flags) {} | 96 InvalidateTypes changed_flags) {} |
| 92 | 97 |
| 93 // Called to inform the delegate that the WebContent's visible SSL state (as | 98 // Called to inform the delegate that the WebContent's visible SSL state (as |
| 94 // defined by SSLStatus) changed. | 99 // defined by SSLStatus) changed. |
| 95 virtual void VisibleSSLStateChanged(const WebContents* source) {} | 100 virtual void VisibleSSLStateChanged(const WebContents* source) {} |
| 96 | 101 |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 // Called when |this| is no longer the WebContentsDelegate for |source|. | 531 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 527 void Detach(WebContents* source); | 532 void Detach(WebContents* source); |
| 528 | 533 |
| 529 // The WebContents that this is currently a delegate for. | 534 // The WebContents that this is currently a delegate for. |
| 530 std::set<WebContents*> attached_contents_; | 535 std::set<WebContents*> attached_contents_; |
| 531 }; | 536 }; |
| 532 | 537 |
| 533 } // namespace content | 538 } // namespace content |
| 534 | 539 |
| 535 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 540 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |