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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell.cc ('k') | content/shell/shell_js_dialog_creator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #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.
6 #define CONTENT_SHELL_SHELL_JS_DIALOG_H_
7 #pragma once
8
9 #include "content/public/browser/javascript_dialogs.h"
10
11 #if defined(OS_MACOSX)
12 #if __OBJC__
13 @class NSAlert;
14 @class ShellJavaScriptDialogHelper;
15 #else
16 class NSAlert;
17 class ShellJavaScriptDialogHelper;
18 #endif // __OBJC__
19 #endif // defined(OS_MACOSX)
20
21 namespace content {
22
23 class ShellJavaScriptDialogCreator;
24
25 class ShellJavaScriptDialog {
26 public:
27 ShellJavaScriptDialog(
28 ShellJavaScriptDialogCreator* creator,
29 ui::JavascriptMessageType javascript_message_type,
30 const string16& message_text,
31 const string16& default_prompt_text,
32 const JavaScriptDialogCreator::DialogClosedCallback& callback);
33 ~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,
34
35 // Called to cancel a dialog mid-flight.
36 void Cancel();
37
38 private:
39 ShellJavaScriptDialogCreator* creator_;
40 JavaScriptDialogCreator::DialogClosedCallback callback_;
41
42 #if defined(OS_MACOSX)
43 ShellJavaScriptDialogHelper* helper_; // owned
44 NSAlert* alert_; // weak, owned by |helper_|.
45 #endif // defined(OS_MACOSX)
46
47 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_SHELL_SHELL_JS_DIALOG_H_
OLDNEW
« 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