| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 // an empty rect. | 166 // an empty rect. |
| 167 virtual gfx::Rect GetRootWindowResizerRect() const; | 167 virtual gfx::Rect GetRootWindowResizerRect() const; |
| 168 | 168 |
| 169 // Invoked prior to showing before unload handler confirmation dialog. | 169 // Invoked prior to showing before unload handler confirmation dialog. |
| 170 virtual void WillRunBeforeUnloadConfirm() {} | 170 virtual void WillRunBeforeUnloadConfirm() {} |
| 171 | 171 |
| 172 // Returns true if javascript dialogs and unload alerts are suppressed. | 172 // Returns true if javascript dialogs and unload alerts are suppressed. |
| 173 // Default is false. | 173 // Default is false. |
| 174 virtual bool ShouldSuppressDialogs(); | 174 virtual bool ShouldSuppressDialogs(); |
| 175 | 175 |
| 176 // Returns whether pending NavigationEntries for aborted browser-initiated |
| 177 // navigations should be preserved (and thus returned from GetVisibleURL). |
| 178 // Defaults to false. |
| 179 virtual bool ShouldPreserveAbortedURLs(WebContents* source); |
| 180 |
| 176 // Add a message to the console. Returning true indicates that the delegate | 181 // Add a message to the console. Returning true indicates that the delegate |
| 177 // handled the message. If false is returned the default logging mechanism | 182 // handled the message. If false is returned the default logging mechanism |
| 178 // will be used for the message. | 183 // will be used for the message. |
| 179 virtual bool AddMessageToConsole(WebContents* source, | 184 virtual bool AddMessageToConsole(WebContents* source, |
| 180 int32 level, | 185 int32 level, |
| 181 const base::string16& message, | 186 const base::string16& message, |
| 182 int32 line_no, | 187 int32 line_no, |
| 183 const base::string16& source_id); | 188 const base::string16& source_id); |
| 184 | 189 |
| 185 // Tells us that we've finished firing this tab's beforeunload event. | 190 // Tells us that we've finished firing this tab's beforeunload event. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 // Called when |this| is no longer the WebContentsDelegate for |source|. | 481 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 477 void Detach(WebContents* source); | 482 void Detach(WebContents* source); |
| 478 | 483 |
| 479 // The WebContents that this is currently a delegate for. | 484 // The WebContents that this is currently a delegate for. |
| 480 std::set<WebContents*> attached_contents_; | 485 std::set<WebContents*> attached_contents_; |
| 481 }; | 486 }; |
| 482 | 487 |
| 483 } // namespace content | 488 } // namespace content |
| 484 | 489 |
| 485 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 490 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |