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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) | 120 #if defined(OS_ANDROID) |
121 // Notifies the delegate that the page has made some progress loading. | 121 // 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 | 122 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
123 // loaded). | 123 // loaded). |
124 virtual void LoadProgressChanged(WebContents* source, | 124 virtual void LoadProgressChanged(WebContents* source, double progress) {} |
125 double progress) {} | |
126 #endif | 125 #endif |
127 | 126 |
128 // Request the delegate to close this web contents, and do whatever cleanup | 127 // Request the delegate to close this web contents, and do whatever cleanup |
129 // it needs to do. | 128 // it needs to do. |
130 virtual void CloseContents(WebContents* source) {} | 129 virtual void CloseContents(WebContents* source) {} |
131 | 130 |
132 // Informs the delegate that the underlying RenderViewHost has been swapped | 131 // Informs the delegate that the underlying RenderViewHost has been swapped |
133 // out so it can perform any cleanup necessary. | 132 // out so it can perform any cleanup necessary. |
134 virtual void SwappedOut(WebContents* source) {} | 133 virtual void SwappedOut(WebContents* source) {} |
135 | 134 |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 // Called when |this| is no longer the WebContentsDelegate for |source|. | 443 // Called when |this| is no longer the WebContentsDelegate for |source|. |
445 void Detach(WebContents* source); | 444 void Detach(WebContents* source); |
446 | 445 |
447 // The WebContents that this is currently a delegate for. | 446 // The WebContents that this is currently a delegate for. |
448 std::set<WebContents*> attached_contents_; | 447 std::set<WebContents*> attached_contents_; |
449 }; | 448 }; |
450 | 449 |
451 } // namespace content | 450 } // namespace content |
452 | 451 |
453 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 452 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |