Commit cfb8c555 authored by stevet@chromium.org's avatar stevet@chromium.org

Record user actions for Ash accelerators.

Clean up the huge switch of accelerators as well:
* Move a bunch of code into Handle helpers.
* Alphabetize the anon namespace helpers.
* Clean up the OS_CHROMEOS groupings a bit.

BUG=321695
R=jamescook@chromium.org

Review URL: https://codereview.chromium.org/78763003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238391 0039d316-1c4b-4281-b951-d872f2087c98
parent d89eec80
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "ash/wm/window_cycle_controller.h" #include "ash/wm/window_cycle_controller.h"
#include "ash/wm/window_state.h" #include "ash/wm/window_state.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
#include "content/public/browser/user_metrics.h"
namespace ash { namespace ash {
namespace accelerators { namespace accelerators {
...@@ -25,8 +26,8 @@ bool ToggleMinimized() { ...@@ -25,8 +26,8 @@ bool ToggleMinimized() {
wm::WindowState* window_state = wm::GetWindowState(window); wm::WindowState* window_state = wm::GetWindowState(window);
if (!window_state->CanMinimize()) if (!window_state->CanMinimize())
return false; return false;
ash::Shell::GetInstance()->delegate()->RecordUserMetricsAction( content::RecordAction(
ash::UMA_MINIMIZE_PER_KEY); content::UserMetricsAction("Accel_Toggle_Minimized"));
window_state->Minimize(); window_state->Minimize();
return true; return true;
} }
...@@ -35,6 +36,8 @@ void ToggleMaximized() { ...@@ -35,6 +36,8 @@ void ToggleMaximized() {
wm::WindowState* window_state = wm::GetActiveWindowState(); wm::WindowState* window_state = wm::GetActiveWindowState();
if (!window_state) if (!window_state)
return; return;
content::RecordAction(
content::UserMetricsAction("Accel_Toggle_Maximized"));
// Get out of fullscreen when in fullscreen mode. // Get out of fullscreen when in fullscreen mode.
if (window_state->IsFullscreen()) if (window_state->IsFullscreen())
ToggleFullscreen(); ToggleFullscreen();
......
This diff is collapsed.
...@@ -68,7 +68,6 @@ enum UserMetricsAction { ...@@ -68,7 +68,6 @@ enum UserMetricsAction {
UMA_GESTURE_OVERVIEW, UMA_GESTURE_OVERVIEW,
UMA_LAUNCHER_CLICK_ON_APP, UMA_LAUNCHER_CLICK_ON_APP,
UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON, UMA_LAUNCHER_CLICK_ON_APPLIST_BUTTON,
UMA_MINIMIZE_PER_KEY,
UMA_MOUSE_DOWN, UMA_MOUSE_DOWN,
UMA_SHELF_ALIGNMENT_SET_BOTTOM, UMA_SHELF_ALIGNMENT_SET_BOTTOM,
UMA_SHELF_ALIGNMENT_SET_LEFT, UMA_SHELF_ALIGNMENT_SET_LEFT,
......
...@@ -180,9 +180,6 @@ void ChromeShellDelegate::RecordUserMetricsAction( ...@@ -180,9 +180,6 @@ void ChromeShellDelegate::RecordUserMetricsAction(
chromeos::default_pinned_apps_field_trial::APP_LAUNCHER); chromeos::default_pinned_apps_field_trial::APP_LAUNCHER);
#endif #endif
break; break;
case ash::UMA_MINIMIZE_PER_KEY:
content::RecordAction(content::UserMetricsAction("Minimize_UsingKey"));
break;
case ash::UMA_MOUSE_DOWN: case ash::UMA_MOUSE_DOWN:
content::RecordAction(content::UserMetricsAction("Mouse_Down")); content::RecordAction(content::UserMetricsAction("Mouse_Down"));
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment