diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-01 18:16:56 +0000 |
commit | bfd04a62ce610d7bb61dbb78811dccbed23589b7 (patch) | |
tree | 70bb228c0f00ba1c12c584efd569daccf96b4026 /chrome/browser/automation | |
parent | a814d863440f0a154a7299f2d8b440f405c7700e (diff) | |
download | chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.zip chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.gz chromium_src-bfd04a62ce610d7bb61dbb78811dccbed23589b7.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/automation')
7 files changed, 103 insertions, 89 deletions
diff --git a/chrome/browser/automation/automation_autocomplete_edit_tracker.h b/chrome/browser/automation/automation_autocomplete_edit_tracker.h index 81f0ecd..e6d4cbd 100644 --- a/chrome/browser/automation/automation_autocomplete_edit_tracker.h +++ b/chrome/browser/automation/automation_autocomplete_edit_tracker.h @@ -12,7 +12,7 @@ class AutomationAutocompleteEditTracker: public AutomationResourceTracker<AutocompleteEditView*> { public: explicit AutomationAutocompleteEditTracker(IPC::Message::Sender* automation) - : AutomationResourceTracker(automation) { } + : AutomationResourceTracker(automation) { } virtual ~AutomationAutocompleteEditTracker() { ClearAllMappings(); @@ -20,13 +20,13 @@ class AutomationAutocompleteEditTracker: virtual void AddObserver(AutocompleteEditView* resource) { NotificationService::current()->AddObserver( - this, NOTIFY_AUTOCOMPLETE_EDIT_DESTROYED, + this, NotificationType::AUTOCOMPLETE_EDIT_DESTROYED, Source<AutocompleteEditView>(resource)); } virtual void RemoveObserver(AutocompleteEditView* resource) { NotificationService::current()->RemoveObserver( - this, NOTIFY_AUTOCOMPLETE_EDIT_DESTROYED, + this, NotificationType::AUTOCOMPLETE_EDIT_DESTROYED, Source<AutocompleteEditView>(resource)); } }; diff --git a/chrome/browser/automation/automation_browser_tracker.h b/chrome/browser/automation/automation_browser_tracker.h index a06ae10d..4cbc62b 100644 --- a/chrome/browser/automation/automation_browser_tracker.h +++ b/chrome/browser/automation/automation_browser_tracker.h @@ -13,7 +13,7 @@ class AutomationBrowserTracker : public AutomationResourceTracker<Browser*> { public: AutomationBrowserTracker(IPC::Message::Sender* automation) - : AutomationResourceTracker(automation) { } + : AutomationResourceTracker(automation) { } virtual ~AutomationBrowserTracker() { ClearAllMappings(); @@ -21,12 +21,12 @@ public: virtual void AddObserver(Browser* resource) { NotificationService::current()->AddObserver( - this, NOTIFY_BROWSER_CLOSED, Source<Browser>(resource)); + this, NotificationType::BROWSER_CLOSED, Source<Browser>(resource)); } virtual void RemoveObserver(Browser* resource) { NotificationService::current()->RemoveObserver( - this, NOTIFY_BROWSER_CLOSED, Source<Browser>(resource)); + this, NotificationType::BROWSER_CLOSED, Source<Browser>(resource)); } }; diff --git a/chrome/browser/automation/automation_constrained_window_tracker.h b/chrome/browser/automation/automation_constrained_window_tracker.h index 093fb4f..0986f4a 100644 --- a/chrome/browser/automation/automation_constrained_window_tracker.h +++ b/chrome/browser/automation/automation_constrained_window_tracker.h @@ -14,7 +14,7 @@ class AutomationConstrainedWindowTracker : public AutomationResourceTracker<ConstrainedWindow*> { public: AutomationConstrainedWindowTracker(IPC::Message::Sender* automation) - : AutomationResourceTracker(automation) {} + : AutomationResourceTracker(automation) {} virtual ~AutomationConstrainedWindowTracker() { ClearAllMappings(); @@ -22,12 +22,14 @@ public: virtual void AddObserver(ConstrainedWindow* resource) { NotificationService::current()->AddObserver( - this, NOTIFY_CWINDOW_CLOSED, Source<ConstrainedWindow>(resource)); + this, NotificationType::CWINDOW_CLOSED, + Source<ConstrainedWindow>(resource)); } virtual void RemoveObserver(ConstrainedWindow* resource) { NotificationService::current()->RemoveObserver( - this, NOTIFY_CWINDOW_CLOSED, Source<ConstrainedWindow>(resource)); + this, NotificationType::CWINDOW_CLOSED, + Source<ConstrainedWindow>(resource)); } }; diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 0b52891..a613f78 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -47,9 +47,9 @@ class InitialLoadObserver : public NotificationObserver { automation_(automation) { if (outstanding_tab_count_ > 0) { NotificationService* service = NotificationService::current(); - registrar_.Add(this, NOTIFY_LOAD_START, + registrar_.Add(this, NotificationType::LOAD_START, NotificationService::AllSources()); - registrar_.Add(this, NOTIFY_LOAD_STOP, + registrar_.Add(this, NotificationType::LOAD_STOP, NotificationService::AllSources()); } } @@ -65,10 +65,10 @@ class InitialLoadObserver : public NotificationObserver { virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (type == NOTIFY_LOAD_START) { + if (type == NotificationType::LOAD_START) { if (outstanding_tab_count_ > loading_tabs_.size()) loading_tabs_.insert(source.map_key()); - } else if (type == NOTIFY_LOAD_STOP) { + } else if (type == NotificationType::LOAD_STOP) { if (outstanding_tab_count_ > finished_tabs_.size()) { if (loading_tabs_.find(source.map_key()) != loading_tabs_.end()) finished_tabs_.insert(source.map_key()); @@ -96,9 +96,9 @@ class NewTabUILoadObserver : public NotificationObserver { public: explicit NewTabUILoadObserver(AutomationProvider* automation) : automation_(automation) { - NotificationService::current()-> - AddObserver(this, NOTIFY_INITIAL_NEW_TAB_UI_LOAD, - NotificationService::AllSources()); + NotificationService::current()->AddObserver( + this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, + NotificationService::AllSources()); } ~NewTabUILoadObserver() { @@ -106,15 +106,15 @@ class NewTabUILoadObserver : public NotificationObserver { } void Unregister() { - NotificationService::current()-> - RemoveObserver(this, NOTIFY_INITIAL_NEW_TAB_UI_LOAD, - NotificationService::AllSources()); + NotificationService::current()->RemoveObserver( + this, NotificationType::INITIAL_NEW_TAB_UI_LOAD, + NotificationService::AllSources()); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (type == NOTIFY_INITIAL_NEW_TAB_UI_LOAD) { + if (type == NotificationType::INITIAL_NEW_TAB_UI_LOAD) { Details<int> load_time(details); automation_->Send( new AutomationMsg_InitialNewTabUILoadComplete(0, *load_time.ptr())); @@ -141,7 +141,7 @@ class NavigationControllerRestoredObserver : public NotificationObserver { } else { registered_ = true; NotificationService* service = NotificationService::current(); - service->AddObserver(this, NOTIFY_LOAD_STOP, + service->AddObserver(this, NotificationType::LOAD_STOP, NotificationService::AllSources()); } } @@ -163,7 +163,7 @@ class NavigationControllerRestoredObserver : public NotificationObserver { private: void Unregister() { NotificationService* service = NotificationService::current(); - service->RemoveObserver(this, NOTIFY_LOAD_STOP, + service->RemoveObserver(this, NotificationType::LOAD_STOP, NotificationService::AllSources()); registered_ = false; } @@ -197,15 +197,15 @@ class NavigationNotificationObserver : public NotificationObserver { controller_(controller), navigation_started_(false) { NotificationService* service = NotificationService::current(); - service->AddObserver(this, NOTIFY_NAV_ENTRY_COMMITTED, + service->AddObserver(this, NotificationType::NAV_ENTRY_COMMITTED, Source<NavigationController>(controller_)); - service->AddObserver(this, NOTIFY_LOAD_START, + service->AddObserver(this, NotificationType::LOAD_START, Source<NavigationController>(controller_)); - service->AddObserver(this, NOTIFY_LOAD_STOP, + service->AddObserver(this, NotificationType::LOAD_STOP, Source<NavigationController>(controller_)); - service->AddObserver(this, NOTIFY_AUTH_NEEDED, + service->AddObserver(this, NotificationType::AUTH_NEEDED, Source<NavigationController>(controller_)); - service->AddObserver(this, NOTIFY_AUTH_SUPPLIED, + service->AddObserver(this, NotificationType::AUTH_SUPPLIED, Source<NavigationController>(controller_)); } @@ -226,15 +226,15 @@ class NavigationNotificationObserver : public NotificationObserver { void Unregister() { NotificationService* service = NotificationService::current(); - service->RemoveObserver(this, NOTIFY_NAV_ENTRY_COMMITTED, + service->RemoveObserver(this, NotificationType::NAV_ENTRY_COMMITTED, Source<NavigationController>(controller_)); - service->RemoveObserver(this, NOTIFY_LOAD_START, + service->RemoveObserver(this, NotificationType::LOAD_START, Source<NavigationController>(controller_)); - service->RemoveObserver(this, NOTIFY_LOAD_STOP, + service->RemoveObserver(this, NotificationType::LOAD_STOP, Source<NavigationController>(controller_)); - service->RemoveObserver(this, NOTIFY_AUTH_NEEDED, + service->RemoveObserver(this, NotificationType::AUTH_NEEDED, Source<NavigationController>(controller_)); - service->RemoveObserver(this, NOTIFY_AUTH_SUPPLIED, + service->RemoveObserver(this, NotificationType::AUTH_SUPPLIED, Source<NavigationController>(controller_)); } @@ -246,23 +246,24 @@ class NavigationNotificationObserver : public NotificationObserver { // afer the load has started (but not after the entry was committed, as // WaitForNavigation compares times of the last navigation). // - when this is used with a page requiring authentication, we will not get - // a NOTIFY_NAV_ENTRY_COMMITTED until after we authenticate, so we need the - // NOTIFY_LOAD_START. - if (type == NOTIFY_NAV_ENTRY_COMMITTED || type == NOTIFY_LOAD_START) { + // a NotificationType::NAV_ENTRY_COMMITTED until after we authenticate, so we need the + // NotificationType::LOAD_START. + if (type == NotificationType::NAV_ENTRY_COMMITTED || + type == NotificationType::LOAD_START) { navigation_started_ = true; - } else if (type == NOTIFY_LOAD_STOP) { + } else if (type == NotificationType::LOAD_STOP) { if (navigation_started_) { navigation_started_ = false; ConditionMet(&completed_response_); } - } else if (type == NOTIFY_AUTH_SUPPLIED) { + } else if (type == NotificationType::AUTH_SUPPLIED) { // The LoginHandler for this tab is no longer valid. automation_->RemoveLoginHandler(controller_); // Treat this as if navigation started again, since load start/stop don't // occur while authentication is ongoing. navigation_started_ = true; - } else if (type == NOTIFY_AUTH_NEEDED) { + } else if (type == NotificationType::AUTH_NEEDED) { if (navigation_started_) { // Remember the login handler that wants authentication. LoginHandler* handler = @@ -336,8 +337,8 @@ class TabAppendedNotificationObserver : public TabStripNotificationObserver { public: TabAppendedNotificationObserver(Browser* parent, AutomationProvider* automation, int32 routing_id) - : TabStripNotificationObserver(parent, NOTIFY_TAB_PARENTED, automation, - routing_id) { + : TabStripNotificationObserver(parent, NotificationType::TAB_PARENTED, + automation, routing_id) { } virtual void ObserveTab(NavigationController* controller) { @@ -362,10 +363,10 @@ class TabClosedNotificationObserver : public TabStripNotificationObserver { int32 routing_id, bool wait_until_closed) : TabStripNotificationObserver(parent, - wait_until_closed ? NOTIFY_TAB_CLOSED : - NOTIFY_TAB_CLOSING, - automation, - routing_id) { + wait_until_closed ? NotificationType::TAB_CLOSED : + NotificationType::TAB_CLOSING, + automation, + routing_id) { } virtual void ObserveTab(NavigationController* controller) { @@ -380,14 +381,14 @@ class BrowserClosedNotificationObserver : public NotificationObserver { int32 routing_id) : automation_(automation), routing_id_(routing_id) { - NotificationService::current()-> - AddObserver(this, NOTIFY_BROWSER_CLOSED, Source<Browser>(browser)); + NotificationService::current()->AddObserver(this, + NotificationType::BROWSER_CLOSED, Source<Browser>(browser)); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - DCHECK(type == NOTIFY_BROWSER_CLOSED); + DCHECK(type == NotificationType::BROWSER_CLOSED); Details<bool> close_app(details); automation_->Send( new AutomationMsg_CloseBrowserResponse(routing_id_, @@ -410,9 +411,10 @@ class FindInPageNotificationObserver : public NotificationObserver { parent_tab_(parent_tab), routing_id_(routing_id), active_match_ordinal_(-1) { - NotificationService::current()-> - AddObserver(this, NOTIFY_FIND_RESULT_AVAILABLE, - Source<TabContents>(parent_tab_)); + NotificationService::current()->AddObserver( + this, + NotificationType::FIND_RESULT_AVAILABLE, + Source<TabContents>(parent_tab_)); } ~FindInPageNotificationObserver() { @@ -421,13 +423,13 @@ class FindInPageNotificationObserver : public NotificationObserver { void Unregister() { NotificationService::current()-> - RemoveObserver(this, NOTIFY_FIND_RESULT_AVAILABLE, + RemoveObserver(this, NotificationType::FIND_RESULT_AVAILABLE, Source<TabContents>(parent_tab_)); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (type == NOTIFY_FIND_RESULT_AVAILABLE) { + if (type == NotificationType::FIND_RESULT_AVAILABLE) { Details<FindNotificationDetails> find_details(details); if (find_details->request_id() == kFindInPageRequestId) { // We get multiple responses and one of those will contain the ordinal. @@ -471,19 +473,19 @@ class DomOperationNotificationObserver : public NotificationObserver { explicit DomOperationNotificationObserver(AutomationProvider* automation) : automation_(automation) { NotificationService::current()-> - AddObserver(this, NOTIFY_DOM_OPERATION_RESPONSE, + AddObserver(this, NotificationType::DOM_OPERATION_RESPONSE, NotificationService::AllSources()); } ~DomOperationNotificationObserver() { NotificationService::current()-> - RemoveObserver(this, NOTIFY_DOM_OPERATION_RESPONSE, + RemoveObserver(this, NotificationType::DOM_OPERATION_RESPONSE, NotificationService::AllSources()); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (NOTIFY_DOM_OPERATION_RESPONSE == type) { + if (NotificationType::DOM_OPERATION_RESPONSE == type) { Details<DomOperationNotificationDetails> dom_op_details(details); automation_->Send(new AutomationMsg_DomOperationResponse( dom_op_details->automation_id(), @@ -498,20 +500,22 @@ class DomInspectorNotificationObserver : public NotificationObserver { public: explicit DomInspectorNotificationObserver(AutomationProvider* automation) : automation_(automation) { - NotificationService::current()-> - AddObserver(this, NOTIFY_DOM_INSPECT_ELEMENT_RESPONSE, - NotificationService::AllSources()); + NotificationService::current()->AddObserver( + this, + NotificationType::DOM_INSPECT_ELEMENT_RESPONSE, + NotificationService::AllSources()); } ~DomInspectorNotificationObserver() { - NotificationService::current()-> - RemoveObserver(this, NOTIFY_DOM_INSPECT_ELEMENT_RESPONSE, - NotificationService::AllSources()); + NotificationService::current()->RemoveObserver( + this, + NotificationType::DOM_INSPECT_ELEMENT_RESPONSE, + NotificationService::AllSources()); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - if (NOTIFY_DOM_INSPECT_ELEMENT_RESPONSE == type) { + if (NotificationType::DOM_INSPECT_ELEMENT_RESPONSE == type) { Details<int> dom_inspect_details(details); automation_->ReceivedInspectElementResponse(*(dom_inspect_details.ptr())); } @@ -528,24 +532,26 @@ class DocumentPrintedNotificationObserver : public NotificationObserver { : automation_(automation), routing_id_(routing_id), success_(false) { - NotificationService::current()-> - AddObserver(this, NOTIFY_PRINT_JOB_EVENT, - NotificationService::AllSources()); + NotificationService::current()->AddObserver( + this, + NotificationType::PRINT_JOB_EVENT, + NotificationService::AllSources()); } ~DocumentPrintedNotificationObserver() { automation_->Send( new AutomationMsg_PrintNowResponse(routing_id_, success_)); automation_->RemoveNavigationStatusListener(this); - NotificationService::current()-> - RemoveObserver(this, NOTIFY_PRINT_JOB_EVENT, - NotificationService::AllSources()); + NotificationService::current()->RemoveObserver( + this, + NotificationType::PRINT_JOB_EVENT, + NotificationService::AllSources()); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { using namespace printing; - DCHECK(type == NOTIFY_PRINT_JOB_EVENT); + DCHECK(type == NotificationType::PRINT_JOB_EVENT); switch (Details<JobEventDetails>(details)->type()) { case JobEventDetails::JOB_DONE: { // Succeeded. @@ -2381,12 +2387,16 @@ WebContents* AutomationProvider::GetWebContentsForHandle( TestingAutomationProvider::TestingAutomationProvider(Profile* profile) : AutomationProvider(profile) { BrowserList::AddObserver(this); - NotificationService::current()->AddObserver(this, NOTIFY_SESSION_END, + NotificationService::current()->AddObserver( + this, + NotificationType::SESSION_END, NotificationService::AllSources()); } TestingAutomationProvider::~TestingAutomationProvider() { - NotificationService::current()->RemoveObserver(this, NOTIFY_SESSION_END, + NotificationService::current()->RemoveObserver( + this, + NotificationType::SESSION_END, NotificationService::AllSources()); BrowserList::RemoveObserver(this); } @@ -2401,7 +2411,7 @@ void TestingAutomationProvider::OnBrowserRemoving(const Browser* browser) { // want the automation provider (and hence the process) to go away when the // last browser goes away. if (BrowserList::size() == 1) { - // If you change this, update Observer for NOTIFY_SESSION_END below. + // If you change this, update Observer for NotificationType::SESSION_END below. MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); } @@ -2410,7 +2420,7 @@ void TestingAutomationProvider::OnBrowserRemoving(const Browser* browser) { void TestingAutomationProvider::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - DCHECK(type == NOTIFY_SESSION_END); + DCHECK(type == NotificationType::SESSION_END); // OnBrowserRemoving does a ReleaseLater. When session end is received we exit // before the task runs resulting in this object not being deleted. This // Release balance out the Release scheduled by OnBrowserRemoving. diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 841bfce..d36fa34 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -24,7 +24,7 @@ #include "chrome/browser/history/history.h" #include "chrome/common/ipc_channel_proxy.h" #include "chrome/common/ipc_message.h" -#include "chrome/common/notification_service.h" +#include "chrome/common/notification_observer.h" #include "chrome/views/event.h" class LoginHandler; @@ -443,4 +443,5 @@ class TestingAutomationProvider : public AutomationProvider, void OnRemoveProvider(); // Called via PostTask }; + #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ diff --git a/chrome/browser/automation/automation_tab_tracker.h b/chrome/browser/automation/automation_tab_tracker.h index a221ae4..d119915 100644 --- a/chrome/browser/automation/automation_tab_tracker.h +++ b/chrome/browser/automation/automation_tab_tracker.h @@ -10,12 +10,13 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/tab_contents/navigation_controller.h" #include "chrome/common/notification_registrar.h" +#include "chrome/common/notification_type.h" class AutomationTabTracker : public AutomationResourceTracker<NavigationController*> { public: AutomationTabTracker(IPC::Message::Sender* automation) - : AutomationResourceTracker(automation) {} + : AutomationResourceTracker(automation) {} virtual ~AutomationTabTracker() { ClearAllMappings(); @@ -24,35 +25,35 @@ public: virtual void AddObserver(NavigationController* resource) { // This tab could either be a regular tab or an external tab // Register for both notifications. - registrar_.Add(this, NOTIFY_TAB_CLOSING, + registrar_.Add(this, NotificationType::TAB_CLOSING, Source<NavigationController>(resource)); - registrar_.Add(this, NOTIFY_EXTERNAL_TAB_CLOSED, + registrar_.Add(this, NotificationType::EXTERNAL_TAB_CLOSED, Source<NavigationController>(resource)); // We also want to know about navigations so we can keep track of the last // navigation time. - registrar_.Add(this, NOTIFY_NAV_ENTRY_COMMITTED, + registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED, Source<NavigationController>(resource)); } virtual void RemoveObserver(NavigationController* resource) { - registrar_.Remove(this, NOTIFY_TAB_CLOSING, + registrar_.Remove(this, NotificationType::TAB_CLOSING, Source<NavigationController>(resource)); - registrar_.Remove(this, NOTIFY_EXTERNAL_TAB_CLOSED, + registrar_.Remove(this, NotificationType::EXTERNAL_TAB_CLOSED, Source<NavigationController>(resource)); - registrar_.Remove(this, NOTIFY_NAV_ENTRY_COMMITTED, + registrar_.Remove(this, NotificationType::NAV_ENTRY_COMMITTED, Source<NavigationController>(resource)); } virtual void Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { - switch (type) { - case NOTIFY_NAV_ENTRY_COMMITTED: + switch (type.value) { + case NotificationType::NAV_ENTRY_COMMITTED: last_navigation_times_[Source<NavigationController>(source).ptr()] = base::Time::Now(); return; - case NOTIFY_EXTERNAL_TAB_CLOSED: - case NOTIFY_TAB_CLOSING: + case NotificationType::EXTERNAL_TAB_CLOSED: + case NotificationType::TAB_CLOSING: std::map<NavigationController*, base::Time>::iterator iter = last_navigation_times_.find( Source<NavigationController>(source).ptr()); diff --git a/chrome/browser/automation/automation_window_tracker.h b/chrome/browser/automation/automation_window_tracker.h index 32ecead..9d95e5d 100644 --- a/chrome/browser/automation/automation_window_tracker.h +++ b/chrome/browser/automation/automation_window_tracker.h @@ -11,20 +11,20 @@ class AutomationWindowTracker : public AutomationResourceTracker<HWND> { public: - AutomationWindowTracker(IPC::Message::Sender* automation) : - AutomationResourceTracker(automation) { } + AutomationWindowTracker(IPC::Message::Sender* automation) + : AutomationResourceTracker(automation) { } virtual ~AutomationWindowTracker() { ClearAllMappings(); } virtual void AddObserver(HWND resource) { NotificationService::current()->AddObserver( - this, NOTIFY_WINDOW_CLOSED, Source<HWND>(resource)); + this, NotificationType::WINDOW_CLOSED, Source<HWND>(resource)); } virtual void RemoveObserver(HWND resource) { NotificationService::current()->RemoveObserver( - this, NOTIFY_WINDOW_CLOSED, Source<HWND>(resource)); + this, NotificationType::WINDOW_CLOSED, Source<HWND>(resource)); } }; |