Chromium Code Reviews| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 // loading feedback. See WebContents::IsLoading() | 107 // loading feedback. See WebContents::IsLoading() |
| 108 virtual void LoadingStateChanged(WebContents* source) {} | 108 virtual void LoadingStateChanged(WebContents* source) {} |
| 109 | 109 |
| 110 // Notifies the delegate that the page has made some progress loading. | 110 // Notifies the delegate that the page has made some progress loading. |
| 111 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully | 111 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
| 112 // loaded). | 112 // loaded). |
| 113 // Note that to receive this notification, you must have called | 113 // Note that to receive this notification, you must have called |
| 114 // SetReportLoadProgressEnabled(true) in the render view. | 114 // SetReportLoadProgressEnabled(true) in the render view. |
| 115 virtual void LoadProgressChanged(double progress) {} | 115 virtual void LoadProgressChanged(double progress) {} |
| 116 | 116 |
| 117 // Notifies the delegate the the page finished loadingm, i.e. the main | |
| 118 // document was loaded, parsed, and the onload event handlers are finished. | |
| 119 virtual void DidFinishLoad(WebContents* contents) {} | |
|
jam
2012/01/26 18:47:34
we should avoid adding methods to this interface s
jochen (gone - plz use gerrit)
2012/01/27 08:49:56
Done.
| |
| 120 | |
| 117 // Request the delegate to close this web contents, and do whatever cleanup | 121 // Request the delegate to close this web contents, and do whatever cleanup |
| 118 // it needs to do. | 122 // it needs to do. |
| 119 virtual void CloseContents(WebContents* source) {} | 123 virtual void CloseContents(WebContents* source) {} |
| 120 | 124 |
| 121 // Informs the delegate that the underlying RenderViewHost has been swapped | 125 // Informs the delegate that the underlying RenderViewHost has been swapped |
| 122 // out so it can perform any cleanup necessary. | 126 // out so it can perform any cleanup necessary. |
| 123 virtual void SwappedOut(WebContents* source) {} | 127 virtual void SwappedOut(WebContents* source) {} |
| 124 | 128 |
| 125 // Request the delegate to move this tab contents to the specified position | 129 // Request the delegate to move this tab contents to the specified position |
| 126 // in screen coordinates. | 130 // in screen coordinates. |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 398 // Called when |this| is no longer the WebContentsDelegate for |source|. | 402 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 399 void Detach(WebContents* source); | 403 void Detach(WebContents* source); |
| 400 | 404 |
| 401 // The WebContents that this is currently a delegate for. | 405 // The WebContents that this is currently a delegate for. |
| 402 std::set<WebContents*> attached_contents_; | 406 std::set<WebContents*> attached_contents_; |
| 403 }; | 407 }; |
| 404 | 408 |
| 405 } // namespace content | 409 } // namespace content |
| 406 | 410 |
| 407 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 411 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |