Commit dcc6ca77 authored by Yaron Friedman's avatar Yaron Friedman Committed by Commit Bot

Remove unused OmniboxLivenessListener.

While scanning code for a feature I noticed this was unused. Looks like
it was for testing that was removed:

https: //chrome-internal-review.googlesource.com/352825
Change-Id: I1b216fbd33ded9f76a7dc5a729537ad4a5586fea
Reviewed-on: https://chromium-review.googlesource.com/851195
Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarTed Choc (back but slow, ping me) <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527150}
parent a043c4b6
......@@ -263,27 +263,6 @@ public class LocationBarLayout extends FrameLayout
}
}
/**
* Listener for receiving the messages related with interacting with the omnibox during startup.
*/
public interface OmniboxLivenessListener {
/**
* Called after the first draw when the omnibox can receive touch events.
*/
void onOmniboxInteractive();
/**
* Called when the native libraries are loaded and listeners with native components
* have been initialized.
*/
void onOmniboxFullyFunctional();
/**
* Called when the omnibox is focused.
*/
void onOmniboxFocused();
}
/**
* Class to handle input from a hardware keyboard when the focus is on the URL bar. In
* particular, handle navigating the suggestions list from the keyboard.
......@@ -867,7 +846,6 @@ public class LocationBarLayout extends FrameLayout
}
mDeferredNativeRunnables.clear();
mUrlBar.onNativeLibraryReady();
updateVisualsForState();
}
......
......@@ -36,11 +36,9 @@ import android.widget.TextView;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.Log;
import org.chromium.base.SysUtils;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.WindowDelegate;
import org.chromium.chrome.browser.metrics.StartupMetrics;
import org.chromium.chrome.browser.omnibox.LocationBarLayout.OmniboxLivenessListener;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.util.UrlUtilities;
import org.chromium.content.browser.ContentViewCore;
......@@ -114,8 +112,6 @@ public class UrlBar extends AutocompleteEditText {
private Boolean mUseDarkColors;
private OmniboxLivenessListener mOmniboxLivenessListener;
private long mFirstFocusTimeMs;
// Used as a hint to indicate the text may contain an ellipsize span. This will be true if an
......@@ -308,7 +304,6 @@ public class UrlBar extends AutocompleteEditText {
if (focused && mFirstFocusTimeMs == 0) {
mFirstFocusTimeMs = SystemClock.elapsedRealtime();
if (mOmniboxLivenessListener != null) mOmniboxLivenessListener.onOmniboxFocused();
}
if (focused) {
......@@ -453,11 +448,6 @@ public class UrlBar extends AutocompleteEditText {
// touches etc. activate it.
setFocusable(mAllowFocus);
setFocusableInTouchMode(mAllowFocus);
// The URL bar will now react correctly to a focus change event
if (mOmniboxLivenessListener != null) {
mOmniboxLivenessListener.onOmniboxInteractive();
}
}
// Notify listeners if the URL's direction has changed.
......@@ -518,20 +508,6 @@ public class UrlBar extends AutocompleteEditText {
mUrlBarDelegate = delegate;
}
/**
* Set {@link OmniboxLivenessListener} to be used for receiving interaction related messages
* during startup.
* @param listener The listener to use for sending the messages.
*/
@VisibleForTesting
public void setOmniboxLivenessListener(OmniboxLivenessListener listener) {
mOmniboxLivenessListener = listener;
}
public void onNativeLibraryReady() {
if (mOmniboxLivenessListener != null) mOmniboxLivenessListener.onOmniboxFullyFunctional();
}
@Override
public boolean onTextContextMenuItem(int id) {
if (id == android.R.id.paste) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment