Index: chrome/browser/ui/panels/panel_browser_frame_view.cc |
diff --git a/chrome/browser/ui/panels/panel_browser_frame_view.cc b/chrome/browser/ui/panels/panel_browser_frame_view.cc |
index 5070ac37d9c5450798479a3f5eea087f1b7cbc21..e75012ab1e6dd48299eda90f8d20f2665a89d95a 100644 |
--- a/chrome/browser/ui/panels/panel_browser_frame_view.cc |
+++ b/chrome/browser/ui/panels/panel_browser_frame_view.cc |
@@ -542,36 +542,25 @@ void PanelBrowserFrameView::GetAccessibleState(ui::AccessibleViewState* state) { |
} |
bool PanelBrowserFrameView::OnMousePressed(const views::MouseEvent& event) { |
- gfx::Point mouse_location = event.location(); |
- |
if (CanResize() && |
- IsHitTestValueForResizing(NonClientHitTest(mouse_location))) |
+ IsHitTestValueForResizing(NonClientHitTest(event.location()))) |
return BrowserNonClientFrameView::OnMousePressed(event); |
- // |event.location| is in the view's coordinate system. Convert it to the |
- // screen coordinate system. |
- views::View::ConvertPointToScreen(this, &mouse_location); |
- |
if (event.IsOnlyLeftMouseButton() && |
- panel_browser_view_->OnTitlebarMousePressed(mouse_location)) { |
+ panel_browser_view_->OnTitlebarMousePressed(event)) { |
return true; |
} |
return BrowserNonClientFrameView::OnMousePressed(event); |
} |
bool PanelBrowserFrameView::OnMouseDragged(const views::MouseEvent& event) { |
- // |event.location| is in the view's coordinate system. Convert it to the |
- // screen coordinate system. |
- gfx::Point mouse_location = event.location(); |
- views::View::ConvertPointToScreen(this, &mouse_location); |
- |
- if (panel_browser_view_->OnTitlebarMouseDragged(mouse_location)) |
+ if (panel_browser_view_->OnTitlebarMouseDragged(event)) |
return true; |
return BrowserNonClientFrameView::OnMouseDragged(event); |
} |
void PanelBrowserFrameView::OnMouseReleased(const views::MouseEvent& event) { |
- if (panel_browser_view_->OnTitlebarMouseReleased()) |
+ if (panel_browser_view_->OnTitlebarMouseReleased(event)) |
return; |
BrowserNonClientFrameView::OnMouseReleased(event); |
} |
@@ -587,9 +576,9 @@ void PanelBrowserFrameView::ButtonPressed(views::Button* sender, |
if (sender == close_button_) |
frame()->Close(); |
else if (sender == minimize_button_) |
- panel_browser_view_->panel()->Minimize(); |
+ panel_browser_view_->MinimizeButtonPressed(event); |
else if (sender == restore_button_) |
- panel_browser_view_->panel()->Restore(); |
+ panel_browser_view_->RestoreButtonPressed(event); |
} |
bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const { |