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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 | 110 |
111 // Deactivates the specified contents by deactivating its container and | 111 // Deactivates the specified contents by deactivating its container and |
112 // potentialy moving it to the back of the Z order. | 112 // potentialy moving it to the back of the Z order. |
113 virtual void DeactivateContents(WebContents* contents) {} | 113 virtual void DeactivateContents(WebContents* contents) {} |
114 | 114 |
115 // Notifies the delegate that this contents is starting or is done loading | 115 // Notifies the delegate that this contents is starting or is done loading |
116 // some resource. The delegate should use this notification to represent | 116 // some resource. The delegate should use this notification to represent |
117 // loading feedback. See WebContents::IsLoading() | 117 // loading feedback. See WebContents::IsLoading() |
118 virtual void LoadingStateChanged(WebContents* source) {} | 118 virtual void LoadingStateChanged(WebContents* source) {} |
119 | 119 |
120 #if defined(OS_ANDROID) | |
121 // Notifies the delegate that the page has made some progress loading. | 120 // Notifies the delegate that the page has made some progress loading. |
122 // |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 |
123 // loaded). | 122 // loaded). |
124 virtual void LoadProgressChanged(WebContents* source, | 123 virtual void LoadProgressChanged(WebContents* source, double progress) {} |
nilesh
2013/01/09 01:23:26
If I remember correctly, now the api is lying as t
| |
125 double progress) {} | |
126 #endif | |
127 | 124 |
128 // Request the delegate to close this web contents, and do whatever cleanup | 125 // Request the delegate to close this web contents, and do whatever cleanup |
129 // it needs to do. | 126 // it needs to do. |
130 virtual void CloseContents(WebContents* source) {} | 127 virtual void CloseContents(WebContents* source) {} |
131 | 128 |
132 // Informs the delegate that the underlying RenderViewHost has been swapped | 129 // Informs the delegate that the underlying RenderViewHost has been swapped |
133 // out so it can perform any cleanup necessary. | 130 // out so it can perform any cleanup necessary. |
134 virtual void SwappedOut(WebContents* source) {} | 131 virtual void SwappedOut(WebContents* source) {} |
135 | 132 |
136 // Request the delegate to move this WebContents to the specified position | 133 // Request the delegate to move this WebContents to the specified position |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
444 // Called when |this| is no longer the WebContentsDelegate for |source|. | 441 // Called when |this| is no longer the WebContentsDelegate for |source|. |
445 void Detach(WebContents* source); | 442 void Detach(WebContents* source); |
446 | 443 |
447 // The WebContents that this is currently a delegate for. | 444 // The WebContents that this is currently a delegate for. |
448 std::set<WebContents*> attached_contents_; | 445 std::set<WebContents*> attached_contents_; |
449 }; | 446 }; |
450 | 447 |
451 } // namespace content | 448 } // namespace content |
452 | 449 |
453 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 450 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |