summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/location_bar_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views/location_bar_view.cc')
-rw-r--r--chrome/browser/views/location_bar_view.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 310ba52..d33d68d 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -1224,10 +1224,17 @@ LocationBarView::PageActionImageView::~PageActionImageView() {
bool LocationBarView::PageActionImageView::OnMousePressed(
const views::MouseEvent& event) {
+ int button = -1;
+ if (event.IsLeftMouseButton())
+ button = 1;
+ else if (event.IsMiddleMouseButton())
+ button = 2;
+ else if (event.IsRightMouseButton())
+ button = 3;
// Our PageAction icon was clicked on, notify proper authorities.
ExtensionBrowserEventRouter::GetInstance()->PageActionExecuted(
profile_, page_action_->extension_id(), page_action_->id(),
- current_tab_id_, current_url_.spec());
+ current_tab_id_, current_url_.spec(), button);
return true;
}