| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_BALLOON_VIEW_BRIDGE_H_ | |
| 6 #define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_BALLOON_VIEW_BRIDGE_H_ | |
| 7 | |
| 8 #include "chrome/browser/notifications/balloon.h" | |
| 9 | |
| 10 @class BalloonController; | |
| 11 class BalloonHost; | |
| 12 namespace gfx { | |
| 13 class Size; | |
| 14 } | |
| 15 | |
| 16 // Bridges from the cross-platform BalloonView interface to the Cocoa | |
| 17 // controller which will draw the view on screen. | |
| 18 class BalloonViewBridge : public BalloonView { | |
| 19 public: | |
| 20 BalloonViewBridge(); | |
| 21 virtual ~BalloonViewBridge(); | |
| 22 | |
| 23 // BalloonView interface. | |
| 24 virtual void Show(Balloon* balloon) OVERRIDE; | |
| 25 virtual void Update() OVERRIDE; | |
| 26 virtual void RepositionToBalloon() OVERRIDE; | |
| 27 virtual void Close(bool by_user) OVERRIDE; | |
| 28 virtual gfx::Size GetSize() const OVERRIDE; | |
| 29 virtual BalloonHost* GetHost() const OVERRIDE; | |
| 30 | |
| 31 private: | |
| 32 // Weak pointer to the balloon controller which manages the UI. | |
| 33 // This object cleans itself up when its windows close. | |
| 34 BalloonController* controller_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(BalloonViewBridge); | |
| 37 }; | |
| 38 | |
| 39 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_BALLOON_VIEW_BRIDGE_H_ | |
| OLD | NEW |