Index: content/browser/content_browser_client.h |
diff --git a/content/browser/content_browser_client.h b/content/browser/content_browser_client.h |
index 169d4d6ca79e252b21dc2801994b7d817f44ae7d..09b2b5da3c9153e1557d0bdc9e6a6b7751304c3a 100644 |
--- a/content/browser/content_browser_client.h |
+++ b/content/browser/content_browser_client.h |
@@ -8,6 +8,7 @@ |
#include <string> |
+#include "base/string16.h" |
#include "content/common/content_client.h" |
class BrowserRenderProcessHost; |
@@ -28,6 +29,7 @@ class CookieOptions; |
namespace content { |
+class JavaScriptDialogDelegate; |
class ResourceContext; |
class WebUIFactory; |
@@ -109,6 +111,28 @@ class ContentBrowserClient { |
// Shows the given path using the OS file manager. |
virtual void RevealFolderInOS(const FilePath& path); |
+ // Allow the embedder to display a JavaScript dialog. |did_suppress_message| |
+ // will not be nil; if |true| is returned in it, the caller will handle faking |
+ // the reply. TODO(avi): Remove Profile from this call; http://crbug.com/84601 |
+ virtual void RunJavaScriptDialog(JavaScriptDialogDelegate* delegate, |
jam
2011/06/01 19:20:08
i tend to think of ContentBrowserClient as a last-
Avi (use Gerrit)
2011/06/01 19:40:34
Lemme poke at that.
|
+ const GURL& frame_url, |
+ int dialog_flags, |
+ const string16& message_text, |
+ const string16& default_prompt_text, |
+ IPC::Message* reply_message, |
+ bool* did_suppress_message, |
+ Profile* profile); |
+ |
+ // Allow the embedder to display a dialog asking the user if they want to |
+ // leave a page. The users response is returned to the renderer using |
+ // |reply_msg|. |
+ virtual void RunBeforeUnloadDialog(JavaScriptDialogDelegate* delegate, |
+ const string16& message_text, |
+ IPC::Message* reply_msg); |
+ |
+ // Resets any saved JavaScript dialog state for the delegate. |
+ virtual void ResetJavaScriptState(JavaScriptDialogDelegate* delegate); |
+ |
#if defined(OS_POSIX) && !defined(OS_MACOSX) |
// Can return an optional fd for crash handling, otherwise returns -1. |
virtual int GetCrashSignalFD(const std::string& process_type); |