OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/shell/shell_javascript_dialog.h" | 5 #include "content/shell/shell_javascript_dialog.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #import "base/memory/scoped_nsobject.h" | 9 #import "base/memory/scoped_nsobject.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 [NSApp endSheet:[alert_ window]]; | 80 [NSApp endSheet:[alert_ window]]; |
81 alert_.reset(); | 81 alert_.reset(); |
82 } | 82 } |
83 | 83 |
84 @end | 84 @end |
85 | 85 |
86 namespace content { | 86 namespace content { |
87 | 87 |
88 ShellJavaScriptDialog::ShellJavaScriptDialog( | 88 ShellJavaScriptDialog::ShellJavaScriptDialog( |
89 ShellJavaScriptDialogCreator* creator, | 89 ShellJavaScriptDialogCreator* creator, |
| 90 gfx::NativeWindow parent_window, |
90 JavaScriptMessageType message_type, | 91 JavaScriptMessageType message_type, |
91 const string16& message_text, | 92 const string16& message_text, |
92 const string16& default_prompt_text, | 93 const string16& default_prompt_text, |
93 const JavaScriptDialogCreator::DialogClosedCallback& callback) | 94 const JavaScriptDialogCreator::DialogClosedCallback& callback) |
94 : creator_(creator), | 95 : creator_(creator), |
95 callback_(callback) { | 96 callback_(callback) { |
96 bool text_field = message_type == JAVASCRIPT_MESSAGE_TYPE_PROMPT; | 97 bool text_field = message_type == JAVASCRIPT_MESSAGE_TYPE_PROMPT; |
97 bool one_button = message_type == JAVASCRIPT_MESSAGE_TYPE_ALERT; | 98 bool one_button = message_type == JAVASCRIPT_MESSAGE_TYPE_ALERT; |
98 | 99 |
99 helper_ = | 100 helper_ = |
(...skipping 28 matching lines...) Expand all Loading... |
128 | 129 |
129 ShellJavaScriptDialog::~ShellJavaScriptDialog() { | 130 ShellJavaScriptDialog::~ShellJavaScriptDialog() { |
130 [helper_ release]; | 131 [helper_ release]; |
131 } | 132 } |
132 | 133 |
133 void ShellJavaScriptDialog::Cancel() { | 134 void ShellJavaScriptDialog::Cancel() { |
134 [helper_ cancel]; | 135 [helper_ cancel]; |
135 } | 136 } |
136 | 137 |
137 } // namespace content | 138 } // namespace content |
OLD | NEW |