OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/notifications/notification_object_proxy.h" | 10 #include "chrome/browser/notifications/notification_object_proxy.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE { | 68 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE { |
69 return NULL; | 69 return NULL; |
70 } | 70 } |
71 | 71 |
72 private: | 72 private: |
73 std::string notification_id_; | 73 std::string notification_id_; |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(LoggingNotificationDelegate); | 75 DISALLOW_COPY_AND_ASSIGN(LoggingNotificationDelegate); |
76 }; | 76 }; |
77 | 77 |
78 // Test version of a balloon view which doesn't do anything | |
79 // viewable, but does know how to close itself the same as a regular | |
80 // BalloonView. | |
81 class MockBalloonView : public BalloonView { | |
82 public: | |
83 explicit MockBalloonView(Balloon * balloon) : | |
84 balloon_(balloon) {} | |
85 | |
86 // BalloonView: | |
87 virtual void Show(Balloon* balloon) OVERRIDE {} | |
88 virtual void Update() OVERRIDE {} | |
89 virtual void RepositionToBalloon() OVERRIDE {} | |
90 virtual void Close(bool by_user) OVERRIDE; | |
91 virtual gfx::Size GetSize() const OVERRIDE; | |
92 virtual BalloonHost* GetHost() const OVERRIDE; | |
93 | |
94 private: | |
95 // Non-owned pointer. | |
96 Balloon* balloon_; | |
97 }; | |
98 | |
99 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ | 78 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_TEST_UTIL_H_ |
OLD | NEW |