| Index: chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| index 376eddd358b2afadef864fc74af46577ce1eb282..d714aa265d57d9fa645b3754bfb225102f124dd6 100644
|
| --- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
|
| @@ -102,10 +102,6 @@ void PageActionImageView::ExecuteAction(int button,
|
| }
|
| }
|
|
|
| -void PageActionImageView::GetAccessibleState(ui::AccessibleViewState* state) {
|
| - state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
|
| -}
|
| -
|
| bool PageActionImageView::OnMousePressed(const views::MouseEvent& event) {
|
| // We want to show the bubble on mouse release; that is the standard behavior
|
| // for buttons. (Also, triggering on mouse press causes bugs like
|
| @@ -113,9 +109,8 @@ bool PageActionImageView::OnMousePressed(const views::MouseEvent& event) {
|
| return true;
|
| }
|
|
|
| -void PageActionImageView::OnMouseReleased(const views::MouseEvent& event,
|
| - bool canceled) {
|
| - if (canceled || !HitTest(event.location()))
|
| +void PageActionImageView::OnMouseReleased(const views::MouseEvent& event) {
|
| + if (!HitTest(event.location()))
|
| return;
|
|
|
| int button = -1;
|
| @@ -136,8 +131,9 @@ void PageActionImageView::OnMouseReleased(const views::MouseEvent& event,
|
| ExecuteAction(button, false); // inspect_with_devtools
|
| }
|
|
|
| -bool PageActionImageView::OnKeyPressed(const views::KeyEvent& e) {
|
| - if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
|
| +bool PageActionImageView::OnKeyPressed(const views::KeyEvent& event) {
|
| + if (event.key_code() == ui::VKEY_SPACE ||
|
| + event.key_code() == ui::VKEY_RETURN) {
|
| ExecuteAction(1, false);
|
| return true;
|
| }
|
| @@ -159,6 +155,10 @@ void PageActionImageView::ShowContextMenu(const gfx::Point& p,
|
| context_menu_menu_->RunContextMenuAt(p);
|
| }
|
|
|
| +void PageActionImageView::GetAccessibleState(ui::AccessibleViewState* state) {
|
| + state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
|
| +}
|
| +
|
| void PageActionImageView::OnImageLoaded(
|
| SkBitmap* image, const ExtensionResource& resource, int index) {
|
| // We loaded icons()->size() icons, plus one extra if the page action had
|
|
|