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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // Selects the specified contents, bringing its container to the front. | 105 // Selects the specified contents, bringing its container to the front. |
106 virtual void ActivateContents(WebContents* contents) {} | 106 virtual void ActivateContents(WebContents* contents) {} |
107 | 107 |
108 // Deactivates the specified contents by deactivating its container and | 108 // Deactivates the specified contents by deactivating its container and |
109 // potentialy moving it to the back of the Z order. | 109 // potentialy moving it to the back of the Z order. |
110 virtual void DeactivateContents(WebContents* contents) {} | 110 virtual void DeactivateContents(WebContents* contents) {} |
111 | 111 |
112 // Notifies the delegate that this contents is starting or is done loading | 112 // Notifies the delegate that this contents is starting or is done loading |
113 // some resource. The delegate should use this notification to represent | 113 // some resource. The delegate should use this notification to represent |
114 // loading feedback. See WebContents::IsLoading() | 114 // loading feedback. See WebContents::IsLoading() |
115 virtual void LoadingStateChanged(WebContents* source) {} | 115 // |to_different_document| will be true unless the load is a fragment |
| 116 // navigation, or triggered by history.pushState/replaceState. |
| 117 virtual void LoadingStateChanged(WebContents* source, |
| 118 bool to_different_document) {} |
116 | 119 |
117 // Notifies the delegate that the page has made some progress loading. | 120 // Notifies the delegate that the page has made some progress loading. |
118 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully | 121 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
119 // loaded). | 122 // loaded). |
120 virtual void LoadProgressChanged(WebContents* source, | 123 virtual void LoadProgressChanged(WebContents* source, |
121 double progress) {} | 124 double progress) {} |
122 | 125 |
123 // Request the delegate to close this web contents, and do whatever cleanup | 126 // Request the delegate to close this web contents, and do whatever cleanup |
124 // it needs to do. | 127 // it needs to do. |
125 virtual void CloseContents(WebContents* source) {} | 128 virtual void CloseContents(WebContents* source) {} |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // Called when |this| is no longer the WebContentsDelegate for |source|. | 473 // Called when |this| is no longer the WebContentsDelegate for |source|. |
471 void Detach(WebContents* source); | 474 void Detach(WebContents* source); |
472 | 475 |
473 // The WebContents that this is currently a delegate for. | 476 // The WebContents that this is currently a delegate for. |
474 std::set<WebContents*> attached_contents_; | 477 std::set<WebContents*> attached_contents_; |
475 }; | 478 }; |
476 | 479 |
477 } // namespace content | 480 } // namespace content |
478 | 481 |
479 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 482 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |