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
3 // found in the LICENSE file.
5 #ifndef CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_
8 #include "content/public/browser/javascript_dialog_manager.h"
10 #if defined(OS_MACOSX)
12 @
class ShellJavaScriptDialogHelper
;
14 class ShellJavaScriptDialogHelper
;
16 #endif // defined(OS_MACOSX)
20 class ShellJavaScriptDialogManager
;
22 class ShellJavaScriptDialog
{
24 ShellJavaScriptDialog(
25 ShellJavaScriptDialogManager
* manager
,
26 gfx::NativeWindow parent_window
,
27 JavaScriptMessageType message_type
,
28 const base::string16
& message_text
,
29 const base::string16
& default_prompt_text
,
30 const JavaScriptDialogManager::DialogClosedCallback
& callback
);
31 ~ShellJavaScriptDialog();
33 // Called to cancel a dialog mid-flight.
37 ShellJavaScriptDialogManager
* manager_
;
38 JavaScriptDialogManager::DialogClosedCallback callback_
;
40 #if defined(OS_MACOSX)
41 ShellJavaScriptDialogHelper
* helper_
; // owned
43 JavaScriptMessageType message_type_
;
45 base::string16 message_text_
;
46 base::string16 default_prompt_text_
;
47 static INT_PTR CALLBACK
DialogProc(HWND dialog
, UINT message
, WPARAM wparam
,
51 DISALLOW_COPY_AND_ASSIGN(ShellJavaScriptDialog
);
54 } // namespace content
56 #endif // CONTENT_SHELL_BROWSER_SHELL_JAVASCRIPT_DIALOG_H_