| 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 "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" | 5 #include "chrome/browser/ui/android/javascript_app_modal_dialog_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "chrome/browser/ui/app_modal/chrome_javascript_native_dialog_factory.h" | 9 #include "chrome/browser/ui/app_modal/chrome_javascript_native_dialog_factory.h" |
| 10 #include "components/app_modal/app_modal_dialog_queue.h" | 10 #include "components/app_modal/app_modal_dialog_queue.h" |
| 11 #include "components/app_modal/javascript_app_modal_dialog.h" | 11 #include "components/app_modal/javascript_app_modal_dialog.h" |
| 12 #include "components/app_modal/javascript_dialog_manager.h" | 12 #include "components/app_modal/javascript_dialog_manager.h" |
| 13 #include "components/app_modal/javascript_native_dialog_factory.h" | 13 #include "components/app_modal/javascript_native_dialog_factory.h" |
| 14 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 15 #include "content/public/browser/web_contents.h" | 15 #include "content/public/browser/web_contents.h" |
| 16 #include "content/public/browser/web_contents_delegate.h" | 16 #include "content/public/browser/web_contents_delegate.h" |
| 17 #include "content/public/common/javascript_message_type.h" | 17 #include "content/public/common/javascript_message_type.h" |
| 18 #include "jni/JavascriptAppModalDialog_jni.h" | 18 #include "jni/JavascriptAppModalDialog_jni.h" |
| 19 #include "ui/base/android/window_android.h" | 19 #include "ui/android/window_android.h" |
| 20 | 20 |
| 21 using base::android::AttachCurrentThread; | 21 using base::android::AttachCurrentThread; |
| 22 using base::android::ConvertUTF16ToJavaString; | 22 using base::android::ConvertUTF16ToJavaString; |
| 23 using base::android::ScopedJavaGlobalRef; | 23 using base::android::ScopedJavaGlobalRef; |
| 24 using base::android::ScopedJavaLocalRef; | 24 using base::android::ScopedJavaLocalRef; |
| 25 | 25 |
| 26 JavascriptAppModalDialogAndroid::JavascriptAppModalDialogAndroid( | 26 JavascriptAppModalDialogAndroid::JavascriptAppModalDialogAndroid( |
| 27 JNIEnv* env, | 27 JNIEnv* env, |
| 28 app_modal::JavaScriptAppModalDialog* dialog, | 28 app_modal::JavaScriptAppModalDialog* dialog, |
| 29 gfx::NativeWindow parent) | 29 gfx::NativeWindow parent) |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 } // namespace | 187 } // namespace |
| 188 | 188 |
| 189 void InstallChromeJavaScriptNativeDialogFactory() { | 189 void InstallChromeJavaScriptNativeDialogFactory() { |
| 190 app_modal::JavaScriptDialogManager::GetInstance()-> | 190 app_modal::JavaScriptDialogManager::GetInstance()-> |
| 191 SetNativeDialogFactory( | 191 SetNativeDialogFactory( |
| 192 make_scoped_ptr(new ChromeJavaScriptNativeDialogAndroidFactory)); | 192 make_scoped_ptr(new ChromeJavaScriptNativeDialogAndroidFactory)); |
| 193 } | 193 } |
| 194 | 194 |
| OLD | NEW |