summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/location_bar_view.cc
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 20:51:10 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 20:51:10 +0000
commit14690295cad9266c1c17d202dcd8239f03c48785 (patch)
tree3ce3962da7d7d459332c01ac4929d782e48a111f /chrome/browser/views/location_bar_view.cc
parentacbb3dcb1c117965ad74843cad2ddbad7c15da4e (diff)
downloadchromium_src-14690295cad9266c1c17d202dcd8239f03c48785.zip
chromium_src-14690295cad9266c1c17d202dcd8239f03c48785.tar.gz
chromium_src-14690295cad9266c1c17d202dcd8239f03c48785.tar.bz2
Add button number to page action event reply object. Fix outdated page action docs.
Review URL: http://codereview.chromium.org/194082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26006 0039d316-1c4b-4281-b951-d872f2087c98
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;
}