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

Unified Diff: chrome/browser/ui/views/location_bar/bubble_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
Index: chrome/browser/ui/views/location_bar/bubble_icon_view.cc
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
index af515d320d5ea517e3bc3639431f55bf504f3858..5c56c59eabc0ef9742828e06161e43a0b8fa31d6 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
@@ -29,8 +29,7 @@ BubbleIconView::BubbleIconView(CommandUpdater* command_updater, int command_id)
image_->SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
}
-BubbleIconView::~BubbleIconView() {
-}
+BubbleIconView::~BubbleIconView() {}
bool BubbleIconView::IsBubbleShowing() const {
// If the bubble is being destroyed, it's considered showing though it may be
@@ -86,16 +85,18 @@ void BubbleIconView::OnMouseReleased(const ui::MouseEvent& event) {
// doing nothing here.
if (suppress_mouse_released_action_) {
suppress_mouse_released_action_ = false;
+ OnPressed(false);
return;
}
if (!event.IsLeftMouseButton())
return;
const bool activated = HitTestPoint(event.location());
- ink_drop_delegate_->OnAction(
- activated ? views::InkDropState::ACTIVATED : views::InkDropState::HIDDEN);
+ ink_drop_delegate_->OnAction(activated ? views::InkDropState::ACTIVATED
+ : views::InkDropState::HIDDEN);
if (activated)
ExecuteCommand(EXECUTE_SOURCE_MOUSE);
+ OnPressed(activated);
}
bool BubbleIconView::OnKeyPressed(const ui::KeyEvent& event) {
« no previous file with comments | « chrome/browser/ui/views/location_bar/bubble_icon_view.h ('k') | chrome/browser/ui/views/translate/translate_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698