| Index: ash/wm/panels/panel_window_event_handler.cc
|
| diff --git a/ash/wm/panels/panel_window_event_handler.cc b/ash/wm/panels/panel_window_event_handler.cc
|
| index 2a222ef0c3e20be5894059f9dec323cde47d110d..4de0b0cc6ae616530f0c9cb8535631926b76e53a 100644
|
| --- a/ash/wm/panels/panel_window_event_handler.cc
|
| +++ b/ash/wm/panels/panel_window_event_handler.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "ash/shell_port.h"
|
| #include "ash/wm/window_state.h"
|
| +#include "ash/wm/window_util.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/aura/window_delegate.h"
|
| #include "ui/base/hit_test.h"
|
| @@ -22,8 +23,7 @@ void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
|
| if (!event->handled() && event->type() == ui::ET_MOUSE_PRESSED &&
|
| event->flags() & ui::EF_IS_DOUBLE_CLICK &&
|
| event->IsOnlyLeftMouseButton() &&
|
| - target->delegate()->GetNonClientComponent(event->location()) ==
|
| - HTCAPTION) {
|
| + wm::GetNonClientComponent(target, event->location()) == HTCAPTION) {
|
| ShellPort::Get()->RecordUserMetricsAction(UMA_PANEL_MINIMIZE_CAPTION_CLICK);
|
| wm::GetWindowState(target)->Minimize();
|
| event->StopPropagation();
|
| @@ -35,8 +35,7 @@ void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
|
| aura::Window* target = static_cast<aura::Window*>(event->target());
|
| if (!event->handled() && event->type() == ui::ET_GESTURE_TAP &&
|
| event->details().tap_count() == 2 &&
|
| - target->delegate()->GetNonClientComponent(event->location()) ==
|
| - HTCAPTION) {
|
| + wm::GetNonClientComponent(target, event->location()) == HTCAPTION) {
|
| ShellPort::Get()->RecordUserMetricsAction(
|
| UMA_PANEL_MINIMIZE_CAPTION_GESTURE);
|
| wm::GetWindowState(target)->Minimize();
|
|
|