This source file includes following definitions.
- JNINamespace
- getAutofilledValue
- getProfileFullName
- didFillField
- setLogger
- didFillField
package org.chromium.chrome.browser.autofill;
import org.chromium.base.CalledByNative;
import org.chromium.base.JNINamespace;
@JNINamespace("autofill")
public class AutofillLogger {
public static class LogEntry {
private final String mAutofilledValue;
private final String mProfileFullName;
private LogEntry(String autofilledValue, String profileFullName) {
mAutofilledValue = autofilledValue;
mProfileFullName = profileFullName;
}
public String getAutofilledValue() {
return mAutofilledValue;
}
public String getProfileFullName() {
return mProfileFullName;
}
}
public interface Logger {
public void didFillField(LogEntry logItem);
}
private static Logger sLogger = null;
public static void setLogger(Logger logger) {
sLogger = logger;
}
@CalledByNative
private static void didFillField(String autofilledValue, String profileFullName) {
if (sLogger == null) return;
sLogger.didFillField(new LogEntry(autofilledValue, profileFullName));
}
}