Commit 7a609035 authored by ianwen's avatar ianwen Committed by Commit bot

Refactor the view hierarchy of snackbars and infobars

To make snackbars and infobars animate, snackbars were moved to be child
of CompositorViewHolder, and TabContentViewParent was introduced to handle the
animation. One side effect of such design is that many Android views in
CompositorViewHolder now rely on a behavior to receive touch event.

This CL removes such behavior, as it is not the standard Android routine and it
makes our view hierarchy no longer extensible. Instead, a parent of
CompositorViewHolder is introduced to harbor all Android views that may display
on top of content.

This CL also moves infobars to be a sibling of snackbar, and their parent will
be a new FrameLayout called bottom_container.

BUG=640710

Review-Url: https://codereview.chromium.org/2623493003
Cr-Commit-Position: refs/heads/master@{#442733}
parent 8a4fdfe3
......@@ -10,22 +10,32 @@
android:layout_height="match_parent"
android:orientation="vertical">
<org.chromium.chrome.browser.compositor.CompositorViewHolder
android:id="@+id/compositor_view_holder"
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
<org.chromium.chrome.browser.compositor.CompositorViewHolder
android:id="@+id/compositor_view_holder"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ViewStub
android:id="@+id/omnibox_results_container_stub"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/tab_strip_height"
android:inflatedId="@+id/omnibox_results_container"
android:layout="@layout/omnibox_results_container"
app:layout_behavior="org.chromium.chrome.browser.compositor.CompositorViewHolderBehavior" />
android:layout="@layout/omnibox_results_container" />
<FrameLayout
android:id="@+id/bottom_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start|bottom" />
</org.chromium.chrome.browser.compositor.CompositorViewHolder>
</android.support.design.widget.CoordinatorLayout>
<HorizontalScrollView
android:id="@+id/keyboard_accessory"
......
......@@ -18,7 +18,6 @@ import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.widget.FrameLayout;
import org.chromium.chrome.browser.tab.TabContentViewParent;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content_public.browser.GestureStateListener;
......@@ -137,9 +136,10 @@ public abstract class SwipableOverlayView extends FrameLayout {
return mContentViewCore;
}
protected void addToParentView(TabContentViewParent parentView) {
protected void addToParentView(ViewGroup parentView) {
if (parentView == null) return;
if (getParent() == null) {
parentView.addInfobarView(this, createLayoutParams());
parentView.addView(this, createLayoutParams());
// Listen for the layout to know when to animate the View coming onto the screen.
addOnLayoutChangeListener(mLayoutChangeListener);
......
......@@ -12,7 +12,6 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.CoordinatorLayout;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.accessibility.AccessibilityEventCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
......@@ -32,6 +31,7 @@ import org.chromium.base.TraceEvent;
import org.chromium.base.annotations.SuppressFBWarnings;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.compositor.Invalidator.Client;
import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel;
import org.chromium.chrome.browser.compositor.layouts.LayoutManager;
import org.chromium.chrome.browser.compositor.layouts.LayoutManagerHost;
import org.chromium.chrome.browser.compositor.layouts.LayoutRenderHost;
......@@ -45,7 +45,6 @@ import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager;
import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager.FullscreenListener;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabContentViewParent;
import org.chromium.chrome.browser.tab.TabObserver;
import org.chromium.chrome.browser.tabmodel.EmptyTabModelSelectorObserver;
import org.chromium.chrome.browser.tabmodel.TabCreatorManager;
......@@ -73,7 +72,7 @@ import java.util.List;
* This class also holds the {@link LayoutManager} responsible to describe the items to be
* drawn by the UI compositor on the native side.
*/
public class CompositorViewHolder extends CoordinatorLayout
public class CompositorViewHolder extends FrameLayout
implements ContentOffsetProvider, LayoutManagerHost, LayoutRenderHost, Invalidator.Host,
FullscreenListener {
......@@ -112,7 +111,7 @@ public class CompositorViewHolder extends CoordinatorLayout
private Tab mTabVisible;
/** The currently attached View. */
private TabContentViewParent mView;
private View mView;
private TabObserver mTabObserver;
private boolean mEnableCompositorTabStrip;
......@@ -354,8 +353,7 @@ public class CompositorViewHolder extends CoordinatorLayout
@Override
public boolean onInterceptTouchEvent(MotionEvent e) {
boolean consumedBySuper = super.onInterceptTouchEvent(e);
if (consumedBySuper) return true;
super.onInterceptTouchEvent(e);
if (mLayoutManager == null) return false;
......@@ -373,8 +371,7 @@ public class CompositorViewHolder extends CoordinatorLayout
@Override
public boolean onTouchEvent(MotionEvent e) {
boolean consumedBySuper = super.onTouchEvent(e);
if (consumedBySuper) return true;
super.onTouchEvent(e);
if (mFullscreenManager != null) mFullscreenManager.onMotionEvent(e);
if (mFullscreenTouchEvent) return true;
......@@ -839,20 +836,9 @@ public class CompositorViewHolder extends CoordinatorLayout
}
}
CoordinatorLayout.LayoutParams layoutParams;
if (mView.getLayoutParams() instanceof CoordinatorLayout.LayoutParams) {
layoutParams = (CoordinatorLayout.LayoutParams) mView.getLayoutParams();
} else {
layoutParams = new CoordinatorLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
}
layoutParams.setBehavior(mView.getBehavior());
// CompositorView has index of 0; TabContentViewParent has index of 1; omnibox
// result container (the scrim) has index of 2, Snackbar (if any) has index of 3.
// Setting index here explicitly to avoid TabContentViewParent hiding the scrim.
// TODO(ianwen): Use more advanced technologies to ensure z-order of the children of
// this class, instead of hard-coding.
addView(mView, 1, layoutParams);
// CompositorView always has index of 0.
addView(mView, 1, new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT));
setFocusable(false);
setFocusableInTouchMode(false);
......@@ -894,7 +880,7 @@ public class CompositorViewHolder extends CoordinatorLayout
private void setTab(Tab tab) {
if (tab != null) tab.loadIfNeeded();
TabContentViewParent newView = tab != null ? tab.getView() : null;
View newView = tab != null ? tab.getView() : null;
if (mView == newView) return;
// TODO(dtrainor): Look into changing this only if the views differ, but still parse the
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.compositor;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.CoordinatorLayout.Behavior;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
/**
* Default {@link Behavior} for widgets that are children of {@link CompositorViewHolder} and want
* to handle touch events.
*/
public class CompositorViewHolderBehavior extends Behavior<View> {
private boolean mShouldIntercept;
/**
* Constructs the object programmatically.
*/
public CompositorViewHolderBehavior() {
super();
}
/**
* Constructs the object during inflation.
*/
public CompositorViewHolderBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onInterceptTouchEvent(CoordinatorLayout parent, View child, MotionEvent ev) {
mShouldIntercept = child.getVisibility() == View.VISIBLE && isTouchInBound(ev, child);
return mShouldIntercept;
}
@Override
public boolean onTouchEvent(CoordinatorLayout parent, View child, MotionEvent ev) {
// If an ACTION_MOVE is dispatched to a ListView or a ScrollView and the ViewGroup
// intercepts it, the framework will generate an ACTION_CANCEL to the ViewGroup's children.
// This class, however, will steal this cancel event and send to the ViewGroup again,
// causing scroll to fail. Thus we should specifically not catch ACTION_CANCEL in behavior.
// In theory, stopping ACTION_CANCEL will cause problem when CompositorViewHolder scrolls.
// Yet currently CompositorViewHolder does not scroll.
if (!mShouldIntercept || ev.getActionMasked() == MotionEvent.ACTION_CANCEL) return false;
ev.offsetLocation(-child.getX(), -child.getY());
child.dispatchTouchEvent(ev);
return true;
}
/**
* @return Whether the {@link MotionEvent} happens within the bound of the given {@link View}.
*/
private static boolean isTouchInBound(MotionEvent ev, View view) {
return ev.getX() >= view.getX() && ev.getX() - view.getX() <= view.getWidth()
&& ev.getY() >= view.getY() && ev.getY() - view.getY() <= view.getHeight();
}
}
......@@ -342,6 +342,12 @@ public class CustomTabActivity extends ChromeActivity {
ApiCompatibilityUtils.setStatusBarColor(getWindow(),
ColorUtils.getDarkenedColorForStatusBar(toolbarColor));
}
// Properly attach tab's infobar to the view hierarchy, as the main tab might have been
// initialized prior to inflation.
if (mMainTab != null) {
ViewGroup bottomContainer = (ViewGroup) findViewById(R.id.bottom_container);
mMainTab.getInfoBarContainer().setParentView(bottomContainer);
}
// Setting task title and icon to be null will preserve the client app's title and icon.
ApiCompatibilityUtils.setTaskDescription(this, null, null, toolbarColor);
......
......@@ -7,6 +7,7 @@ package org.chromium.chrome.browser.infobar;
import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import org.chromium.base.ObserverList;
......@@ -15,7 +16,6 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.banners.SwipableOverlayView;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tab.TabContentViewParent;
import org.chromium.chrome.browser.tab.TabObserver;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content_public.browser.WebContents;
......@@ -93,6 +93,31 @@ public class InfoBarContainer extends SwipableOverlayView {
int statusCode) {
setIsObscuredByOtherView(false);
}
@Override
public void onContentChanged(Tab tab) {
if (mTabView == tab.getView()) return;
mTabView.removeOnAttachStateChangeListener(mAttachedStateListener);
mTabView = tab.getView();
mTabView.addOnAttachStateChangeListener(mAttachedStateListener);
}
};
/**
* Adds/removes the {@link InfoBarContainer} when the tab's view is attached/detached. This is
* mostly to ensure the infobars are not shown in tab switcher overview mode.
*/
private final OnAttachStateChangeListener mAttachedStateListener =
new OnAttachStateChangeListener() {
@Override
public void onViewDetachedFromWindow(View v) {
removeFromParentView();
}
@Override
public void onViewAttachedToWindow(View v) {
addToParentView();
}
};
private final InfoBarContainerLayout mLayout;
......@@ -106,11 +131,11 @@ public class InfoBarContainer extends SwipableOverlayView {
/** True when this container has been emptied and its native counterpart has been destroyed. */
private boolean mDestroyed;
/** The id of the tab associated with us. Set to Tab.INVALID_TAB_ID if no tab is associated. */
private int mTabId;
/** Parent view that contains the InfoBarContainerLayout. */
private TabContentViewParent mParentView;
private ViewGroup mParentView;
/** The view that {@link Tab#getView()} returns. */
private View mTabView;
/** Whether or not another View is occupying the same space as this one. */
private boolean mIsObscured;
......@@ -118,9 +143,10 @@ public class InfoBarContainer extends SwipableOverlayView {
private final ObserverList<InfoBarContainerObserver> mObservers =
new ObserverList<InfoBarContainerObserver>();
public InfoBarContainer(Context context, int tabId, TabContentViewParent parentView, Tab tab) {
public InfoBarContainer(Context context, final ViewGroup parentView, Tab tab) {
super(context, null);
tab.addObserver(mTabObserver);
mTabView = tab.getView();
// TODO(newt): move this workaround into the infobar views if/when they're scrollable.
// Workaround for http://crbug.com/407149. See explanation in onMeasure() below.
......@@ -133,7 +159,6 @@ public class InfoBarContainer extends SwipableOverlayView {
lp.topMargin = Math.round(topMarginDp * getResources().getDisplayMetrics().density);
setLayoutParams(lp);
mTabId = tabId;
mParentView = parentView;
mLayout = new InfoBarContainerLayout(context);
......@@ -169,6 +194,15 @@ public class InfoBarContainer extends SwipableOverlayView {
}
}
/**
* Sets the parent {@link ViewGroup} that contains the {@link InfoBarContainer}.
*/
public void setParentView(ViewGroup parent) {
mParentView = parent;
removeFromParentView();
addToParentView();
}
@VisibleForTesting
public void setAnimationListener(InfoBarAnimationListener listener) {
mLayout.setAnimationListener(listener);
......@@ -186,18 +220,6 @@ public class InfoBarContainer extends SwipableOverlayView {
super.addToParentView(mParentView);
}
/**
* Called when the parent {@link android.view.ViewGroup} has changed for
* this container.
*/
public void onParentViewChanged(int tabId, TabContentViewParent parentView) {
mTabId = tabId;
mParentView = parentView;
removeFromParentView();
addToParentView();
}
/**
* Adds an InfoBar to the view hierarchy.
* @param infoBar InfoBar to add to the View hierarchy.
......
......@@ -12,9 +12,6 @@ import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.drawable.GradientDrawable;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.CoordinatorLayout.LayoutParams;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.SurfaceView;
import android.view.View;
......@@ -23,14 +20,12 @@ import android.view.View.OnLayoutChangeListener;
import android.view.ViewGroup;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.animation.DecelerateInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.compositor.CompositorViewHolderBehavior;
import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.ui.interpolators.BakedBezierInterpolator;
......@@ -126,6 +121,9 @@ class SnackbarView {
startAnimatorOnSurfaceView(animatorSet);
}
/**
* Adjusts the position of the snackbar on top of the soft keyboard, if any.
*/
void adjustViewPosition() {
mParent.getWindowVisibleDisplayFrame(mCurrentVisibleRect);
// Only update if the visible frame has changed, otherwise there will be a layout loop.
......@@ -185,20 +183,7 @@ class SnackbarView {
}
private void addToParent() {
// LayoutParams in CoordinatorLayout and FrameLayout cannot be used interchangeably. Thus
// we create new LayoutParams every time.
if (mParent instanceof CoordinatorLayout) {
CoordinatorLayout.LayoutParams lp = new LayoutParams(getLayoutParams());
lp.gravity = Gravity.BOTTOM | Gravity.START;
lp.setBehavior(new CompositorViewHolderBehavior());
mParent.addView(mView, lp);
} else if (mParent instanceof FrameLayout) {
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(getLayoutParams());
lp.gravity = Gravity.BOTTOM | Gravity.START;
mParent.addView(mView, lp);
} else {
assert false : "Only FrameLayout and CoordinatorLayout are supported to show snackbars";
}
mParent.addView(mView);
// Why setting listener on parent? It turns out that if we force a relayout in the layout
// change listener of the view itself, the force layout flag will be reset to 0 when
......@@ -251,7 +236,7 @@ class SnackbarView {
*/
private ViewGroup findParentView(Activity activity) {
if (activity instanceof ChromeActivity) {
return ((ChromeActivity) activity).getCompositorViewHolder();
return (ViewGroup) activity.findViewById(R.id.bottom_container);
} else {
return (ViewGroup) activity.findViewById(android.R.id.content);
}
......
......@@ -191,7 +191,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
private GestureStateListener mGestureStateListener;
/** The parent view of the ContentView and the InfoBarContainer. */
private TabContentViewParent mContentViewParent;
private View mContentView;
/** A list of Tab observers. These are used to broadcast Tab events to listeners. */
private final ObserverList<TabObserver> mObservers = new ObserverList<>();
......@@ -814,8 +814,8 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
* @return The {@link View} displaying the current page in the tab. This can be {@code null}, if
* the tab is frozen or being initialized or destroyed.
*/
public TabContentViewParent getView() {
return mContentViewParent;
public View getView() {
return mNativePage != null ? mNativePage.getView() : mContentView;
}
/**
......@@ -1754,19 +1754,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
cvc.getContainerView().setOnHierarchyChangeListener(this);
cvc.getContainerView().setOnSystemUiVisibilityChangeListener(this);
// Wrap the ContentView in a FrameLayout, which will contain both the ContentView and
// the InfoBarContainer. The alternative -- placing the InfoBarContainer inside the
// ContentView -- causes problems since then the ContentView would contain both real
// views (the infobars) and virtual views (the web page elements), which breaks Android
// accessibility. http://crbug.com/416663
if (mContentViewParent != null) {
assert false;
mContentViewParent.removeAllViews();
}
mContentViewParent = new TabContentViewParent(mThemedApplicationContext, this);
mContentViewParent.addView(cvc.getContainerView(), 0, new FrameLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
mContentView = cvc.getContainerView();
mWebContentsDelegate = mDelegateFactory.createWebContentsDelegate(this);
mWebContentsObserver =
new TabWebContentsObserver(mContentViewCore.getWebContents(), this);
......@@ -1783,15 +1771,15 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
new TabContextMenuPopulator(
mDelegateFactory.createContextMenuPopulator(this), this));
final ViewGroup bottomContainer = (ViewGroup) getActivity()
.findViewById(R.id.bottom_container);
// In the case where restoring a Tab or showing a prerendered one we already have a
// valid infobar container, no need to recreate one.
if (mInfoBarContainer == null) {
// The InfoBarContainer needs to be created after the ContentView has been natively
// initialized.
mInfoBarContainer = new InfoBarContainer(
mThemedApplicationContext, getId(), mContentViewParent, this);
} else {
mInfoBarContainer.onParentViewChanged(getId(), mContentViewParent);
mInfoBarContainer = new InfoBarContainer(mThemedApplicationContext, bottomContainer,
this);
}
mInfoBarContainer.setContentViewCore(mContentViewCore);
......@@ -2341,7 +2329,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
mSwipeRefreshHandler.destroy();
mSwipeRefreshHandler = null;
}
mContentViewParent = null;
mContentView = null;
mContentViewCore.destroy();
mContentViewCore = null;
......
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.tab;
import android.content.Context;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.CoordinatorLayout.Behavior;
import android.view.Gravity;
import android.view.View;
import android.widget.FrameLayout;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.banners.SwipableOverlayView;
import org.chromium.ui.UiUtils;
import org.chromium.ui.base.DeviceFormFactor;
/**
* Parent {@link FrameLayout} holding the infobar and content of a tab. The content could be either
* a native page or a content view.
*/
public class TabContentViewParent extends FrameLayout {
private static final int CONTENT_INDEX = 0;
// A wrapper is needed because infobar's translation is controlled by SwipableOverlayView.
// Setting infobar's translation directly from this class will cause UI flickering.
private final FrameLayout mInfobarWrapper;
private final Behavior<?> mBehavior = new SnackbarAwareBehavior();
private EmptyTabObserver mTabObserver = new EmptyTabObserver() {
/**
* @return the {@link View} to show for the given {@link Tab}.
*/
private View getViewToShow(Tab tab) {
if (tab.getNativePage() != null) {
return tab.getNativePage().getView();
} else if (tab.getBlimpContents() != null) {
return tab.getBlimpContents().getView();
} else {
return tab.getContentViewCore().getContainerView();
}
}
@Override
public void onContentChanged(Tab tab) {
// If the tab is frozen, both native page and content view are not ready.
if (tab.isFrozen()) return;
View viewToShow = getViewToShow(tab);
if (isShowing(viewToShow)) return;
removeCurrentContent();
LayoutParams lp = (LayoutParams) viewToShow.getLayoutParams();
if (lp == null) {
lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
}
// Weirdly enough, if gravity is not top, top_margin is not respected by FrameLayout.
// Yet for many native pages on tablet, top_margin is necessary to not overlap the tab
// switcher.
lp.gravity = Gravity.TOP;
UiUtils.removeViewFromParent(viewToShow);
addView(viewToShow, CONTENT_INDEX, lp);
viewToShow.requestFocus();
}
};
public TabContentViewParent(Context context, Tab tab) {
super(context);
mInfobarWrapper = new FrameLayout(context);
mInfobarWrapper.setFocusable(true);
mInfobarWrapper.setFocusableInTouchMode(true);
addView(mInfobarWrapper,
new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
tab.addObserver(mTabObserver);
}
/**
* Attach the infobar container to the view hierarchy.
*/
public void addInfobarView(SwipableOverlayView infobarView, MarginLayoutParams lp) {
mInfobarWrapper.addView(infobarView, lp);
}
/**
* @return The {@link Behavior} that controls how children of this class animate together.
*/
public Behavior<?> getBehavior() {
return mBehavior;
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mInfobarWrapper.setTranslationY(0f);
}
/**
* @return Whether the given {@link View} is already in the view hierarchy.
*/
private boolean isShowing(View view) {
return view.getParent() == this;
}
private void removeCurrentContent() {
// Native page or content view should always be at index 0.
if (getChildCount() > 1) removeViewAt(CONTENT_INDEX);
}
private static class SnackbarAwareBehavior
extends CoordinatorLayout.Behavior<TabContentViewParent> {
@Override
public boolean layoutDependsOn(CoordinatorLayout parent, TabContentViewParent child,
View dependency) {
// Disable coordination on tablet as they appear at different location on tablet.
return dependency.getId() == R.id.snackbar
&& !DeviceFormFactor.isTablet(child.getContext());
}
@Override
public boolean onDependentViewChanged(CoordinatorLayout parent, TabContentViewParent child,
View dependency) {
child.mInfobarWrapper
.setTranslationY(dependency.getTranslationY() - dependency.getHeight());
return true;
}
@Override
public void onDependentViewRemoved(CoordinatorLayout parent, TabContentViewParent child,
View dependency) {
child.mInfobarWrapper.setTranslationY(0);
}
}
}
......@@ -131,7 +131,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/childaccounts/ExternalFeedbackReporter.java",
"java/src/org/chromium/chrome/browser/compositor/CompositorView.java",
"java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java",
"java/src/org/chromium/chrome/browser/compositor/CompositorViewHolderBehavior.java",
"java/src/org/chromium/chrome/browser/compositor/Invalidator.java",
"java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java",
"java/src/org/chromium/chrome/browser/compositor/TitleCache.java",
......@@ -947,7 +946,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/tab/SadTabViewFactory.java",
"java/src/org/chromium/chrome/browser/tab/Tab.java",
"java/src/org/chromium/chrome/browser/tab/TabBlimpContentsObserver.java",
"java/src/org/chromium/chrome/browser/tab/TabContentViewParent.java",
"java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java",
"java/src/org/chromium/chrome/browser/tab/TabContextMenuPopulator.java",
"java/src/org/chromium/chrome/browser/tab/TabDelegateFactory.java",
......
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