diff options
author | bruthig <bruthig@chromium.org> | 2015-03-31 08:42:11 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-31 15:42:43 +0000 |
commit | 073d9ffbafb012e1c61064124769cadec04f59b8 (patch) | |
tree | cce7ad16d63c74b7922dc2c00388e49eb326e843 | |
parent | 4ef3ab4e104014a35ac36903368b0111c52a1389 (diff) | |
download | chromium_src-073d9ffbafb012e1c61064124769cadec04f59b8.zip chromium_src-073d9ffbafb012e1c61064124769cadec04f59b8.tar.gz chromium_src-073d9ffbafb012e1c61064124769cadec04f59b8.tar.bz2 |
Updated the UMA stat ash::TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP recording.
Updated the UMA stat ash::TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP (aka
'Ash.GestureTarget:Window size button tap') to be recorded whenever the
FrameSizeButton is activated due to a gesture event.
BUG=None
TEST=Manually verified TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP was recorded for touch only events.
Review URL: https://codereview.chromium.org/1030283002
Cr-Commit-Position: refs/heads/master@{#323040}
-rw-r--r-- | ash/frame/caption_buttons/frame_caption_button_container_view.cc | 6 | ||||
-rw-r--r-- | ash/frame/caption_buttons/frame_size_button.cc | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/ash/frame/caption_buttons/frame_caption_button_container_view.cc b/ash/frame/caption_buttons/frame_caption_button_container_view.cc index 686fa08..78c5a38 100644 --- a/ash/frame/caption_buttons/frame_caption_button_container_view.cc +++ b/ash/frame/caption_buttons/frame_caption_button_container_view.cc @@ -12,6 +12,7 @@ #include "ash/frame/caption_buttons/frame_size_button.h" #include "ash/metrics/user_metrics_recorder.h" #include "ash/shell.h" +#include "ash/touch/touch_uma.h" #include "ash/wm/maximize_mode/maximize_mode_controller.h" #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" @@ -335,6 +336,11 @@ void FrameCaptionButtonContainerView::ButtonPressed(views::Button* sender, frame_->Maximize(); action = ash::UMA_WINDOW_MAXIMIZE_BUTTON_CLICK_MAXIMIZE; } + + if (event.IsGestureEvent()) { + TouchUMA::GetInstance()->RecordGestureAction( + TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP); + } } else if (sender == close_button_) { frame_->Close(); action = ash::UMA_WINDOW_CLOSE_BUTTON_CLICK; diff --git a/ash/frame/caption_buttons/frame_size_button.cc b/ash/frame/caption_buttons/frame_size_button.cc index 29da5a8..094d41c 100644 --- a/ash/frame/caption_buttons/frame_size_button.cc +++ b/ash/frame/caption_buttons/frame_size_button.cc @@ -7,7 +7,6 @@ #include "ash/metrics/user_metrics_recorder.h" #include "ash/screen_util.h" #include "ash/shell.h" -#include "ash/touch/touch_uma.h" #include "ash/wm/window_state.h" #include "ash/wm/window_util.h" #include "ash/wm/wm_event.h" @@ -123,10 +122,6 @@ void FrameSizeButton::OnGestureEvent(ui::GestureEvent* event) { event->type() == ui::ET_SCROLL_FLING_START || event->type() == ui::ET_GESTURE_END) { if (CommitSnap(*event)) { - if (event->type() == ui::ET_GESTURE_TAP) { - TouchUMA::GetInstance()->RecordGestureAction( - TouchUMA::GESTURE_FRAMEMAXIMIZE_TAP); - } event->SetHandled(); return; } |