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

Unified Diff: chrome/browser/ui/views/frame/browser_root_view.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/frame/browser_root_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 44cd1dc92034a79280b87c5ee83fd6a102a8b271..ebce9d5aefba9db9bab55860637e65513601064d 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -21,6 +21,12 @@
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(USE_ASH)
+#include "ash/touch/touch_uma.h"
+
+using ash::internal::TouchUMA;
+#endif
+
// static
const char BrowserRootView::kViewClassName[] =
"browser/ui/views/frame/BrowserRootView";
@@ -119,6 +125,18 @@ const char* BrowserRootView::GetClassName() const {
return kViewClassName;
}
+#if defined(USE_ASH)
+void BrowserRootView::DispatchGestureEvent(ui::GestureEvent* event) {
+ if (event->type() == ui::ET_GESTURE_TAP &&
+ event->location().y() <= 0 &&
+ event->location().x() <= browser_view_->GetBounds().width())
+ TouchUMA::GetInstance()->RecordGestureAction(
sky 2013/06/26 23:42:55 use {} since condition is multi-line.
tdanderson 2013/06/27 22:39:33 Done.
+ TouchUMA::GESTURE_ROOTVIEWTOP_TAP);
+
+ RootView::DispatchGestureEvent(event);
+}
+#endif
+
bool BrowserRootView::ShouldForwardToTabStrip(
const ui::DropTargetEvent& event) {
if (!tabstrip()->visible())

Powered by Google App Engine
This is Rietveld 408576698