OLD | NEW |
1 // Copyright (c) 2011 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 "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" | 5 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" |
6 | 6 |
7 #include "chrome/browser/browser_shutdown.h" | 7 #include "chrome/browser/browser_shutdown.h" |
8 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 8 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
9 #include "ui/base/text/text_elider.h" | 9 #include "ui/base/text/text_elider.h" |
10 | 10 |
11 namespace { | 11 namespace { |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 override_prompt_text_ = override_prompt_text; | 131 override_prompt_text_ = override_prompt_text; |
132 use_override_prompt_text_ = true; | 132 use_override_prompt_text_ = true; |
133 } | 133 } |
134 | 134 |
135 void JavaScriptAppModalDialog::NotifyDelegate(bool success, | 135 void JavaScriptAppModalDialog::NotifyDelegate(bool success, |
136 const string16& user_input, | 136 const string16& user_input, |
137 bool suppress_js_messages) { | 137 bool suppress_js_messages) { |
138 if (!valid_) | 138 if (!valid_) |
139 return; | 139 return; |
140 | 140 |
141 delegate()->OnDialogClosed(reply_msg_, success, user_input); | 141 // TODO(creis): Have to pass the actual RVH. |
| 142 delegate()->OnDialogClosed(NULL, reply_msg_, success, user_input); |
142 | 143 |
143 extra_data_->last_javascript_message_dismissal_ = base::TimeTicks::Now(); | 144 extra_data_->last_javascript_message_dismissal_ = base::TimeTicks::Now(); |
144 extra_data_->suppress_javascript_messages_ = suppress_js_messages; | 145 extra_data_->suppress_javascript_messages_ = suppress_js_messages; |
145 | 146 |
146 // On Views, we can end up coming through this code path twice :(. | 147 // On Views, we can end up coming through this code path twice :(. |
147 // See crbug.com/63732. | 148 // See crbug.com/63732. |
148 valid_ = false; | 149 valid_ = false; |
149 } | 150 } |
OLD | NEW |