OLD | NEW |
---|---|
(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_ | |
OLD | NEW |