| Index: chrome/browser/ui/views/location_bar/star_view.cc
|
| diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
|
| index 6b499c5a96cff5efea1d0a9fd55b00b44ad89e21..ef309c996cfe8b6832e758f09675c2b352e02a98 100644
|
| --- a/chrome/browser/ui/views/location_bar/star_view.cc
|
| +++ b/chrome/browser/ui/views/location_bar/star_view.cc
|
| @@ -32,38 +32,39 @@ void StarView::SetToggled(bool on) {
|
| on ? IDR_STAR_LIT : IDR_STAR));
|
| }
|
|
|
| -void StarView::GetAccessibleState(ui::AccessibleViewState* state) {
|
| - state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_STAR);
|
| - state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
|
| -}
|
| -
|
| -bool StarView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
|
| - // Don't show tooltip to distract user if BookmarkBubbleView is showing.
|
| - if (browser::IsBookmarkBubbleViewShowing())
|
| - return false;
|
| -
|
| - return ImageView::GetTooltipText(p, tooltip);
|
| -}
|
| -
|
| bool StarView::OnMousePressed(const views::MouseEvent& event) {
|
| // We want to show the bubble on mouse release; that is the standard behavior
|
| // for buttons.
|
| return true;
|
| }
|
|
|
| -void StarView::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
|
| - if (!canceled && HitTest(event.location()))
|
| +void StarView::OnMouseReleased(const views::MouseEvent& event) {
|
| + if (HitTest(event.location()))
|
| command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
|
| }
|
|
|
| -bool StarView::OnKeyPressed(const views::KeyEvent& e) {
|
| - if (e.key_code() == ui::VKEY_SPACE || e.key_code() == ui::VKEY_RETURN) {
|
| +bool StarView::OnKeyPressed(const views::KeyEvent& event) {
|
| + if (event.key_code() == ui::VKEY_SPACE ||
|
| + event.key_code() == ui::VKEY_RETURN) {
|
| command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
|
| return true;
|
| }
|
| return false;
|
| }
|
|
|
| +bool StarView::GetTooltipText(const gfx::Point& p, std::wstring* tooltip) {
|
| + // Don't show tooltip to distract user if BookmarkBubbleView is showing.
|
| + if (browser::IsBookmarkBubbleViewShowing())
|
| + return false;
|
| +
|
| + return ImageView::GetTooltipText(p, tooltip);
|
| +}
|
| +
|
| +void StarView::GetAccessibleState(ui::AccessibleViewState* state) {
|
| + state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_STAR);
|
| + state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
|
| +}
|
| +
|
| void StarView::InfoBubbleClosing(InfoBubble* info_bubble,
|
| bool closed_by_escape) {
|
| }
|
|
|