Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/notifications/balloon_collection_impl.h" | 5 #include "chrome/browser/notifications/balloon_collection_impl.h" |
| 6 | 6 |
| 7 #include "chrome/browser/notifications/balloon.h" | 7 #include "chrome/browser/notifications/balloon.h" |
| 8 #include "chrome/browser/ui/views/notifications/balloon_view.h" | 8 #include "chrome/browser/ui/views/notifications/balloon_view.h" |
| 9 #include "ui/base/events.h" | 9 #include "ui/base/events.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 42 | 42 |
| 43 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { | 43 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { |
| 44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
| 45 switch (event.message) { | 45 switch (event.message) { |
| 46 case WM_MOUSEMOVE: | 46 case WM_MOUSEMOVE: |
| 47 case WM_MOUSELEAVE: | 47 case WM_MOUSELEAVE: |
| 48 case WM_NCMOUSELEAVE: | 48 case WM_NCMOUSELEAVE: |
| 49 HandleMouseMoveEvent(); | 49 HandleMouseMoveEvent(); |
| 50 break; | 50 break; |
| 51 } | 51 } |
| 52 #elif defined(USE_AURA) | |
|
Ben Goodger (Google)
2011/11/01 16:18:50
You will need to do this first, otherwise it won't
sadrul
2011/11/01 16:21:20
I think the above code is right even on WIN + AURA
Ben Goodger (Google)
2011/11/01 16:30:14
OK, can you note that the OS_WIN code is fine for
sadrul
2011/11/01 17:06:22
Done.
| |
| 53 switch (ui::EventTypeFromNative(event)) { | |
| 54 case ui::ET_MOUSE_MOVED: | |
| 55 case ui::ET_MOUSE_DRAGGED: | |
| 56 case ui::ET_MOUSE_EXITED: | |
| 57 HandleMouseMoveEvent(); | |
| 58 break; | |
| 59 default: | |
| 60 break; | |
| 61 } | |
| 52 #else | 62 #else |
| 53 NOTIMPLEMENTED(); | 63 NOTIMPLEMENTED(); |
| 54 #endif | 64 #endif |
| 55 } | 65 } |
| 56 | 66 |
| 57 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { | 67 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { |
| 58 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
| 59 DWORD pos = GetMessagePos(); | 69 DWORD pos = GetMessagePos(); |
| 60 gfx::Point cursor(pos); | 70 gfx::Point cursor(pos); |
| 61 #else | 71 #else |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 84 else | 94 else |
| 85 NOTREACHED(); | 95 NOTREACHED(); |
| 86 | 96 |
| 87 PositionBalloons(true); | 97 PositionBalloons(true); |
| 88 } | 98 } |
| 89 | 99 |
| 90 // static | 100 // static |
| 91 BalloonCollection* BalloonCollection::Create() { | 101 BalloonCollection* BalloonCollection::Create() { |
| 92 return new BalloonCollectionImpl(); | 102 return new BalloonCollectionImpl(); |
| 93 } | 103 } |
| OLD | NEW |