diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
commit | ad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch) | |
tree | 3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome/browser/translate | |
parent | 75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff) | |
download | chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2 |
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716
Review URL: http://codereview.chromium.org/8342048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/translate')
-rw-r--r-- | chrome/browser/translate/translate_manager.cc | 8 | ||||
-rw-r--r-- | chrome/browser/translate/translate_tab_helper.cc | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc index a3ab0e1..a57972f 100644 --- a/chrome/browser/translate/translate_manager.cc +++ b/chrome/browser/translate/translate_manager.cc @@ -39,7 +39,7 @@ #include "content/browser/tab_contents/navigation_details.h" #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" @@ -445,12 +445,12 @@ TranslateManager::TranslateManager() : ALLOW_THIS_IN_INITIALIZER_LIST(weak_method_factory_(this)), translate_script_expiration_delay_(kTranslateScriptExpirationDelayMS) { notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); notification_registrar_.Add(this, chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); notification_registrar_.Add(this, chrome::NOTIFICATION_PAGE_TRANSLATED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } void TranslateManager::InitiateTranslation(TabContents* tab, diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc index ced575a..81e6ad1 100644 --- a/chrome/browser/translate/translate_tab_helper.cc +++ b/chrome/browser/translate/translate_tab_helper.cc @@ -8,7 +8,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/render_messages.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" TranslateTabHelper::TranslateTabHelper(TabContents* tab_contents) : TabContentsObserver(tab_contents), @@ -42,7 +42,7 @@ void TranslateTabHelper::OnLanguageDetermined(const std::string& language, language_state_.LanguageDetermined(language, page_translatable); std::string lang = language; - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_LANGUAGE_DETERMINED, content::Source<TabContents>(tab_contents()), content::Details<std::string>(&lang)); @@ -55,7 +55,7 @@ void TranslateTabHelper::OnPageTranslated(int32 page_id, language_state_.set_current_language(translated_lang); language_state_.set_translation_pending(false); PageTranslatedDetails details(original_lang, translated_lang, error_type); - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_PAGE_TRANSLATED, content::Source<TabContents>(tab_contents()), content::Details<PageTranslatedDetails>(&details)); |