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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java

Issue 1233913006: Cleanup toolbar interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java
index be93642706712562266bf4930634db8f501385fe..b5ba3c0c1cdbdfc1b276a382eb4559e2ae1e7856 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java
@@ -4,64 +4,16 @@
package org.chromium.chrome.browser.toolbar;
-import android.graphics.Bitmap;
import android.graphics.Rect;
import android.view.View;
-import android.view.View.OnClickListener;
-
-import org.chromium.chrome.browser.appmenu.AppMenuButtonHelper;
-import org.chromium.chrome.browser.compositor.Invalidator;
-import org.chromium.chrome.browser.omnibox.LocationBar;
/**
- * An interface for other classes to interact with Toolbar Layout. Other than for testing purposes
+ * An interface for outside packages to interact with ToolbarLayout. Other than for testing purposes
* this interface should be used rather than {@link ToolbarLayout} and extending classes.
*/
public interface Toolbar {
/**
- * Initialize the external dependencies required for view interaction.
- * @param toolbarDataProvider The provider for toolbar data.
- * @param tabController The controller that handles interactions with the tab.
- * @param appMenuButtonHelper The helper for managing menu button interactions.
- */
- void initialize(ToolbarDataProvider toolbarDataProvider,
- ToolbarTabController tabController, AppMenuButtonHelper appMenuButtonHelper);
-
- /**
- * Sets the {@link Invalidator} that will be called when the toolbar attempts to invalidate the
- * drawing surface. This will give the object that registers as the host for the
- * {@link Invalidator} a chance to defer the actual invalidate to sync drawing.
- * @param invalidator An {@link Invalidator} instance.
- */
- void setPaintInvalidator(Invalidator invalidator);
-
- /**
- * Adds a custom action button to the {@link Toolbar} if it is supported.
- * @param buttonSource The {@link Bitmap} resource to use as the source for the button.
- * @param listener The {@link OnClickListener} to use for clicks to the button.
- */
- void addCustomActionButton(Bitmap buttonSource, OnClickListener listener);
-
- /**
- * Sets the OnClickListener that will be notified when the TabSwitcher button is pressed.
- * @param listener The callback that will be notified when the TabSwitcher button is pressed.
- */
- void setOnTabSwitcherClickHandler(OnClickListener listener);
-
- /**
- * Sets the OnClickListener that will be notified when the New Tab button is pressed.
- * @param listener The callback that will be notified when the New Tab button is pressed.
- */
- void setOnNewTabClickHandler(OnClickListener listener);
-
- /**
- * Sets the OnClickListener that will be notified when the bookmark button is pressed.
- * @param listener The callback that will be notified when the bookmark button is pressed.
- */
- void setBookmarkClickHandler(OnClickListener listener);
-
- /**
* Calculates the {@link Rect} that represents the content area of the location bar. This
* rect will be relative to the toolbar.
* @param outRect The Rect that represents the content area of the location bar.
@@ -74,22 +26,6 @@ public interface Toolbar {
boolean shouldIgnoreSwipeGesture();
/**
- * Returns the elapsed realtime in ms of the time at which first draw for the toolbar occurred.
- */
- long getFirstDrawTime();
-
- /**
- * Finish any toolbar animations.
- */
- void finishAnimations();
-
- /**
- * @return {@link LocationBar} object this {@link Toolbar} contains.
- */
- LocationBar getLocationBar();
-
- // TODO(yusufo): Move the below calls to a separate interface about texture capture.
- /**
* Calculate the relative position wrt to the given container view.
* @param containerView The container view to be used.
* @param position The position array to be used for returning the calculated position.
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698