This source file includes following definitions.
- CalledByNative
- getActiveWebContents
- initialize
- destroy
- getSearchTerms
- getQueryExtractionParam
- getCorpusChipText
- nativeInit
- nativeDestroy
- nativeGetSearchTerms
- nativeGetQueryExtractionParam
- nativeGetCorpusChipText
package org.chromium.chrome.browser.toolbar;
import org.chromium.base.CalledByNative;
import org.chromium.content_public.browser.WebContents;
public class ToolbarModel {
public interface ToolbarModelDelegate {
@CalledByNative("ToolbarModelDelegate")
WebContents getActiveWebContents();
}
private long mNativeToolbarModelAndroid;
public void initialize(ToolbarModelDelegate delegate) {
mNativeToolbarModelAndroid = nativeInit(delegate);
}
public void destroy() {
if (mNativeToolbarModelAndroid == 0) return;
nativeDestroy(mNativeToolbarModelAndroid);
mNativeToolbarModelAndroid = 0;
}
public String getSearchTerms() {
if (mNativeToolbarModelAndroid == 0) return null;
return nativeGetSearchTerms(mNativeToolbarModelAndroid);
}
public String getQueryExtractionParam() {
if (mNativeToolbarModelAndroid == 0) return null;
return nativeGetQueryExtractionParam(mNativeToolbarModelAndroid);
}
public String getCorpusChipText() {
if (mNativeToolbarModelAndroid == 0) return null;
return nativeGetCorpusChipText(mNativeToolbarModelAndroid);
}
private native long nativeInit(ToolbarModelDelegate delegate);
private native void nativeDestroy(long nativeToolbarModelAndroid);
private native String nativeGetSearchTerms(long nativeToolbarModelAndroid);
private native String nativeGetQueryExtractionParam(long nativeToolbarModelAndroid);
private native String nativeGetCorpusChipText(long nativeToolbarModelAndroid);
}