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

Unified Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 2099443002: Migrate simple ash Shell metrics users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile error. Created 4 years, 6 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
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_event_handler.cc
diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc
index 4f3943db98eb5eabda89144206d98e9e4f9bde13..51a796fca272a80577780dd40f67cd54eb3923d5 100644
--- a/ash/wm/workspace/workspace_event_handler.cc
+++ b/ash/wm/workspace/workspace_event_handler.cc
@@ -7,9 +7,8 @@
#include "ash/aura/wm_window_aura.h"
#include "ash/common/wm/window_state.h"
#include "ash/common/wm/wm_event.h"
+#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
-#include "ash/metrics/user_metrics_recorder.h"
-#include "ash/shell.h"
#include "ash/touch/touch_uma.h"
#include "ash/wm/window_state_aura.h"
#include "ui/aura/window.h"
@@ -60,8 +59,8 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
GetNonClientComponent(event->location());
if (component == HTCAPTION &&
component == click_component_) {
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK);
+ WmShell::Get()->RecordUserMetricsAction(
+ UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK);
const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION);
target_state->OnWMEvent(&wm_event);
event->StopPropagation();
@@ -99,8 +98,8 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
}
if (click_component_ == previous_target_component) {
- ash::Shell::GetInstance()->metrics()->RecordUserMetricsAction(
- ash::UMA_TOGGLE_MAXIMIZE_CAPTION_GESTURE);
+ WmShell::Get()->RecordUserMetricsAction(
+ UMA_TOGGLE_MAXIMIZE_CAPTION_GESTURE);
TouchUMA::GetInstance()->RecordGestureAction(
TouchUMA::GESTURE_MAXIMIZE_DOUBLETAP);
const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION);
@@ -117,13 +116,13 @@ void WorkspaceEventHandler::HandleVerticalResizeDoubleClick(
if (event->flags() & ui::EF_IS_DOUBLE_CLICK) {
int component = target->GetNonClientComponent(event->location());
if (component == HTBOTTOM || component == HTTOP) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
+ WmShell::Get()->RecordUserMetricsAction(
UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK);
const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE);
target_state->OnWMEvent(&wm_event);
event->StopPropagation();
} else if (component == HTLEFT || component == HTRIGHT) {
- Shell::GetInstance()->metrics()->RecordUserMetricsAction(
+ WmShell::Get()->RecordUserMetricsAction(
UMA_TOGGLE_SINGLE_AXIS_MAXIMIZE_BORDER_CLICK);
const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_HORIZONTAL_MAXIMIZE);
target_state->OnWMEvent(&wm_event);
« no previous file with comments | « ash/wm/window_cycle_controller.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698