OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_views.h" | 8 #include "chrome/browser/ui/views/notifications/balloon_view_views.h" |
9 #include "ui/events/event_constants.h" | 9 #include "ui/events/event_constants.h" |
10 #include "ui/events/event_utils.h" | 10 #include "ui/events/event_utils.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 bool BalloonCollectionImpl::Layout::NeedToMoveAboveRightSidePanels() const { | 39 bool BalloonCollectionImpl::Layout::NeedToMoveAboveRightSidePanels() const { |
40 return placement_ == VERTICALLY_FROM_BOTTOM_RIGHT; | 40 return placement_ == VERTICALLY_FROM_BOTTOM_RIGHT; |
41 } | 41 } |
42 | 42 |
43 void BalloonCollectionImpl::PositionBalloons(bool reposition) { | 43 void BalloonCollectionImpl::PositionBalloons(bool reposition) { |
44 PositionBalloonsInternal(reposition); | 44 PositionBalloonsInternal(reposition); |
45 } | 45 } |
46 | 46 |
47 base::EventStatus BalloonCollectionImpl::WillProcessEvent( | 47 void BalloonCollectionImpl::WillProcessEvent(const base::NativeEvent& event) {} |
48 const base::NativeEvent& event) { | |
49 return base::EVENT_CONTINUE; | |
50 } | |
51 | 48 |
52 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { | 49 void BalloonCollectionImpl::DidProcessEvent(const base::NativeEvent& event) { |
53 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
54 switch (event.message) { | 51 switch (event.message) { |
55 case WM_MOUSEMOVE: | 52 case WM_MOUSEMOVE: |
56 case WM_MOUSELEAVE: | 53 case WM_MOUSELEAVE: |
57 case WM_NCMOUSELEAVE: | 54 case WM_NCMOUSELEAVE: |
58 HandleMouseMoveEvent(); | 55 HandleMouseMoveEvent(); |
59 break; | 56 break; |
60 } | 57 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 NOTREACHED(); | 103 NOTREACHED(); |
107 | 104 |
108 layout_.ComputeOffsetToMoveAbovePanels(); | 105 layout_.ComputeOffsetToMoveAbovePanels(); |
109 PositionBalloons(true); | 106 PositionBalloons(true); |
110 } | 107 } |
111 | 108 |
112 // static | 109 // static |
113 BalloonCollection* BalloonCollection::Create() { | 110 BalloonCollection* BalloonCollection::Create() { |
114 return new BalloonCollectionImpl(); | 111 return new BalloonCollectionImpl(); |
115 } | 112 } |
OLD | NEW |