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

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: Patch for landing 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..31003579c3619950894a37e025c2f4ca057ffccb 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/tabs/tab_controller.h"
#include "chrome/browser/ui/views/theme_image_mapper.h"
+#include "chrome/browser/ui/views/touch_uma/touch_uma.h"
#include "chrome/common/chrome_switches.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -457,6 +458,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 +713,8 @@ void Tab::ButtonPressed(views::Button* sender, const ui::Event& event) {
CLOSE_TAB_FROM_TOUCH;
DCHECK_EQ(close_button_, sender);
controller()->CloseTab(this, source);
+ if (event.type() == ui::ET_GESTURE_TAP)
+ TouchUMA::RecordGestureAction(TouchUMA::GESTURE_TABCLOSE_TAP);
}
////////////////////////////////////////////////////////////////////////////////
@@ -1028,6 +1032,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());
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.h ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698