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.
5 #ifndef CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_BALLOON_VIEW_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_BALLOON_VIEW_BRIDGE_H_
8 #include "chrome/browser/notifications/balloon.h"
10 @
class BalloonController
;
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
{
21 virtual ~BalloonViewBridge();
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
;
32 // Weak pointer to the balloon controller which manages the UI.
33 // This object cleans itself up when its windows close.
34 BalloonController
* controller_
;
36 DISALLOW_COPY_AND_ASSIGN(BalloonViewBridge
);
39 #endif // CHROME_BROWSER_UI_COCOA_NOTIFICATIONS_BALLOON_VIEW_BRIDGE_H_