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 "components/app_modal_dialogs/javascript_dialog_manager_impl.h" | 5 #include "components/app_modal/javascript_dialog_manager_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
11 #include "components/app_modal_dialogs/app_modal_dialog.h" | 11 #include "components/app_modal/app_modal_dialog.h" |
12 #include "components/app_modal_dialogs/app_modal_dialog_queue.h" | 12 #include "components/app_modal/app_modal_dialog_queue.h" |
13 #include "components/app_modal_dialogs/javascript_dialog_extensions_client.h" | 13 #include "components/app_modal/javascript_dialog_extensions_client.h" |
14 #include "components/app_modal_dialogs/javascript_native_dialog_factory.h" | 14 #include "components/app_modal/javascript_native_dialog_factory.h" |
15 #include "components/app_modal_dialogs/native_app_modal_dialog.h" | 15 #include "components/app_modal/native_app_modal_dialog.h" |
16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
17 #include "content/public/common/content_client.h" | 17 #include "content/public/common/content_client.h" |
18 #include "content/public/common/javascript_message_type.h" | 18 #include "content/public/common/javascript_message_type.h" |
19 #include "grit/components_strings.h" | 19 #include "grit/components_strings.h" |
20 #include "net/base/net_util.h" | 20 #include "net/base/net_util.h" |
21 #include "ui/base/l10n/l10n_util.h" | 21 #include "ui/base/l10n/l10n_util.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class DefaultExtensionsClient : public JavaScriptDialogExtensionsClient { | 25 class DefaultExtensionsClient : public JavaScriptDialogExtensionsClient { |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 DialogClosedCallback callback, | 224 DialogClosedCallback callback, |
225 bool success, | 225 bool success, |
226 const base::string16& user_input) { | 226 const base::string16& user_input) { |
227 // If an extension opened this dialog then the extension may shut down its | 227 // If an extension opened this dialog then the extension may shut down its |
228 // lazy background page after the dialog closes. (Dialogs are closed before | 228 // lazy background page after the dialog closes. (Dialogs are closed before |
229 // their WebContents is destroyed so |web_contents| is still valid here.) | 229 // their WebContents is destroyed so |web_contents| is still valid here.) |
230 extensions_client_->OnDialogClosed(web_contents); | 230 extensions_client_->OnDialogClosed(web_contents); |
231 | 231 |
232 callback.Run(success, user_input); | 232 callback.Run(success, user_input); |
233 } | 233 } |
OLD | NEW |