Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: chrome/browser/cocoa/status_bubble_mac.mm

Issue 392007: gtk: Hide the status bubble when the mouse nears it. (Closed)
Patch Set: merge again Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac.h ('k') | chrome/browser/gtk/download_shelf_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/status_bubble_mac.mm
diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm
index 9305100c964c9b7af47147ec6e4f44d6b068d4d5..55b57df6d3832e638325322fc775fc427e865598 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() {
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac.h ('k') | chrome/browser/gtk/download_shelf_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698