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 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 URLs for aborted browser-initiated navigations should be | |
| 177 // preserved in the omnibox. Defaults to false. | |
|
jam
2014/04/21 07:31:08
nit: avoid mentioning omnibox in content since tha
Charlie Reis
2014/04/21 17:29:00
Done.
| |
| 178 virtual bool ShouldPreserveAbortedURLs(WebContents* source); | |
| 179 | |
| 176 // Add a message to the console. Returning true indicates that the delegate | 180 // Add a message to the console. Returning true indicates that the delegate |
| 177 // handled the message. If false is returned the default logging mechanism | 181 // handled the message. If false is returned the default logging mechanism |
| 178 // will be used for the message. | 182 // will be used for the message. |
| 179 virtual bool AddMessageToConsole(WebContents* source, | 183 virtual bool AddMessageToConsole(WebContents* source, |
| 180 int32 level, | 184 int32 level, |
| 181 const base::string16& message, | 185 const base::string16& message, |
| 182 int32 line_no, | 186 int32 line_no, |
| 183 const base::string16& source_id); | 187 const base::string16& source_id); |
| 184 | 188 |
| 185 // Tells us that we've finished firing this tab's beforeunload event. | 189 // Tells us that we've finished firing this tab's beforeunload event. |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 // Called when |this| is no longer the WebContentsDelegate for |source|. | 477 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 474 void Detach(WebContents* source); | 478 void Detach(WebContents* source); |
| 475 | 479 |
| 476 // The WebContents that this is currently a delegate for. | 480 // The WebContents that this is currently a delegate for. |
| 477 std::set<WebContents*> attached_contents_; | 481 std::set<WebContents*> attached_contents_; |
| 478 }; | 482 }; |
| 479 | 483 |
| 480 } // namespace content | 484 } // namespace content |
| 481 | 485 |
| 482 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 486 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |