diff options
Diffstat (limited to 'content/shell/shell.cc')
-rw-r--r-- | content/shell/shell.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/shell/shell.cc b/content/shell/shell.cc index 49097bc..dff406f 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_javascript_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) { |