| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.infobar; | 5 package org.chromium.chrome.browser.infobar; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.text.Spannable; | 8 import android.text.Spannable; |
| 9 import android.text.SpannableString; | 9 import android.text.SpannableString; |
| 10 import android.text.SpannableStringBuilder; | 10 import android.text.SpannableStringBuilder; |
| 11 import android.text.TextUtils; | 11 import android.text.TextUtils; |
| 12 import android.text.style.ClickableSpan; | 12 import android.text.style.ClickableSpan; |
| 13 import android.view.View; | 13 import android.view.View; |
| 14 import android.widget.CheckBox; | 14 import android.widget.CheckBox; |
| 15 | 15 |
| 16 import org.chromium.base.CalledByNative; | 16 import org.chromium.base.annotations.CalledByNative; |
| 17 import org.chromium.chrome.R; | 17 import org.chromium.chrome.R; |
| 18 import org.chromium.ui.base.DeviceFormFactor; | 18 import org.chromium.ui.base.DeviceFormFactor; |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * Java version of the translate infobar | 21 * Java version of the translate infobar |
| 22 */ | 22 */ |
| 23 public class TranslateInfoBar extends InfoBar implements SubPanelListener { | 23 public class TranslateInfoBar extends InfoBar implements SubPanelListener { |
| 24 // Needs to be kept in sync with the Type enum in translate_infobar_delegate
.h. | 24 // Needs to be kept in sync with the Type enum in translate_infobar_delegate
.h. |
| 25 public static final int BEFORE_TRANSLATE_INFOBAR = 0; | 25 public static final int BEFORE_TRANSLATE_INFOBAR = 0; |
| 26 public static final int TRANSLATING_INFOBAR = 1; | 26 public static final int TRANSLATING_INFOBAR = 1; |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 updateViewForCurrentState(createView()); | 348 updateViewForCurrentState(createView()); |
| 349 } else { | 349 } else { |
| 350 assert false : "Trying to change the InfoBar to a type that is inval
id."; | 350 assert false : "Trying to change the InfoBar to a type that is inval
id."; |
| 351 } | 351 } |
| 352 } | 352 } |
| 353 | 353 |
| 354 private native void nativeApplyTranslateOptions(long nativeTranslateInfoBar, | 354 private native void nativeApplyTranslateOptions(long nativeTranslateInfoBar, |
| 355 int sourceLanguageIndex, int targetLanguageIndex, boolean alwaysTran
slate, | 355 int sourceLanguageIndex, int targetLanguageIndex, boolean alwaysTran
slate, |
| 356 boolean neverTranslateLanguage, boolean neverTranslateSite); | 356 boolean neverTranslateLanguage, boolean neverTranslateSite); |
| 357 } | 357 } |
| OLD | NEW |