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

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

Issue 10831155: notifications: Refactor MockBalloonView into FakeBalloonView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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) 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
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_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/fake_balloon_view.cc ('k') | chrome/browser/notifications/notification_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698