From bfd04a62ce610d7bb61dbb78811dccbed23589b7 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Sun, 1 Feb 2009 18:16:56 +0000 Subject: Remove most header file dependencies on the notification type list. It is really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/view_unittest.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'chrome/views/view_unittest.cc') diff --git a/chrome/views/view_unittest.cc b/chrome/views/view_unittest.cc index 48499a3..0b4ac94 100644 --- a/chrome/views/view_unittest.cc +++ b/chrome/views/view_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/common/gfx/chrome_canvas.h" #include "chrome/common/gfx/path.h" +#include "chrome/common/notification_service.h" #include "chrome/views/background.h" #include "chrome/views/checkbox.h" #include "chrome/views/dialog_delegate.h" @@ -427,7 +428,7 @@ public: void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - ASSERT_TRUE(type == NOTIFY_VIEW_REMOVED); + ASSERT_TRUE(type == NotificationType::VIEW_REMOVED); removed_views_.push_back(Source(source).ptr()); } @@ -444,7 +445,9 @@ TEST_F(ViewTest, RemoveNotification) { scoped_ptr observer(new RemoveViewObserver); NotificationService::current()->AddObserver( - observer.get(), NOTIFY_VIEW_REMOVED, NotificationService::AllSources()); + observer.get(), + NotificationType::VIEW_REMOVED, + NotificationService::AllSources()); views::WidgetWin* window = new views::WidgetWin; views::RootView* root_view = window->GetRootView(); @@ -506,7 +509,7 @@ TEST_F(ViewTest, RemoveNotification) { observer->WasRemoved(v111) && observer->WasRemoved(v112)); NotificationService::current()->RemoveObserver(observer.get(), - NOTIFY_VIEW_REMOVED, NotificationService::AllSources()); + NotificationType::VIEW_REMOVED, NotificationService::AllSources()); } namespace { -- cgit v1.1