| Index: chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
|
| diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
|
| index 7b3540cd6f38504ff2dfdac0d03c57551b87236f..1f62a0a7719adf3d2316414f15e27276a643d43f 100644
|
| --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
|
| +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
|
| @@ -414,6 +414,34 @@
|
| ///////////////////////////////////////////////////////////////////////////////
|
| // BrowserNonClientFrameViewAsh, private:
|
|
|
| +// views::NonClientFrameView:
|
| +bool BrowserNonClientFrameViewAsh::DoesIntersectRect(
|
| + const views::View* target,
|
| + const gfx::Rect& rect) const {
|
| + CHECK_EQ(this, target);
|
| + if (!views::ViewTargeterDelegate::DoesIntersectRect(this, rect)) {
|
| + // |rect| is outside BrowserNonClientFrameViewAsh's bounds.
|
| + return false;
|
| + }
|
| +
|
| + if (!browser_view()->IsTabStripVisible()) {
|
| + // Claim |rect| if it is above the top of the topmost client area view.
|
| + return rect.y() < GetTopInset(false);
|
| + }
|
| +
|
| + // Claim |rect| only if it is above the bottom of the tabstrip in a non-tab
|
| + // portion. In particular, the avatar label/button is left of the tabstrip and
|
| + // the window controls are right of the tabstrip.
|
| + TabStrip* tabstrip = browser_view()->tabstrip();
|
| + gfx::RectF rect_in_tabstrip_coords_f(rect);
|
| + View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords_f);
|
| + const gfx::Rect rect_in_tabstrip_coords(
|
| + gfx::ToEnclosingRect(rect_in_tabstrip_coords_f));
|
| + return (rect_in_tabstrip_coords.y() <= tabstrip->height()) &&
|
| + (!tabstrip->HitTestRect(rect_in_tabstrip_coords) ||
|
| + tabstrip->IsRectInWindowCaption(rect_in_tabstrip_coords));
|
| +}
|
| +
|
| int BrowserNonClientFrameViewAsh::GetTabStripLeftInset() const {
|
| const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
|
| const int avatar_right = profile_indicator_icon()
|
|
|