1 // Copyright (c) 2012 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_NOTIFICATIONS_FAKE_BALLOON_VIEW_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_FAKE_BALLOON_VIEW_H_ 7 8 #include "base/basictypes.h" 9 #include "base/compiler_specific.h" 10 #include "chrome/browser/notifications/balloon.h" 11 12 // Test version of a balloon view which doesn't do anything viewable, but does 13 // know how to close itself the same as a regular BalloonView. 14 class FakeBalloonView : public BalloonView { 15 public: 16 explicit FakeBalloonView(Balloon* balloon); 17 virtual ~FakeBalloonView(); 18 19 private: 20 // Overridden from BalloonView: 21 virtual void Show(Balloon* balloon) OVERRIDE; 22 virtual void Update() OVERRIDE; 23 virtual void RepositionToBalloon() OVERRIDE; 24 virtual void Close(bool by_user) OVERRIDE; 25 virtual gfx::Size GetSize() const OVERRIDE; 26 virtual BalloonHost* GetHost() const OVERRIDE; 27 28 // Non-owned pointer. 29 Balloon* balloon_; 30 31 DISALLOW_COPY_AND_ASSIGN(FakeBalloonView); 32 }; 33 34 #endif // CHROME_BROWSER_NOTIFICATIONS_FAKE_BALLOON_VIEW_H_ 35