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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // Invoked when a vertical overscroll completes. | 176 // Invoked when a vertical overscroll completes. |
177 virtual void OverscrollComplete() {} | 177 virtual void OverscrollComplete() {} |
178 | 178 |
179 // Return the rect where to display the resize corner, if any, otherwise | 179 // Return the rect where to display the resize corner, if any, otherwise |
180 // an empty rect. | 180 // an empty rect. |
181 virtual gfx::Rect GetRootWindowResizerRect() const; | 181 virtual gfx::Rect GetRootWindowResizerRect() const; |
182 | 182 |
183 // Invoked prior to showing before unload handler confirmation dialog. | 183 // Invoked prior to showing before unload handler confirmation dialog. |
184 virtual void WillRunBeforeUnloadConfirm() {} | 184 virtual void WillRunBeforeUnloadConfirm() {} |
185 | 185 |
186 // Returns true if javascript dialogs and unload alerts are suppressed. | 186 // Returns true if JavaScript dialogs and onbeforeunload requests are |
187 // Default is false. | 187 // suppressed. |before_unload| is true if the dialog is an onbeforeunload |
188 virtual bool ShouldSuppressDialogs(WebContents* source); | 188 // request. The default is false, to not suppress dialogs. |
| 189 virtual bool ShouldSuppressDialogs(WebContents* source, bool before_unload); |
189 | 190 |
190 // Returns whether pending NavigationEntries for aborted browser-initiated | 191 // Returns whether pending NavigationEntries for aborted browser-initiated |
191 // navigations should be preserved (and thus returned from GetVisibleURL). | 192 // navigations should be preserved (and thus returned from GetVisibleURL). |
192 // Defaults to false. | 193 // Defaults to false. |
193 virtual bool ShouldPreserveAbortedURLs(WebContents* source); | 194 virtual bool ShouldPreserveAbortedURLs(WebContents* source); |
194 | 195 |
195 // Add a message to the console. Returning true indicates that the delegate | 196 // Add a message to the console. Returning true indicates that the delegate |
196 // handled the message. If false is returned the default logging mechanism | 197 // handled the message. If false is returned the default logging mechanism |
197 // will be used for the message. | 198 // will be used for the message. |
198 virtual bool AddMessageToConsole(WebContents* source, | 199 virtual bool AddMessageToConsole(WebContents* source, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 // Called when |this| is no longer the WebContentsDelegate for |source|. | 542 // Called when |this| is no longer the WebContentsDelegate for |source|. |
542 void Detach(WebContents* source); | 543 void Detach(WebContents* source); |
543 | 544 |
544 // The WebContents that this is currently a delegate for. | 545 // The WebContents that this is currently a delegate for. |
545 std::set<WebContents*> attached_contents_; | 546 std::set<WebContents*> attached_contents_; |
546 }; | 547 }; |
547 | 548 |
548 } // namespace content | 549 } // namespace content |
549 | 550 |
550 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 551 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
OLD | NEW |