| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_shutdown.h" | 9 #include "chrome/browser/browser_shutdown.h" |
| 10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
| 11 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 11 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
| 12 #include "chrome/common/notification_service.h" | |
| 13 #include "chrome/common/notification_type.h" | |
| 14 #include "content/browser/tab_contents/tab_contents.h" | 12 #include "content/browser/tab_contents/tab_contents.h" |
| 13 #include "content/common/notification_service.h" |
| 14 #include "content/common/notification_type.h" |
| 15 #include "ui/base/text/text_elider.h" | 15 #include "ui/base/text/text_elider.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // The maximum sizes of various texts passed to us from javascript. | 19 // The maximum sizes of various texts passed to us from javascript. |
| 20 const int kMessageTextMaxRows = 32; | 20 const int kMessageTextMaxRows = 32; |
| 21 const int kMessageTextMaxCols = 132; | 21 const int kMessageTextMaxCols = 132; |
| 22 const int kDefaultPromptTextSize = 2000; | 22 const int kDefaultPromptTextSize = 2000; |
| 23 | 23 |
| 24 } // namespace | 24 } // namespace |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return; | 135 return; |
| 136 | 136 |
| 137 delegate_->OnMessageBoxClosed(reply_msg_, success, prompt_text); | 137 delegate_->OnMessageBoxClosed(reply_msg_, success, prompt_text); |
| 138 if (suppress_js_messages) | 138 if (suppress_js_messages) |
| 139 delegate_->SetSuppressMessageBoxes(true); | 139 delegate_->SetSuppressMessageBoxes(true); |
| 140 | 140 |
| 141 // On Views, we can end up coming through this code path twice :(. | 141 // On Views, we can end up coming through this code path twice :(. |
| 142 // See crbug.com/63732. | 142 // See crbug.com/63732. |
| 143 skip_this_dialog_ = true; | 143 skip_this_dialog_ = true; |
| 144 } | 144 } |
| OLD | NEW |