OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_ |
6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_ | 6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "content/public/browser/javascript_dialog_manager.h" | 10 #include "content/public/browser/javascript_dialog_manager.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 JavaScriptMessageType message_type, | 29 JavaScriptMessageType message_type, |
30 const base::string16& message_text, | 30 const base::string16& message_text, |
31 const base::string16& default_prompt_text, | 31 const base::string16& default_prompt_text, |
32 const JavaScriptDialogManager::DialogClosedCallback& callback); | 32 const JavaScriptDialogManager::DialogClosedCallback& callback); |
33 ~ShellJavaScriptDialog(); | 33 ~ShellJavaScriptDialog(); |
34 | 34 |
35 // Called to cancel a dialog mid-flight. | 35 // Called to cancel a dialog mid-flight. |
36 void Cancel(); | 36 void Cancel(); |
37 | 37 |
38 private: | 38 private: |
39 ShellJavaScriptDialogManager* manager_; | |
40 JavaScriptDialogManager::DialogClosedCallback callback_; | 39 JavaScriptDialogManager::DialogClosedCallback callback_; |
41 | 40 |
42 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
43 ShellJavaScriptDialogHelper* helper_; // owned | 42 ShellJavaScriptDialogHelper* helper_; // owned |
44 #elif defined(OS_WIN) | 43 #elif defined(OS_WIN) |
| 44 ShellJavaScriptDialogManager* manager_; |
45 JavaScriptMessageType message_type_; | 45 JavaScriptMessageType message_type_; |
46 HWND dialog_win_; | 46 HWND dialog_win_; |
47 base::string16 message_text_; | 47 base::string16 message_text_; |
48 base::string16 default_prompt_text_; | 48 base::string16 default_prompt_text_; |
49 static INT_PTR CALLBACK DialogProc(HWND dialog, UINT message, WPARAM wparam, | 49 static INT_PTR CALLBACK DialogProc(HWND dialog, UINT message, WPARAM wparam, |
50 LPARAM lparam); | 50 LPARAM lparam); |
51 #endif | 51 #endif |
52 | 52 |
53 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog); | 53 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog); |
54 }; | 54 }; |
55 | 55 |
56 } // namespace content | 56 } // namespace content |
57 | 57 |
58 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_ | 58 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_ |
OLD | NEW |