diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 15:25:33 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-02 15:25:33 +0000 |
commit | 03c5430b5362b1925a0bb5a1df404304fe09ace1 (patch) | |
tree | 00302040aa35d198d8527c4cfdbf3b09ef5cf559 /chrome/browser/views | |
parent | 02a4d4a28b3c961da4646d581de922b44561dc45 (diff) | |
download | chromium_src-03c5430b5362b1925a0bb5a1df404304fe09ace1.zip chromium_src-03c5430b5362b1925a0bb5a1df404304fe09ace1.tar.gz chromium_src-03c5430b5362b1925a0bb5a1df404304fe09ace1.tar.bz2 |
Don's show star tooltip when BookmarkBubbleView is showing.
BUG=chromium-os:4341
TEST=Verify fix for chromium-os:4341 and tooltips are still visible when bubble is not showing.
Review URL: http://codereview.chromium.org/2867037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/location_bar/star_view.cc | 9 | ||||
-rw-r--r-- | chrome/browser/views/location_bar/star_view.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/views/location_bar/star_view.cc b/chrome/browser/views/location_bar/star_view.cc index c559a27..9dfaf62 100644 --- a/chrome/browser/views/location_bar/star_view.cc +++ b/chrome/browser/views/location_bar/star_view.cc @@ -9,6 +9,7 @@ #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/command_updater.h" #include "chrome/browser/view_ids.h" +#include "chrome/browser/views/browser_dialogs.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -38,6 +39,14 @@ bool StarView::GetAccessibleRole(AccessibilityTypes::Role* role) { return true; } +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. diff --git a/chrome/browser/views/location_bar/star_view.h b/chrome/browser/views/location_bar/star_view.h index 485cfb5..ddc3749 100644 --- a/chrome/browser/views/location_bar/star_view.h +++ b/chrome/browser/views/location_bar/star_view.h @@ -27,6 +27,7 @@ class StarView : public views::ImageView, public InfoBubbleDelegate { private: // views::ImageView overrides: virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); + virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip); virtual bool OnMousePressed(const views::MouseEvent& event); virtual void OnMouseReleased(const views::MouseEvent& event, bool canceled); virtual bool OnKeyPressed(const views::KeyEvent& e); |