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

Unified Diff: content/shell/shell_js_dialog.h

Issue 9836127: Content shell: Javascript dialogs, first pass, just Mac for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.cc ('k') | content/shell/shell_js_dialog_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_js_dialog.h
diff --git a/content/shell/shell_js_dialog.h b/content/shell/shell_js_dialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..4937a7ec70a61f10b50db7c9de39c8bf2c4ac282
--- /dev/null
+++ b/content/shell/shell_js_dialog.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_SHELL_SHELL_JS_DIALOG_H_
jochen (gone - plz use gerrit) 2012/03/28 18:38:18 I think I would prefer shell_javascript_dialog ins
Avi (use Gerrit) 2012/03/28 20:43:43 Done.
+#define CONTENT_SHELL_SHELL_JS_DIALOG_H_
+#pragma once
+
+#include "content/public/browser/javascript_dialogs.h"
+
+#if defined(OS_MACOSX)
+#if __OBJC__
+@class NSAlert;
+@class ShellJavaScriptDialogHelper;
+#else
+class NSAlert;
+class ShellJavaScriptDialogHelper;
+#endif // __OBJC__
+#endif // defined(OS_MACOSX)
+
+namespace content {
+
+class ShellJavaScriptDialogCreator;
+
+class ShellJavaScriptDialog {
+ public:
+ ShellJavaScriptDialog(
+ ShellJavaScriptDialogCreator* creator,
+ ui::JavascriptMessageType javascript_message_type,
+ const string16& message_text,
+ const string16& default_prompt_text,
+ const JavaScriptDialogCreator::DialogClosedCallback& callback);
+ ~ShellJavaScriptDialog();
jochen (gone - plz use gerrit) 2012/03/28 18:38:18 virtual
Avi (use Gerrit) 2012/03/28 20:43:43 Why? This isn't an interface, it extends nothing,
+
+ // Called to cancel a dialog mid-flight.
+ void Cancel();
+
+ private:
+ ShellJavaScriptDialogCreator* creator_;
+ JavaScriptDialogCreator::DialogClosedCallback callback_;
+
+#if defined(OS_MACOSX)
+ ShellJavaScriptDialogHelper* helper_; // owned
+ NSAlert* alert_; // weak, owned by |helper_|.
+#endif // defined(OS_MACOSX)
+
+ DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_SHELL_JS_DIALOG_H_
« no previous file with comments | « content/shell/shell.cc ('k') | content/shell/shell_js_dialog_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698