Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateLanguagePanel.java

Issue 2873103003: Implements logging in the new compact translate UI. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.view.View; 8 import android.view.View;
9 import android.widget.AdapterView; 9 import android.widget.AdapterView;
10 import android.widget.Spinner; 10 import android.widget.Spinner;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 public void onNothingSelected(AdapterView<?> adapter) { 168 public void onNothingSelected(AdapterView<?> adapter) {
169 } 169 }
170 170
171 /** 171 /**
172 * Determines what languages will be shown in the Spinner. 172 * Determines what languages will be shown in the Spinner.
173 * @param avoidCode ISO code of the language to avoid displaying. 173 * @param avoidCode ISO code of the language to avoid displaying.
174 * Use "" to display all languages. 174 * Use "" to display all languages.
175 */ 175 */
176 private ArrayList<SpinnerLanguageElement> createSpinnerLanguages(String avoi dCode) { 176 private ArrayList<SpinnerLanguageElement> createSpinnerLanguages(String avoi dCode) {
177 ArrayList<SpinnerLanguageElement> result = new ArrayList<SpinnerLanguage Element>(); 177 ArrayList<SpinnerLanguageElement> result = new ArrayList<SpinnerLanguage Element>();
178 for (TranslateOptions.TranslateLanguagePair language : mSessionOptions.a llLanguages()) { 178 for (TranslateOptions.TranslateLanguageData language : mSessionOptions.a llLanguages()) {
179 if (!language.mLanguageCode.equals(avoidCode)) { 179 if (!language.mLanguageCode.equals(avoidCode)) {
180 result.add(new SpinnerLanguageElement( 180 result.add(new SpinnerLanguageElement(
181 language.mLanguageRepresentation, language.mLanguageCode )); 181 language.mLanguageRepresentation, language.mLanguageCode ));
182 } 182 }
183 } 183 }
184 return result; 184 return result;
185 } 185 }
186 186
187 /** 187 /**
188 * The element that goes inside the spinner. 188 * The element that goes inside the spinner.
(...skipping 14 matching lines...) Expand all
203 /** 203 /**
204 * This is the text displayed in the spinner element so make sure no deb ug information 204 * This is the text displayed in the spinner element so make sure no deb ug information
205 * is added. 205 * is added.
206 */ 206 */
207 @Override 207 @Override
208 public String toString() { 208 public String toString() {
209 return mLanguageName; 209 return mLanguageName;
210 } 210 }
211 } 211 }
212 } 212 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698