diff options
author | dimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 04:26:40 +0000 |
---|---|---|
committer | dimich@chromium.org <dimich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 04:26:40 +0000 |
commit | a93e63f51978209ca3bef8e92c3ec11ce162153f (patch) | |
tree | 5b321866bf554c0726100e51dbb2402f72f363e6 /chrome/browser/notifications/desktop_notifications_unittest.cc | |
parent | 7a3adb111a6cd0d35fdca47c8938e78086a5f64a (diff) | |
download | chromium_src-a93e63f51978209ca3bef8e92c3ec11ce162153f.zip chromium_src-a93e63f51978209ca3bef8e92c3ec11ce162153f.tar.gz chromium_src-a93e63f51978209ca3bef8e92c3ec11ce162153f.tar.bz2 |
Add initial plumbing to route Notifications to MessageCenter on Windows.
NotificationUIManager interface now does not expose BallonCollection and any Balloon-related data.
Also it splits the existing NotificationUIManagerImpl into 2 classes:
1. NotificationUIManagerImpl - contains 'wait_queue', where incoming notifications sit while screen is locked or in fullscreen etc, waiting for display.
2. BalloonNotificationUIManager (subclass of NotificationUIManagerImpl) - the BalloonCollection-based display manager, supporting Balloons and related logic. Still used on Win/Mac/Linux and ChromeOS (temporarily).
Also, introduces a new class, MessageCenterBridge (subclass of NotificationUIManager), which is empty in this CL, in next it will delegate the work to MessageCenter instance.
Tests that expect to see BalloonCollection now use BalloonNotificationUIManager::GetInstanceForTest() which logs an error and returns NULL if MessageCenter is used. This should not happen on bots as new code is under a flag.
R=stevenjb@chromium.org
TBR=ben@chromium.org (gypi changes)
Review URL: https://chromiumcodereview.appspot.com/11543011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173645 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/notifications/desktop_notifications_unittest.cc')
-rw-r--r-- | chrome/browser/notifications/desktop_notifications_unittest.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/notifications/desktop_notifications_unittest.cc b/chrome/browser/notifications/desktop_notifications_unittest.cc index 6e5c308..a78b946 100644 --- a/chrome/browser/notifications/desktop_notifications_unittest.cc +++ b/chrome/browser/notifications/desktop_notifications_unittest.cc @@ -6,6 +6,7 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" +#include "chrome/browser/notifications/balloon_notification_ui_manager.h" #include "chrome/browser/notifications/fake_balloon_view.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/common/pref_names.h" @@ -104,9 +105,9 @@ void DesktopNotificationsTest::SetUp() { chrome::RegisterLocalState(&local_state_); profile_.reset(new TestingProfile()); + ui_manager_.reset(new BalloonNotificationUIManager(&local_state_)); balloon_collection_ = new MockBalloonCollection(); - ui_manager_.reset(NotificationUIManager::Create(&local_state_, - balloon_collection_)); + ui_manager_->SetBalloonCollection(balloon_collection_); service_.reset(new DesktopNotificationService(profile(), ui_manager_.get())); log_output_.clear(); } |