summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications
diff options
context:
space:
mode:
authorsaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 02:07:11 +0000
committersaintlou@chromium.org <saintlou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 02:07:11 +0000
commit645d0ab05f4ba28a76ea5de8b362fe6fa8d6c67e (patch)
treeaca7622d247772cb75fd7e17c7f6ffdea54013e5 /chrome/browser/notifications
parentedb9c4d1fdfecc15db195673affd66d55d0aaa0a (diff)
downloadchromium_src-645d0ab05f4ba28a76ea5de8b362fe6fa8d6c67e.zip
chromium_src-645d0ab05f4ba28a76ea5de8b362fe6fa8d6c67e.tar.gz
chromium_src-645d0ab05f4ba28a76ea5de8b362fe6fa8d6c67e.tar.bz2
Converted BalloonCollectionImp to Views.
BUG=97131 TEST=none Review URL: http://codereview.chromium.org/8163002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications')
-rw-r--r--chrome/browser/notifications/balloon_collection_views.cc (renamed from chrome/browser/notifications/balloon_collection_win.cc)12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/notifications/balloon_collection_win.cc b/chrome/browser/notifications/balloon_collection_views.cc
index 15690a0..3c5e6ac 100644
--- a/chrome/browser/notifications/balloon_collection_win.cc
+++ b/chrome/browser/notifications/balloon_collection_views.cc
@@ -6,7 +6,9 @@
#include "chrome/browser/notifications/balloon.h"
#include "chrome/browser/ui/views/notifications/balloon_view.h"
+#include "ui/base/events.h"
#include "ui/gfx/rect.h"
+#include "ui/gfx/screen.h"
Balloon* BalloonCollectionImpl::MakeBalloon(const Notification& notification,
Profile* profile) {
@@ -39,6 +41,7 @@ base::EventStatus BalloonCollectionImpl::WillProcessEvent(
}
void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) {
+#if defined(OS_WIN)
switch (event.message) {
case WM_MOUSEMOVE:
case WM_MOUSELEAVE:
@@ -46,11 +49,20 @@ void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) {
HandleMouseMoveEvent();
break;
}
+#else
+ NOTIMPLEMENTED();
+#endif
}
bool BalloonCollectionImpl::IsCursorInBalloonCollection() const {
+#if defined(OS_WIN)
DWORD pos = GetMessagePos();
gfx::Point cursor(pos);
+#else
+ // TODO(saintlou): Not sure if this is correct because on Windows at least
+ // the following call is GetCursorPos() not GetMessagePos().
+ gfx::Point cursor = gfx::Screen::GetCursorScreenPoint();
+#endif
return GetBalloonsBoundingBox().Contains(cursor);
}