OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_COCOA_H_ |
6 #define CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_COCOA_H_ | 6 #define CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_COCOA_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 content::WebContents* alerting_web_contents, | 25 content::WebContents* alerting_web_contents, |
26 const base::string16& title, | 26 const base::string16& title, |
27 content::JavaScriptDialogType dialog_type, | 27 content::JavaScriptDialogType dialog_type, |
28 const base::string16& message_text, | 28 const base::string16& message_text, |
29 const base::string16& default_prompt_text, | 29 const base::string16& default_prompt_text, |
30 const content::JavaScriptDialogManager::DialogClosedCallback& | 30 const content::JavaScriptDialogManager::DialogClosedCallback& |
31 dialog_callback); | 31 dialog_callback); |
32 | 32 |
33 // JavaScriptDialog: | 33 // JavaScriptDialog: |
34 void CloseDialogWithoutCallback() override; | 34 void CloseDialogWithoutCallback() override; |
| 35 base::string16 GetUserInput() override; |
35 | 36 |
36 private: | 37 private: |
37 JavaScriptDialogCocoa( | 38 JavaScriptDialogCocoa( |
38 content::WebContents* parent_web_contents, | 39 content::WebContents* parent_web_contents, |
39 content::WebContents* alerting_web_contents, | 40 content::WebContents* alerting_web_contents, |
40 const base::string16& title, | 41 const base::string16& title, |
41 content::JavaScriptDialogType dialog_type, | 42 content::JavaScriptDialogType dialog_type, |
42 const base::string16& message_text, | 43 const base::string16& message_text, |
43 const base::string16& default_prompt_text, | 44 const base::string16& default_prompt_text, |
44 const content::JavaScriptDialogManager::DialogClosedCallback& | 45 const content::JavaScriptDialogManager::DialogClosedCallback& |
45 dialog_callback); | 46 dialog_callback); |
46 | 47 |
47 std::unique_ptr<JavaScriptDialogCocoaImpl> impl_; | 48 std::unique_ptr<JavaScriptDialogCocoaImpl> impl_; |
48 | 49 |
49 base::WeakPtrFactory<JavaScriptDialogCocoa> weak_factory_; | 50 base::WeakPtrFactory<JavaScriptDialogCocoa> weak_factory_; |
50 | 51 |
51 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogCocoa); | 52 DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogCocoa); |
52 }; | 53 }; |
53 | 54 |
54 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_COCOA_H_ | 55 #endif // CHROME_BROWSER_UI_JAVASCRIPT_DIALOGS_JAVASCRIPT_DIALOG_COCOA_H_ |
OLD | NEW |