summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/notification_object_proxy.h
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 17:40:31 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 17:40:31 +0000
commit8b7135d6aa44d68307bfb7ff5e6441fcf1c5231b (patch)
tree39f24246b28900218dded1cfe462ebe400ee3a6d /chrome/browser/notifications/notification_object_proxy.h
parent4a3dab23cadf0cbe68bd82c06fd970ae8b1d7e10 (diff)
downloadchromium_src-8b7135d6aa44d68307bfb7ff5e6441fcf1c5231b.zip
chromium_src-8b7135d6aa44d68307bfb7ff5e6441fcf1c5231b.tar.gz
chromium_src-8b7135d6aa44d68307bfb7ff5e6441fcf1c5231b.tar.bz2
Unit tests for desktop notifications.
* Allow non-windows BalloonCollections to create non-viewable balloons (so that non-viewing aspects are cross-platform testable) * Makes NotificationObjectProxy overridable by a mock object which logs instead of calls to JS * Move Layout code from private to protected in BalloonCollection to enable verification of position code. BUG=none TEST=these Review URL: http://codereview.chromium.org/371041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/notification_object_proxy.h')
-rw-r--r--chrome/browser/notifications/notification_object_proxy.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/notifications/notification_object_proxy.h b/chrome/browser/notifications/notification_object_proxy.h
index ff71bc3..1ff17aa 100644
--- a/chrome/browser/notifications/notification_object_proxy.h
+++ b/chrome/browser/notifications/notification_object_proxy.h
@@ -24,15 +24,15 @@ class NotificationObjectProxy :
int notification_id, bool worker);
// To be called when the desktop notification is actually shown.
- void Display();
+ virtual void Display();
// To be called when the desktop notification cannot be shown due to an
// error.
- void Error();
+ virtual void Error();
// To be called when the desktop notification is closed. If closed by a
// user explicitly (as opposed to timeout/script), |by_user| should be true.
- void Close(bool by_user);
+ virtual void Close(bool by_user);
// Compares two proxies by ids to decide if they are equal.
bool IsSame(const NotificationObjectProxy& other) const {
@@ -42,11 +42,12 @@ class NotificationObjectProxy :
worker_ == other.worker_);
}
- private:
+ protected:
friend class base::RefCountedThreadSafe<NotificationObjectProxy>;
- ~NotificationObjectProxy() {}
+ virtual ~NotificationObjectProxy() {}
+ private:
// Called on UI thread to schedule a message for sending.
void DeliverMessage(IPC::Message* message);