Index: content/shell/shell.cc |
diff --git a/content/shell/shell.cc b/content/shell/shell.cc |
index 49097bc36257f6a3e8a5ce177fd7655b543838ae..2e9c8adceb8eeac3a9a4b2f48ef72e2af0911844 100644 |
--- a/content/shell/shell.cc |
+++ b/content/shell/shell.cc |
@@ -11,6 +11,7 @@ |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
+#include "content/shell/shell_js_dialog_creator.h" |
#include "content/shell/shell_messages.h" |
#include "content/shell/shell_switches.h" |
#include "ui/gfx/size.h" |
@@ -141,6 +142,15 @@ void Shell::DidNavigateMainFramePostCommit(WebContents* tab) { |
PlatformSetAddressBarURL(tab->GetURL()); |
} |
+JavaScriptDialogCreator* Shell::GetJavaScriptDialogCreator() { |
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) |
+ return NULL; |
+ |
+ if (!dialog_creator_.get()) |
+ dialog_creator_.reset(new ShellJavaScriptDialogCreator()); |
+ return dialog_creator_.get(); |
+} |
+ |
void Shell::DidFinishLoad(int64 frame_id, |
const GURL& validated_url, |
bool is_main_frame) { |