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/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 } | 26 } |
27 | 27 |
28 int BalloonCollectionImpl::Layout::VerticalEdgeMargin() const { | 28 int BalloonCollectionImpl::Layout::VerticalEdgeMargin() const { |
29 return 0; | 29 return 0; |
30 } | 30 } |
31 | 31 |
32 void BalloonCollectionImpl::PositionBalloons(bool reposition) { | 32 void BalloonCollectionImpl::PositionBalloons(bool reposition) { |
33 PositionBalloonsInternal(reposition); | 33 PositionBalloonsInternal(reposition); |
34 } | 34 } |
35 | 35 |
36 void BalloonCollectionImpl::DidProcessMessage(const MSG& msg) { | 36 base::EventStatus BalloonCollectionImpl::WillProcessEvent( |
37 switch (msg.message) { | 37 const base::NativeEvent& event) { |
| 38 return base::EVENT_CONTINUE; |
| 39 } |
| 40 |
| 41 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { |
| 42 switch (event.message) { |
38 case WM_MOUSEMOVE: | 43 case WM_MOUSEMOVE: |
39 case WM_MOUSELEAVE: | 44 case WM_MOUSELEAVE: |
40 case WM_NCMOUSELEAVE: | 45 case WM_NCMOUSELEAVE: |
41 HandleMouseMoveEvent(); | 46 HandleMouseMoveEvent(); |
42 break; | 47 break; |
43 } | 48 } |
44 } | 49 } |
45 | 50 |
46 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { | 51 bool BalloonCollectionImpl::IsCursorInBalloonCollection() const { |
47 DWORD pos = GetMessagePos(); | 52 DWORD pos = GetMessagePos(); |
(...skipping 19 matching lines...) Expand all Loading... |
67 else | 72 else |
68 NOTREACHED(); | 73 NOTREACHED(); |
69 | 74 |
70 PositionBalloons(true); | 75 PositionBalloons(true); |
71 } | 76 } |
72 | 77 |
73 // static | 78 // static |
74 BalloonCollection* BalloonCollection::Create() { | 79 BalloonCollection* BalloonCollection::Create() { |
75 return new BalloonCollectionImpl(); | 80 return new BalloonCollectionImpl(); |
76 } | 81 } |
OLD | NEW |