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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Notifies the delegate that the page has made some progress loading. | 134 // Notifies the delegate that the page has made some progress loading. |
135 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully | 135 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
136 // loaded). | 136 // loaded). |
137 virtual void LoadProgressChanged(WebContents* source, | 137 virtual void LoadProgressChanged(WebContents* source, |
138 double progress) {} | 138 double progress) {} |
139 | 139 |
140 // Request the delegate to close this web contents, and do whatever cleanup | 140 // Request the delegate to close this web contents, and do whatever cleanup |
141 // it needs to do. | 141 // it needs to do. |
142 virtual void CloseContents(WebContents* source) {} | 142 virtual void CloseContents(WebContents* source) {} |
143 | 143 |
144 // Informs the delegate that the underlying RenderViewHost has been swapped | |
145 // out so it can perform any cleanup necessary. | |
146 virtual void SwappedOut(WebContents* source) {} | |
147 | |
148 // Request the delegate to move this WebContents to the specified position | 144 // Request the delegate to move this WebContents to the specified position |
149 // in screen coordinates. | 145 // in screen coordinates. |
150 virtual void MoveContents(WebContents* source, const gfx::Rect& pos) {} | 146 virtual void MoveContents(WebContents* source, const gfx::Rect& pos) {} |
151 | 147 |
152 // Called to determine if the WebContents is contained in a popup window | 148 // Called to determine if the WebContents is contained in a popup window |
153 // or a panel window. | 149 // or a panel window. |
154 virtual bool IsPopupOrPanel(const WebContents* source) const; | 150 virtual bool IsPopupOrPanel(const WebContents* source) const; |
155 | 151 |
156 // Notification that the target URL has changed. | 152 // Notification that the target URL has changed. |
157 virtual void UpdateTargetURL(WebContents* source, | 153 virtual void UpdateTargetURL(WebContents* source, |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 // Called when |this| is no longer the WebContentsDelegate for |source|. | 541 // Called when |this| is no longer the WebContentsDelegate for |source|. |
546 void Detach(WebContents* source); | 542 void Detach(WebContents* source); |
547 | 543 |
548 // The WebContents that this is currently a delegate for. | 544 // The WebContents that this is currently a delegate for. |
549 std::set<WebContents*> attached_contents_; | 545 std::set<WebContents*> attached_contents_; |
550 }; | 546 }; |
551 | 547 |
552 } // namespace content | 548 } // namespace content |
553 | 549 |
554 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 550 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |