| 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 // Handles the visible notification (or balloons). | 5 // Handles the visible notification (or balloons). |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
| 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 virtual void RemoveAll(); | 47 virtual void RemoveAll(); |
| 48 virtual bool HasSpace() const; | 48 virtual bool HasSpace() const; |
| 49 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size); | 49 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size); |
| 50 virtual void SetPositionPreference(PositionPreference position); | 50 virtual void SetPositionPreference(PositionPreference position); |
| 51 virtual void DisplayChanged(); | 51 virtual void DisplayChanged(); |
| 52 virtual void OnBalloonClosed(Balloon* source); | 52 virtual void OnBalloonClosed(Balloon* source); |
| 53 virtual const Balloons& GetActiveBalloons(); | 53 virtual const Balloons& GetActiveBalloons(); |
| 54 | 54 |
| 55 // MessageLoopForUI::Observer interface. | 55 // MessageLoopForUI::Observer interface. |
| 56 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
| 57 virtual void WillProcessMessage(const MSG& event) {} | 57 virtual base::EventStatus WillProcessEvent(const MSG& event) OVERRIDE { |
| 58 virtual void DidProcessMessage(const MSG& event); | 58 return base::EVENT_CONTINUE; |
| 59 #endif | 59 } |
| 60 #if defined(TOOLKIT_USES_GTK) | 60 virtual void DidProcessEvent(const MSG& event) OVERRIDE; |
| 61 virtual void WillProcessEvent(GdkEvent* event) {} | 61 #elif defined(TOUCH_UI) || defined(USE_AURA) |
| 62 virtual void DidProcessEvent(GdkEvent* event); | 62 virtual base::EventStatus WillProcessEvent( |
| 63 const base::NativeEvent& event) OVERRIDE { |
| 64 return base::EVENT_CONTINUE; |
| 65 } |
| 66 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; |
| 67 #elif defined(TOOLKIT_USES_GTK) |
| 68 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {} |
| 69 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; |
| 63 #endif | 70 #endif |
| 64 | 71 |
| 65 protected: | 72 protected: |
| 66 // Calculates layout values for the balloons including | 73 // Calculates layout values for the balloons including |
| 67 // the scaling, the max/min sizes, and the upper left corner of each. | 74 // the scaling, the max/min sizes, and the upper left corner of each. |
| 68 class Layout { | 75 class Layout { |
| 69 public: | 76 public: |
| 70 Layout(); | 77 Layout(); |
| 71 | 78 |
| 72 // These enumerations all are based on a screen orientation where | 79 // These enumerations all are based on a screen orientation where |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ScopedRunnableMethodFactory<BalloonCollectionImpl> reposition_factory_; | 194 ScopedRunnableMethodFactory<BalloonCollectionImpl> reposition_factory_; |
| 188 | 195 |
| 189 // Is the balloon collection currently listening for UI events? | 196 // Is the balloon collection currently listening for UI events? |
| 190 bool added_as_message_loop_observer_; | 197 bool added_as_message_loop_observer_; |
| 191 #endif | 198 #endif |
| 192 | 199 |
| 193 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); | 200 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); |
| 194 }; | 201 }; |
| 195 | 202 |
| 196 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 203 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
| OLD | NEW |