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 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 | 157 |
| 158 // Request the delegate to change the zoom level of the current tab. | 158 // Request the delegate to change the zoom level of the current tab. |
| 159 virtual void ContentsZoomChange(bool zoom_in) {} | 159 virtual void ContentsZoomChange(bool zoom_in) {} |
| 160 | 160 |
| 161 // Called to determine if the WebContents can be overscrolled with touch/wheel | 161 // Called to determine if the WebContents can be overscrolled with touch/wheel |
| 162 // gestures. | 162 // gestures. |
| 163 virtual bool CanOverscrollContent() const; | 163 virtual bool CanOverscrollContent() const; |
| 164 | 164 |
| 165 // Callback that allows vertical overscroll activies to be communicated to the | 165 // Callback that allows vertical overscroll activies to be communicated to the |
| 166 // delegate. | 166 // delegate. |
| 167 virtual void OverscrollUpdate(int delta_y) {} | 167 virtual void OverscrollUpdate(int delta_y) {} |
|
sadrul
2014/09/11 04:33:14
Can you add a comment here that |delta_y| is the t
| |
| 168 | 168 |
| 169 // Invoked when overscroll completes. | |
|
sadrul
2014/09/11 04:33:14
+vertical
| |
| 170 virtual void OverscrollComplete() {} | |
| 171 | |
| 169 // Return the rect where to display the resize corner, if any, otherwise | 172 // Return the rect where to display the resize corner, if any, otherwise |
| 170 // an empty rect. | 173 // an empty rect. |
| 171 virtual gfx::Rect GetRootWindowResizerRect() const; | 174 virtual gfx::Rect GetRootWindowResizerRect() const; |
| 172 | 175 |
| 173 // Invoked prior to showing before unload handler confirmation dialog. | 176 // Invoked prior to showing before unload handler confirmation dialog. |
| 174 virtual void WillRunBeforeUnloadConfirm() {} | 177 virtual void WillRunBeforeUnloadConfirm() {} |
| 175 | 178 |
| 176 // Returns true if javascript dialogs and unload alerts are suppressed. | 179 // Returns true if javascript dialogs and unload alerts are suppressed. |
| 177 // Default is false. | 180 // Default is false. |
| 178 virtual bool ShouldSuppressDialogs(); | 181 virtual bool ShouldSuppressDialogs(); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 // Called when |this| is no longer the WebContentsDelegate for |source|. | 494 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 492 void Detach(WebContents* source); | 495 void Detach(WebContents* source); |
| 493 | 496 |
| 494 // The WebContents that this is currently a delegate for. | 497 // The WebContents that this is currently a delegate for. |
| 495 std::set<WebContents*> attached_contents_; | 498 std::set<WebContents*> attached_contents_; |
| 496 }; | 499 }; |
| 497 | 500 |
| 498 } // namespace content | 501 } // namespace content |
| 499 | 502 |
| 500 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 503 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |