Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Unified Diff: ash/wm/panels/panel_window_event_handler.cc

Issue 2905893002: chromeos: convert more ash/wm code to aura::Window (Closed)
Patch Set: moar cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698