Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1768)

Unified Diff: content/shell/shell.cc

Issue 9836127: Content shell: Javascript dialogs, first pass, just Mac for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ifdef out for non-mac Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_javascript_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell.cc
diff --git a/content/shell/shell.cc b/content/shell/shell.cc
index 49097bc36257f6a3e8a5ce177fd7655b543838ae..dff406f6032dacdc4d3002135fa9e93fecaa9ac9 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) {
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_javascript_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698