| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.app.AlertDialog; | 7 import android.app.AlertDialog; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.content.DialogInterface; | 9 import android.content.DialogInterface; |
| 10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
| 11 import android.util.Log; | 11 import android.util.Log; |
| 12 import android.view.LayoutInflater; | 12 import android.view.LayoutInflater; |
| 13 import android.view.View; | 13 import android.view.View; |
| 14 import android.view.ViewGroup; | 14 import android.view.ViewGroup; |
| 15 import android.widget.CheckBox; | 15 import android.widget.CheckBox; |
| 16 import android.widget.EditText; | 16 import android.widget.EditText; |
| 17 import android.widget.TextView; | 17 import android.widget.TextView; |
| 18 | 18 |
| 19 import com.google.common.annotations.VisibleForTesting; | |
| 20 | |
| 21 import org.chromium.base.CalledByNative; | 19 import org.chromium.base.CalledByNative; |
| 20 import org.chromium.base.VisibleForTesting; |
| 22 import org.chromium.chrome.R; | 21 import org.chromium.chrome.R; |
| 23 import org.chromium.ui.base.WindowAndroid; | 22 import org.chromium.ui.base.WindowAndroid; |
| 24 | 23 |
| 25 public class JavascriptAppModalDialog implements DialogInterface.OnClickListener
{ | 24 public class JavascriptAppModalDialog implements DialogInterface.OnClickListener
{ |
| 26 private static final String TAG = "JavascriptAppModalDialog"; | 25 private static final String TAG = "JavascriptAppModalDialog"; |
| 27 | 26 |
| 28 private final String mTitle; | 27 private final String mTitle; |
| 29 private final String mMessage; | 28 private final String mMessage; |
| 30 private final boolean mShouldShowSuppressCheckBox; | 29 private final boolean mShouldShowSuppressCheckBox; |
| 31 private long mNativeDialogPointer; | 30 private long mNativeDialogPointer; |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 285 } |
| 287 | 286 |
| 288 private native void nativeDidAcceptAppModalDialog(long nativeJavascriptAppMo
dalDialogAndroid, | 287 private native void nativeDidAcceptAppModalDialog(long nativeJavascriptAppMo
dalDialogAndroid, |
| 289 String prompt, boolean suppress); | 288 String prompt, boolean suppress); |
| 290 | 289 |
| 291 private native void nativeDidCancelAppModalDialog(long nativeJavascriptAppMo
dalDialogAndroid, | 290 private native void nativeDidCancelAppModalDialog(long nativeJavascriptAppMo
dalDialogAndroid, |
| 292 boolean suppress); | 291 boolean suppress); |
| 293 | 292 |
| 294 private static native JavascriptAppModalDialog nativeGetCurrentModalDialog()
; | 293 private static native JavascriptAppModalDialog nativeGetCurrentModalDialog()
; |
| 295 } | 294 } |
| OLD | NEW |