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

Unified Diff: chrome/browser/ui/views/translate/translate_icon_view.cc

Issue 1962393003: log the click activate/deactive of translate icon on location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 7 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/translate/translate_icon_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/translate/translate_icon_view.cc
diff --git a/chrome/browser/ui/views/translate/translate_icon_view.cc b/chrome/browser/ui/views/translate/translate_icon_view.cc
index 1b1d24cabab6e50fc8058d8ad4f476ef1e977dc0..3de1a32bfdad015df400868e4989936a7c81c74c 100644
--- a/chrome/browser/ui/views/translate/translate_icon_view.cc
+++ b/chrome/browser/ui/views/translate/translate_icon_view.cc
@@ -4,9 +4,11 @@
#include "chrome/browser/ui/views/translate/translate_icon_view.h"
+#include "base/metrics/histogram_macros.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/translate/translate_bubble_view_state_transition.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/translate/translate_bubble_view.h"
#include "chrome/grit/generated_resources.h"
@@ -26,6 +28,14 @@ TranslateIconView::~TranslateIconView() {}
void TranslateIconView::OnExecuting(
BubbleIconView::ExecuteSource execute_source) {}
+void TranslateIconView::OnPressed(bool activated) {
+ UMA_HISTOGRAM_ENUMERATION(
+ translate::kTranslateBubbleUIEvent,
+ (activated ? translate::PAGE_ACTION_ICON_ACTIVATED
+ : translate::PAGE_ACTION_ICON_DEACTIVATED),
+ translate::TRANSLATE_BUBBLE_UI_EVENT_MAX);
+}
+
views::BubbleDialogDelegateView* TranslateIconView::GetBubble() const {
return TranslateBubbleView::GetCurrentBubble();
}
« no previous file with comments | « chrome/browser/ui/views/translate/translate_icon_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698