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

Unified Diff: content/shell/shell_javascript_dialog_creator.cc

Issue 9918013: Add JavaScript dialogs functionality to content_shell on Windows (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: more style fix 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
Index: content/shell/shell_javascript_dialog_creator.cc
diff --git a/content/shell/shell_javascript_dialog_creator.cc b/content/shell/shell_javascript_dialog_creator.cc
index d6b100c2b59c80255114a4f07ae7d7f1ff01037a..b0dc5a1c0f088bc0a626dd7f472371fa048681bd 100644
--- a/content/shell/shell_javascript_dialog_creator.cc
+++ b/content/shell/shell_javascript_dialog_creator.cc
@@ -26,7 +26,7 @@ void ShellJavaScriptDialogCreator::RunJavaScriptDialog(
const string16& default_prompt_text,
const DialogClosedCallback& callback,
bool* did_suppress_message) {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_WIN)
*did_suppress_message = false;
if (dialog_.get()) {
@@ -56,7 +56,7 @@ void ShellJavaScriptDialogCreator::RunBeforeUnloadDialog(
const string16& message_text,
bool is_reload,
const DialogClosedCallback& callback) {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_WIN)
if (dialog_.get()) {
// Seriously!?
callback.Run(true, string16());
@@ -81,7 +81,7 @@ void ShellJavaScriptDialogCreator::RunBeforeUnloadDialog(
void ShellJavaScriptDialogCreator::ResetJavaScriptState(
WebContents* web_contents) {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_WIN)
if (dialog_.get()) {
dialog_->Cancel();
dialog_.reset();
@@ -92,7 +92,7 @@ void ShellJavaScriptDialogCreator::ResetJavaScriptState(
}
void ShellJavaScriptDialogCreator::DialogClosed(ShellJavaScriptDialog* dialog) {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) || defined(OS_WIN)
DCHECK_EQ(dialog, dialog_.get());
dialog_.reset();
#else

Powered by Google App Engine
This is Rietveld 408576698