| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/app_modal/javascript_dialog_manager.h" | 5 #include "components/app_modal/javascript_dialog_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/app_modal/app_modal_dialog.h" | 11 #include "components/app_modal/app_modal_dialog.h" |
| 11 #include "components/app_modal/app_modal_dialog_queue.h" | 12 #include "components/app_modal/app_modal_dialog_queue.h" |
| 12 #include "components/app_modal/javascript_app_modal_dialog.h" | 13 #include "components/app_modal/javascript_app_modal_dialog.h" |
| 13 #include "components/app_modal/javascript_dialog_extensions_client.h" | 14 #include "components/app_modal/javascript_dialog_extensions_client.h" |
| 14 #include "components/app_modal/javascript_native_dialog_factory.h" | 15 #include "components/app_modal/javascript_native_dialog_factory.h" |
| 15 #include "components/app_modal/native_app_modal_dialog.h" | 16 #include "components/app_modal/native_app_modal_dialog.h" |
| 16 #include "components/url_formatter/elide_url.h" | 17 #include "components/url_formatter/elide_url.h" |
| 17 #include "content/public/browser/web_contents.h" | 18 #include "content/public/browser/web_contents.h" |
| 18 #include "content/public/common/javascript_message_type.h" | 19 #include "content/public/common/javascript_message_type.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 const base::string16& user_input) { | 244 const base::string16& user_input) { |
| 244 // If an extension opened this dialog then the extension may shut down its | 245 // If an extension opened this dialog then the extension may shut down its |
| 245 // lazy background page after the dialog closes. (Dialogs are closed before | 246 // lazy background page after the dialog closes. (Dialogs are closed before |
| 246 // their WebContents is destroyed so |web_contents| is still valid here.) | 247 // their WebContents is destroyed so |web_contents| is still valid here.) |
| 247 extensions_client_->OnDialogClosed(web_contents); | 248 extensions_client_->OnDialogClosed(web_contents); |
| 248 | 249 |
| 249 callback.Run(success, user_input); | 250 callback.Run(success, user_input); |
| 250 } | 251 } |
| 251 | 252 |
| 252 } // namespace app_modal | 253 } // namespace app_modal |
| OLD | NEW |