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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 16832003: Add UMA metrics to measure the effectiveness of views fuzzing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 7 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
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index acfb5c55512212e8f99dab093947ec2f5dfcd80f..f87118257cb9cd5c55af7642ccf68db8443f8f74 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -49,7 +49,10 @@
#endif
#if defined(USE_ASH)
+#include "ash/touch/touch_uma.h"
#include "ui/aura/env.h"
+
+using ash::internal::TouchUMA;
#endif
namespace {
@@ -457,6 +460,7 @@ Tab::Tab(TabController* controller)
immersive_loading_step_(0),
should_display_crashed_favicon_(false),
theme_provider_(NULL),
+ tab_activated_with_last_gesture_begin_(false),
hover_controller_(this),
showing_icon_(false),
showing_close_button_(false),
@@ -711,6 +715,11 @@ void Tab::ButtonPressed(views::Button* sender, const ui::Event& event) {
CLOSE_TAB_FROM_TOUCH;
DCHECK_EQ(close_button_, sender);
controller()->CloseTab(this, source);
+#if defined(USE_ASH)
+ if (event.type() == ui::ET_GESTURE_TAP)
sky 2013/06/26 23:42:55 use {} since multi-line too.
tdanderson 2013/06/27 22:39:33 Done.
+ TouchUMA::GetInstance()->RecordGestureAction(
+ TouchUMA::GESTURE_TABCLOSE_TAP);
+#endif
}
////////////////////////////////////////////////////////////////////////////////
@@ -1028,6 +1037,7 @@ void Tab::OnGestureEvent(ui::GestureEvent* event) {
parent());
ui::ListSelectionModel original_selection;
original_selection.Copy(controller()->GetSelectionModel());
+ tab_activated_with_last_gesture_begin_ = !IsActive();
if (!IsSelected())
controller()->SelectTab(this);
gfx::Point loc(event->location());

Powered by Google App Engine
This is Rietveld 408576698