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