Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/notifications/balloon_collection_impl.h

Issue 8021009: Consolidate message observer API for win and aura (and touch). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed msw's comments Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual bool RemoveBySourceOrigin(const GURL& source_origin); 46 virtual bool RemoveBySourceOrigin(const GURL& source_origin);
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) || defined(TOUCH_UI) || defined(USE_AURA)
57 virtual void WillProcessMessage(const MSG& event) {} 57 virtual base::EventStatus WillProcessEvent(
58 virtual void DidProcessMessage(const MSG& event); 58 const base::NativeEvent& event) OVERRIDE;
59 #endif 59 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
60 #if defined(TOOLKIT_USES_GTK) 60 #elif defined(TOOLKIT_USES_GTK)
61 virtual void WillProcessEvent(GdkEvent* event) {} 61 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE;
62 virtual void DidProcessEvent(GdkEvent* event); 62 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE;
63 #endif 63 #endif
64 64
65 protected: 65 protected:
66 // Calculates layout values for the balloons including 66 // Calculates layout values for the balloons including
67 // the scaling, the max/min sizes, and the upper left corner of each. 67 // the scaling, the max/min sizes, and the upper left corner of each.
68 class Layout { 68 class Layout {
69 public: 69 public:
70 Layout(); 70 Layout();
71 71
72 // These enumerations all are based on a screen orientation where 72 // These enumerations all are based on a screen orientation where
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 ScopedRunnableMethodFactory<BalloonCollectionImpl> reposition_factory_; 187 ScopedRunnableMethodFactory<BalloonCollectionImpl> reposition_factory_;
188 188
189 // Is the balloon collection currently listening for UI events? 189 // Is the balloon collection currently listening for UI events?
190 bool added_as_message_loop_observer_; 190 bool added_as_message_loop_observer_;
191 #endif 191 #endif
192 192
193 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); 193 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl);
194 }; 194 };
195 195
196 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ 196 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698