| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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) |
| 30 : dialog_(dialog), | 30 : dialog_(dialog), |
| 31 parent_jobject_weak_ref_(env, parent->GetJavaObject().obj()) { | 31 parent_jobject_weak_ref_( |
| 32 env, |
| 33 ((ui::WindowAndroid*)parent)->GetJavaObject().obj()) { |
| 34 assert(false); |
| 32 } | 35 } |
| 33 | 36 |
| 34 int JavascriptAppModalDialogAndroid::GetAppModalDialogButtons() const { | 37 int JavascriptAppModalDialogAndroid::GetAppModalDialogButtons() const { |
| 35 NOTIMPLEMENTED(); | 38 NOTIMPLEMENTED(); |
| 36 return 0; | 39 return 0; |
| 37 } | 40 } |
| 38 | 41 |
| 39 void JavascriptAppModalDialogAndroid::ShowAppModalDialog() { | 42 void JavascriptAppModalDialogAndroid::ShowAppModalDialog() { |
| 40 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 43 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 41 | 44 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 }; | 188 }; |
| 186 | 189 |
| 187 } // namespace | 190 } // namespace |
| 188 | 191 |
| 189 void InstallChromeJavaScriptNativeDialogFactory() { | 192 void InstallChromeJavaScriptNativeDialogFactory() { |
| 190 app_modal::JavaScriptDialogManager::GetInstance()-> | 193 app_modal::JavaScriptDialogManager::GetInstance()-> |
| 191 SetNativeDialogFactory( | 194 SetNativeDialogFactory( |
| 192 make_scoped_ptr(new ChromeJavaScriptNativeDialogAndroidFactory)); | 195 make_scoped_ptr(new ChromeJavaScriptNativeDialogAndroidFactory)); |
| 193 } | 196 } |
| 194 | 197 |
| OLD | NEW |