summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/status_bubble_mac.mm
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 01:18:00 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-14 01:18:00 +0000
commitb8595e9c25fc47e4e0e91683b38f4772b4789f1b (patch)
tree9cc63c58e432b835a3af85ac89d4cd9df0d33aa9 /chrome/browser/cocoa/status_bubble_mac.mm
parent5da4928116a7168b456415f9af412f93138b6dcb (diff)
downloadchromium_src-b8595e9c25fc47e4e0e91683b38f4772b4789f1b.zip
chromium_src-b8595e9c25fc47e4e0e91683b38f4772b4789f1b.tar.gz
chromium_src-b8595e9c25fc47e4e0e91683b38f4772b4789f1b.tar.bz2
gtk: Hide the status bubble when the mouse nears it.
This isn't as slick as other platforms, in that the bubble just slides down and gets cropped instead of sliding down out of the browser window -- doing the latter will probably require reparenting the bubble into its own window when we want to move it. BUG=18311 TEST=ran "nc -l -p 8080", went to localhost:8080, and made sure that the bubble ran away with both LTR and RTL languages Review URL: http://codereview.chromium.org/392007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/status_bubble_mac.mm')
-rw-r--r--chrome/browser/cocoa/status_bubble_mac.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm
index 9305100..55b57df 100644
--- a/chrome/browser/cocoa/status_bubble_mac.mm
+++ b/chrome/browser/cocoa/status_bubble_mac.mm
@@ -8,6 +8,7 @@
#include "app/gfx/text_elider.h"
#include "base/compiler_specific.h"
+#include "base/gfx/point.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
@@ -206,10 +207,15 @@ void StatusBubbleMac::Hide() {
url_text_ = nil;
}
-void StatusBubbleMac::MouseMoved() {
+void StatusBubbleMac::MouseMoved(
+ const gfx::Point& location, bool left_content) {
+ if (left_content)
+ return;
+
if (!window_)
return;
+ // TODO(thakis): Use 'location' here instead of NSEvent.
NSPoint cursor_location = [NSEvent mouseLocation];
--cursor_location.y; // docs say the y coord starts at 1 not 0; don't ask why
@@ -330,7 +336,7 @@ void StatusBubbleMac::Create() {
Attach();
[view setCornerFlags:kRoundedTopRightCorner];
- MouseMoved();
+ MouseMoved(gfx::Point(), false);
}
void StatusBubbleMac::Attach() {