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

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

Issue 114643003: Use a single ToplevelWindowEventHandler for the ash::Shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
« no previous file with comments | « ash/wm/panels/panel_window_event_handler.h ('k') | ash/wm/toplevel_window_event_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cb4946991951c5df45c5c3d6c72c2c38a3791f50..f056935accf756a0b15e0563da033ebdcad880c5 100644
--- a/ash/wm/panels/panel_window_event_handler.cc
+++ b/ash/wm/panels/panel_window_event_handler.cc
@@ -4,6 +4,8 @@
#include "ash/wm/panels/panel_window_event_handler.h"
+#include "ash/metrics/user_metrics_recorder.h"
+#include "ash/shell.h"
#include "ash/wm/window_state.h"
#include "ui/aura/window.h"
#include "ui/aura/window_delegate.h"
@@ -13,8 +15,7 @@
namespace ash {
namespace internal {
-PanelWindowEventHandler::PanelWindowEventHandler(aura::Window* owner)
- : ToplevelWindowEventHandler(owner) {
+PanelWindowEventHandler::PanelWindowEventHandler() {
}
PanelWindowEventHandler::~PanelWindowEventHandler() {
@@ -27,10 +28,12 @@ void PanelWindowEventHandler::OnMouseEvent(ui::MouseEvent* event) {
event->IsOnlyLeftMouseButton() &&
target->delegate()->GetNonClientComponent(event->location()) ==
HTCAPTION) {
+ ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
+ ash::UMA_PANEL_MINIMIZE_CAPTION_CLICK);
wm::GetWindowState(target)->Minimize();
+ event->StopPropagation();
return;
}
- ToplevelWindowEventHandler::OnMouseEvent(event);
}
void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
@@ -39,11 +42,12 @@ void PanelWindowEventHandler::OnGestureEvent(ui::GestureEvent* event) {
event->details().tap_count() == 2 &&
target->delegate()->GetNonClientComponent(event->location()) ==
HTCAPTION) {
+ ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
+ ash::UMA_PANEL_MINIMIZE_CAPTION_GESTURE);
wm::GetWindowState(target)->Minimize();
event->StopPropagation();
return;
}
- ToplevelWindowEventHandler::OnGestureEvent(event);
}
} // namespace internal
« no previous file with comments | « ash/wm/panels/panel_window_event_handler.h ('k') | ash/wm/toplevel_window_event_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698