| Index: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
|
| diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
|
| index 7f854d766a71099aebb13becf75252df8c698c60..02c09cfa0d6f3c778ba6d7214e188b12ed61a28b 100644
|
| --- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
|
| +++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
|
| @@ -315,12 +315,9 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
|
| }
|
|
|
| // If the rect is outside the bounds of the client area, claim it.
|
| - // TODO(tdanderson): Implement View::ConvertRectToTarget().
|
| - gfx::Point rect_in_client_view_coords_origin(rect.origin());
|
| - View::ConvertPointToTarget(this, frame()->client_view(),
|
| - &rect_in_client_view_coords_origin);
|
| - gfx::Rect rect_in_client_view_coords(
|
| - rect_in_client_view_coords_origin, rect.size());
|
| + gfx::Rect rect_in_client_view_coords(rect);
|
| + View::ConvertRectToTarget(this, frame()->client_view(),
|
| + &rect_in_client_view_coords);
|
| if (!frame()->client_view()->HitTestRect(rect_in_client_view_coords))
|
| return true;
|
|
|
| @@ -330,12 +327,8 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
|
| if (!tabstrip || !browser_view()->IsTabStripVisible())
|
| return false;
|
|
|
| - gfx::Point rect_in_tabstrip_coords_origin(rect.origin());
|
| - View::ConvertPointToTarget(this, tabstrip,
|
| - &rect_in_tabstrip_coords_origin);
|
| - gfx::Rect rect_in_tabstrip_coords(
|
| - rect_in_tabstrip_coords_origin, rect.size());
|
| -
|
| + gfx::Rect rect_in_tabstrip_coords(rect);
|
| + View::ConvertRectToTarget(this, tabstrip, &rect_in_tabstrip_coords);
|
| if (rect_in_tabstrip_coords.bottom() > tabstrip->GetLocalBounds().bottom()) {
|
| // |rect| is below the tabstrip.
|
| return false;
|
| @@ -343,11 +336,7 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
|
|
|
| if (tabstrip->HitTestRect(rect_in_tabstrip_coords)) {
|
| // Claim |rect| if it is in a non-tab portion of the tabstrip.
|
| - // TODO(tdanderson): Pass |rect_in_tabstrip_coords| instead of its center
|
| - // point to TabStrip::IsPositionInWindowCaption() once
|
| - // GetEventHandlerForRect() is implemented.
|
| - return tabstrip->IsPositionInWindowCaption(
|
| - rect_in_tabstrip_coords.CenterPoint());
|
| + return tabstrip->IsRectInWindowCaption(rect_in_tabstrip_coords);
|
| }
|
|
|
| // The window switcher button is to the right of the tabstrip but is
|
| @@ -355,11 +344,9 @@ bool OpaqueBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
|
| views::View* window_switcher_button =
|
| browser_view()->window_switcher_button();
|
| if (window_switcher_button && window_switcher_button->visible()) {
|
| - gfx::Point rect_in_window_switcher_coords_origin(rect.origin());
|
| - View::ConvertPointToTarget(this, window_switcher_button,
|
| - &rect_in_window_switcher_coords_origin);
|
| - gfx::Rect rect_in_window_switcher_coords(
|
| - rect_in_window_switcher_coords_origin, rect.size());
|
| + gfx::Rect rect_in_window_switcher_coords(rect);
|
| + View::ConvertRectToTarget(this, window_switcher_button,
|
| + &rect_in_window_switcher_coords);
|
|
|
| if (window_switcher_button->HitTestRect(rect_in_window_switcher_coords))
|
| return false;
|
|
|