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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Request the delegate to change the zoom level of the current tab. | 156 // Request the delegate to change the zoom level of the current tab. |
157 virtual void ContentsZoomChange(bool zoom_in) {} | 157 virtual void ContentsZoomChange(bool zoom_in) {} |
158 | 158 |
159 // Called to determine if the WebContents can be overscrolled with touch/wheel | 159 // Called to determine if the WebContents can be overscrolled with touch/wheel |
160 // gestures. | 160 // gestures. |
161 virtual bool CanOverscrollContent() const; | 161 virtual bool CanOverscrollContent() const; |
162 | 162 |
163 // Callback that allows vertical overscroll activies to be communicated to the | 163 // Callback that allows vertical overscroll activies to be communicated to the |
164 // delegate. |delta_y| is the total amount of overscroll. | 164 // delegate. |delta_y| is the total amount of overscroll. |
165 virtual void OverscrollUpdate(int delta_y) {} | 165 virtual void OverscrollUpdate(float delta_y) {} |
166 | 166 |
167 // Invoked when a vertical overscroll completes. | 167 // Invoked when a vertical overscroll completes. |
168 virtual void OverscrollComplete() {} | 168 virtual void OverscrollComplete() {} |
169 | 169 |
170 // Return the rect where to display the resize corner, if any, otherwise | 170 // Return the rect where to display the resize corner, if any, otherwise |
171 // an empty rect. | 171 // an empty rect. |
172 virtual gfx::Rect GetRootWindowResizerRect() const; | 172 virtual gfx::Rect GetRootWindowResizerRect() const; |
173 | 173 |
174 // Invoked prior to showing before unload handler confirmation dialog. | 174 // Invoked prior to showing before unload handler confirmation dialog. |
175 virtual void WillRunBeforeUnloadConfirm() {} | 175 virtual void WillRunBeforeUnloadConfirm() {} |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 // Called when |this| is no longer the WebContentsDelegate for |source|. | 499 // Called when |this| is no longer the WebContentsDelegate for |source|. |
500 void Detach(WebContents* source); | 500 void Detach(WebContents* source); |
501 | 501 |
502 // The WebContents that this is currently a delegate for. | 502 // The WebContents that this is currently a delegate for. |
503 std::set<WebContents*> attached_contents_; | 503 std::set<WebContents*> attached_contents_; |
504 }; | 504 }; |
505 | 505 |
506 } // namespace content | 506 } // namespace content |
507 | 507 |
508 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 508 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |