diff options
Diffstat (limited to 'chrome/browser/chromeos')
60 files changed, 295 insertions, 286 deletions
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc index d1dea1d..76d92b4 100644 --- a/chrome/browser/chromeos/boot_times_loader.cc +++ b/chrome/browser/chromeos/boot_times_loader.cc @@ -430,11 +430,11 @@ void BootTimesLoader::AddLogoutTimeMarker( void BootTimesLoader::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case chrome::NOTIFICATION_LOGIN_AUTHENTICATION: { - Details<AuthenticationNotificationDetails> auth_details(details); + content::Details<AuthenticationNotificationDetails> auth_details(details); if (auth_details->success()) { AddLoginTimeMarker("Authenticate", true); RecordCurrentStats(kLoginSuccess); @@ -444,7 +444,8 @@ void BootTimesLoader::Observe( break; } case content::NOTIFICATION_LOAD_START: { - NavigationController* tab = Source<NavigationController>(source).ptr(); + NavigationController* tab = + content::Source<NavigationController>(source).ptr(); RenderWidgetHost* rwh = GetRenderWidgetHost(tab); DCHECK(rwh); AddLoginTimeMarker("TabLoad-Start: " + GetTabUrl(rwh), false); @@ -452,7 +453,8 @@ void BootTimesLoader::Observe( break; } case content::NOTIFICATION_LOAD_STOP: { - NavigationController* tab = Source<NavigationController>(source).ptr(); + NavigationController* tab = + content::Source<NavigationController>(source).ptr(); RenderWidgetHost* rwh = GetRenderWidgetHost(tab); if (render_widget_hosts_loading_.find(rwh) != render_widget_hosts_loading_.end()) { @@ -461,7 +463,7 @@ void BootTimesLoader::Observe( break; } case content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT: { - RenderWidgetHost* rwh = Source<RenderWidgetHost>(source).ptr(); + RenderWidgetHost* rwh = content::Source<RenderWidgetHost>(source).ptr(); if (render_widget_hosts_loading_.find(rwh) != render_widget_hosts_loading_.end()) { AddLoginTimeMarker("TabPaint: " + GetTabUrl(rwh), false); @@ -470,7 +472,7 @@ void BootTimesLoader::Observe( break; } case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: { - TabContents* tab_contents = Source<TabContents>(source).ptr(); + TabContents* tab_contents = content::Source<TabContents>(source).ptr(); RenderWidgetHost* render_widget_host = GetRenderWidgetHost(&tab_contents->controller()); render_widget_hosts_loading_.erase(render_widget_host); diff --git a/chrome/browser/chromeos/boot_times_loader.h b/chrome/browser/chromeos/boot_times_loader.h index 7bffef8..dfd73d2 100644 --- a/chrome/browser/chromeos/boot_times_loader.h +++ b/chrome/browser/chromeos/boot_times_loader.h @@ -14,8 +14,8 @@ #include "base/time.h" #include "content/browser/cancelable_request.h" #include "content/browser/renderer_host/render_widget_host.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" namespace chromeos { @@ -32,7 +32,7 @@ namespace chromeos { // . When you want the version invoke: loader.GetBootTimes(&consumer, callback); class BootTimesLoader : public CancelableRequestProvider, - public NotificationObserver { + public content::NotificationObserver { public: BootTimesLoader(); virtual ~BootTimesLoader(); @@ -102,10 +102,10 @@ class BootTimesLoader // previous login attempt times. void RecordLoginAttempted(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Writes the logout times to a /tmp/logout-times-sent. Unlike login // times, we manually call this function for logout times, as we cannot @@ -166,7 +166,7 @@ class BootTimesLoader scoped_refptr<Backend> backend_; // Used to track notifications for login. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; base::AtomicSequenceNumber num_tabs_; bool have_registered_; diff --git a/chrome/browser/chromeos/cros_settings.h b/chrome/browser/chromeos/cros_settings.h index cc15f2f..660c447 100644 --- a/chrome/browser/chromeos/cros_settings.h +++ b/chrome/browser/chromeos/cros_settings.h @@ -14,7 +14,7 @@ #include "base/observer_list.h" #include "base/threading/non_thread_safe.h" #include "chrome/browser/chromeos/cros_settings_names.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" namespace base { template <typename T> struct DefaultLazyInstanceTraits; @@ -66,8 +66,10 @@ class CrosSettings : public base::NonThreadSafe { // If the pref at the given path changes, we call the observer's Observe // method with PREF_CHANGED. - void AddSettingsObserver(const char* path, NotificationObserver* obs); - void RemoveSettingsObserver(const char* path, NotificationObserver* obs); + void AddSettingsObserver(const char* path, + content::NotificationObserver* obs); + void RemoveSettingsObserver(const char* path, + content::NotificationObserver* obs); // Returns the provider that handles settings with the path or prefix. CrosSettingsProvider* GetProvider(const std::string& path) const; @@ -78,7 +80,7 @@ class CrosSettings : public base::NonThreadSafe { // A map from settings names to a list of observers. Observers get fired in // the order they are added. - typedef ObserverList<NotificationObserver> NotificationObserverList; + typedef ObserverList<content::NotificationObserver> NotificationObserverList; typedef base::hash_map<std::string, NotificationObserverList*> SettingsObserverMap; SettingsObserverMap settings_observers_; diff --git a/chrome/browser/chromeos/enterprise_extension_observer.cc b/chrome/browser/chromeos/enterprise_extension_observer.cc index 32f1c82..2de2806 100644 --- a/chrome/browser/chromeos/enterprise_extension_observer.cc +++ b/chrome/browser/chromeos/enterprise_extension_observer.cc @@ -19,18 +19,19 @@ EnterpriseExtensionObserver::EnterpriseExtensionObserver(Profile* profile) DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, - Source<Profile>(profile_)); + content::Source<Profile>(profile_)); } -void EnterpriseExtensionObserver::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void EnterpriseExtensionObserver::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(type == chrome::NOTIFICATION_EXTENSION_INSTALLED); - if (Source<Profile>(source).ptr() != profile_) { + if (content::Source<Profile>(source).ptr() != profile_) { return; } - Extension* extension = Details<Extension>(details).ptr(); + Extension* extension = content::Details<Extension>(details).ptr(); if (extension->location() != Extension::EXTERNAL_POLICY_DOWNLOAD) { return; } diff --git a/chrome/browser/chromeos/frame/layout_mode_button.h b/chrome/browser/chromeos/frame/layout_mode_button.h index 82248a9..0d26c62 100644 --- a/chrome/browser/chromeos/frame/layout_mode_button.h +++ b/chrome/browser/chromeos/frame/layout_mode_button.h @@ -7,20 +7,17 @@ #pragma once #include "base/basictypes.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "views/controls/button/button.h" #include "views/controls/button/image_button.h" -class NotificationDetails; -class NotificationSource; - namespace chromeos { // Maximize/restore button in the corner of each browser window. class LayoutModeButton : public views::ImageButton, public views::ButtonListener, - public NotificationObserver { + public content::NotificationObserver { public: LayoutModeButton(); virtual ~LayoutModeButton(); @@ -29,10 +26,10 @@ class LayoutModeButton : public views::ImageButton, virtual gfx::Size GetPreferredSize() OVERRIDE; virtual bool HitTest(const gfx::Point& l) const OVERRIDE; - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; void Init(); @@ -45,7 +42,7 @@ class LayoutModeButton : public views::ImageButton, void UpdateForCurrentLayoutMode(); // A registrar for subscribing to LAYOUT_MODE_CHANGED notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(LayoutModeButton); }; diff --git a/chrome/browser/chromeos/frame/panel_controller.cc b/chrome/browser/chromeos/frame/panel_controller.cc index 174d67a..8ddd9e1 100644 --- a/chrome/browser/chromeos/frame/panel_controller.cc +++ b/chrome/browser/chromeos/frame/panel_controller.cc @@ -398,8 +398,8 @@ bool PanelController::PanelClientEvent(GdkEventClient* event) { State state = new_state ? EXPANDED : MINIMIZED; NotificationService::current()->Notify( chrome::NOTIFICATION_PANEL_STATE_CHANGED, - Source<PanelController>(this), - Details<State>(&state)); + content::Source<PanelController>(this), + content::Details<State>(&state)); } } #endif diff --git a/chrome/browser/chromeos/input_method/input_method_manager.cc b/chrome/browser/chromeos/input_method/input_method_manager.cc index 6a1dce1..107cc33 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager.cc @@ -24,8 +24,8 @@ #include "chrome/browser/chromeos/input_method/xkeyboard.h" #include "chrome/browser/chromeos/language_preferences.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/common/notification_service.h" #include "content/public/browser/notification_types.h" #include "googleurl/src/gurl.h" @@ -129,7 +129,7 @@ namespace input_method { // The implementation of InputMethodManager. class InputMethodManagerImpl : public HotkeyManager::Observer, public InputMethodManager, - public NotificationObserver, + public content::NotificationObserver, public IBusController::Observer { public: InputMethodManagerImpl() @@ -1162,10 +1162,10 @@ class InputMethodManagerImpl : public HotkeyManager::Observer, enable_auto_ime_shutdown_ = enable; } - // NotificationObserver implementation: + // content::NotificationObserver implementation: void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { // Stop the input method daemon on browser shutdown. if (type == content::NOTIFICATION_APP_TERMINATING) { shutting_down_ = true; @@ -1318,7 +1318,7 @@ class InputMethodManagerImpl : public HotkeyManager::Observer, InputMethodConfigRequests current_config_values_; // This is used to register this object to APP_TERMINATING notification. - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; // True if we should launch the input method daemon. bool should_launch_ime_; diff --git a/chrome/browser/chromeos/locale_change_guard.h b/chrome/browser/chromeos/locale_change_guard.h index 1ba08d7..b76d082 100644 --- a/chrome/browser/chromeos/locale_change_guard.h +++ b/chrome/browser/chromeos/locale_change_guard.h @@ -11,12 +11,10 @@ #include "base/lazy_instance.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/chromeos/notifications/system_notification.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" -class NotificationDetails; -class NotificationSource; class Profile; namespace base { @@ -28,7 +26,7 @@ namespace chromeos { // Performs check whether locale has been changed automatically recently // (based on synchronized user preference). If so: shows notification that // allows user to revert change. -class LocaleChangeGuard : public NotificationObserver { +class LocaleChangeGuard : public content::NotificationObserver { public: explicit LocaleChangeGuard(Profile* profile); virtual ~LocaleChangeGuard(); @@ -47,17 +45,17 @@ class LocaleChangeGuard : public NotificationObserver { void AcceptLocaleChange(); void Check(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); std::string from_locale_; std::string to_locale_; Profile* profile_; scoped_ptr<chromeos::SystemNotification> note_; bool reverted_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // We want to show locale change notification in previous language however // we cannot directly load strings for non-current locale. So we cache diff --git a/chrome/browser/chromeos/login/base_login_display_host.cc b/chrome/browser/chromeos/login/base_login_display_host.cc index 1525153..c342562 100644 --- a/chrome/browser/chromeos/login/base_login_display_host.cc +++ b/chrome/browser/chromeos/login/base_login_display_host.cc @@ -205,9 +205,10 @@ void BaseLoginDisplayHost::StartSignInScreen() { // BaseLoginDisplayHost -------------------------------------------------------- -void BaseLoginDisplayHost::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BaseLoginDisplayHost::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { CHECK(type == content::NOTIFICATION_APP_EXITING); registrar_.RemoveAll(); diff --git a/chrome/browser/chromeos/login/base_login_display_host.h b/chrome/browser/chromeos/login/base_login_display_host.h index f4287d6..16c3f7c 100644 --- a/chrome/browser/chromeos/login/base_login_display_host.h +++ b/chrome/browser/chromeos/login/base_login_display_host.h @@ -11,8 +11,8 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/chromeos/login/login_display.h" #include "chrome/browser/chromeos/login/login_display_host.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/rect.h" namespace views { @@ -28,7 +28,7 @@ class WizardController; // An abstract base class that defines OOBE/login screen host. // It encapsulates controllers, background integration and flow. class BaseLoginDisplayHost : public LoginDisplayHost, - public NotificationObserver { + public content::NotificationObserver { public: explicit BaseLoginDisplayHost(const gfx::Rect& background_bounds); virtual ~BaseLoginDisplayHost(); @@ -51,15 +51,15 @@ class BaseLoginDisplayHost : public LoginDisplayHost, const gfx::Rect& background_bounds() const { return background_bounds_; } private: - // NotificationObserver implementation: + // content::NotificationObserver implementation: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Used to calculate position of the screens and background. gfx::Rect background_bounds_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Default LoginDisplayHost. static LoginDisplayHost* default_host_; diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 710a238..660524b 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -119,16 +119,17 @@ void ExistingUserController::Init(const UserVector& users) { } //////////////////////////////////////////////////////////////////////////////// -// ExistingUserController, NotificationObserver implementation: +// ExistingUserController, content::NotificationObserver implementation: // -void ExistingUserController::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ExistingUserController::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED) return; - UserManager::User* user = Details<UserManager::User>(details).ptr(); + UserManager::User* user = content::Details<UserManager::User>(details).ptr(); login_display_->OnUserImageChanged(user); } diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h index 3dc0ce1..aebf04d 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.h +++ b/chrome/browser/chromeos/login/existing_user_controller.h @@ -21,8 +21,8 @@ #include "chrome/browser/chromeos/login/ownership_status_checker.h" #include "chrome/browser/chromeos/login/password_changed_view.h" #include "chrome/browser/chromeos/login/user_manager.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest_prod.h" #include "ui/gfx/rect.h" @@ -44,7 +44,7 @@ class UserCrosSettingsProvider; // ExistingUserController maintains it's own life cycle and deletes itself when // the user logs in (or chooses to see other settings). class ExistingUserController : public LoginDisplay::Delegate, - public NotificationObserver, + public content::NotificationObserver, public LoginPerformer::Delegate, public LoginUtils::Delegate, public CaptchaView::Delegate, @@ -74,10 +74,10 @@ class ExistingUserController : public LoginDisplay::Delegate, virtual void OnUserSelected(const std::string& username) OVERRIDE; virtual void OnStartEnterpriseEnrollment() OVERRIDE; - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Set a delegate that we will pass LoginStatusConsumer events to. // Used for testing. @@ -186,7 +186,7 @@ class ExistingUserController : public LoginDisplay::Delegate, GURL guest_mode_url_; // Used for user image changed notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Factory of callbacks. base::WeakPtrFactory<ExistingUserController> weak_factory_; diff --git a/chrome/browser/chromeos/login/google_authenticator.cc b/chrome/browser/chromeos/login/google_authenticator.cc index 557a374a..cc96b1c 100644 --- a/chrome/browser/chromeos/login/google_authenticator.cc +++ b/chrome/browser/chromeos/login/google_authenticator.cc @@ -172,11 +172,11 @@ void GoogleAuthenticator::LoginOffTheRecord() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); int mount_error = chromeos::kCryptohomeMountErrorNone; if (CrosLibrary::Get()->GetCryptohomeLibrary()->MountForBwsi(&mount_error)) { - AuthenticationNotificationDetails details(true); + Authenticationcontent::NotificationDetails details(true); NotificationService::current()->Notify( chrome::NOTIFICATION_LOGIN_AUTHENTICATION, NotificationService::AllSources(), - Details<AuthenticationNotificationDetails>(&details)); + content::Details<AuthenticationNotificationDetails>(&details)); consumer_->OnOffTheRecordLoginSuccess(); } else { LOG(ERROR) << "Could not mount tmpfs: " << mount_error; diff --git a/chrome/browser/chromeos/login/login_html_dialog.cc b/chrome/browser/chromeos/login/login_html_dialog.cc index 8b494e8..53c439f 100644 --- a/chrome/browser/chromeos/login/login_html_dialog.cc +++ b/chrome/browser/chromeos/login/login_html_dialog.cc @@ -73,7 +73,8 @@ void LoginHtmlDialog::Show() { bubble_frame_view_->StartThrobber(); notification_registrar_.Add( this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, - Source<TabContents>(html_view->dom_contents()->tab_contents())); + content::Source<TabContents>( + html_view->dom_contents()->tab_contents())); } #endif html_view->GetWidget()->Show(); @@ -136,8 +137,8 @@ bool LoginHtmlDialog::HandleContextMenu(const ContextMenuParams& params) { } void LoginHtmlDialog::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); #if defined(USE_AURA) // TODO(saintlou): Do we need a throbber for Aura? diff --git a/chrome/browser/chromeos/login/login_html_dialog.h b/chrome/browser/chromeos/login/login_html_dialog.h index 189de35..a02966c 100644 --- a/chrome/browser/chromeos/login/login_html_dialog.h +++ b/chrome/browser/chromeos/login/login_html_dialog.h @@ -9,8 +9,8 @@ #include <string> #include "chrome/browser/ui/webui/html_dialog_ui.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/size.h" @@ -20,7 +20,7 @@ class BubbleFrameView; // Launches html dialog during OOBE/Login with specified URL and title. class LoginHtmlDialog : public HtmlDialogUIDelegate, - public NotificationObserver { + public content::NotificationObserver { public: // Delegate class to get notifications from the dialog. class Delegate { @@ -68,10 +68,10 @@ class LoginHtmlDialog : public HtmlDialogUIDelegate, virtual bool ShouldShowDialogTitle() const OVERRIDE; virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Notifications receiver. @@ -81,7 +81,7 @@ class LoginHtmlDialog : public HtmlDialogUIDelegate, string16 title_; GURL url_; Style style_; - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; BubbleFrameView* bubble_frame_view_; bool is_open_; diff --git a/chrome/browser/chromeos/login/login_performer.cc b/chrome/browser/chromeos/login/login_performer.cc index a58c4cf..fb79108 100644 --- a/chrome/browser/chromeos/login/login_performer.cc +++ b/chrome/browser/chromeos/login/login_performer.cc @@ -247,12 +247,12 @@ void LoginPerformer::OnCheckWhitelistCompleted(SignedSettings::ReturnCode code, } //////////////////////////////////////////////////////////////////////////////// -// LoginPerformer, NotificationObserver implementation: +// LoginPerformer, content::NotificationObserver implementation: // void LoginPerformer::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED) return; diff --git a/chrome/browser/chromeos/login/login_performer.h b/chrome/browser/chromeos/login/login_performer.h index c1f8edd..d8eb8e3 100644 --- a/chrome/browser/chromeos/login/login_performer.h +++ b/chrome/browser/chromeos/login/login_performer.h @@ -16,8 +16,8 @@ #include "chrome/browser/chromeos/login/signed_settings_helper.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/net/gaia/google_service_auth_error.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" namespace chromeos { @@ -53,7 +53,7 @@ namespace chromeos { // 2. Pending online auth request. class LoginPerformer : public LoginStatusConsumer, public SignedSettingsHelper::Callback, - public NotificationObserver, + public content::NotificationObserver, public ProfileManagerObserver { public: // Delegate class to get notifications from the LoginPerformer. @@ -123,10 +123,10 @@ class LoginPerformer : public LoginStatusConsumer, AuthorizationMode auth_mode() const { return auth_mode_; } private: - // NotificationObserver implementation: + // content::NotificationObserver implementation: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // SignedSettingsHelper::Callback implementation: virtual void OnCheckWhitelistCompleted(SignedSettings::ReturnCode code, @@ -193,7 +193,7 @@ class LoginPerformer : public LoginStatusConsumer, bool password_changed_; // Used for ScreenLock notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // True if LoginPerformer has requested screen lock. Used to distinguish // such requests with cases when screen is locked on its own. diff --git a/chrome/browser/chromeos/login/owner_manager.cc b/chrome/browser/chromeos/login/owner_manager.cc index a408c53..2c5bbe0 100644 --- a/chrome/browser/chromeos/login/owner_manager.cc +++ b/chrome/browser/chromeos/login/owner_manager.cc @@ -133,8 +133,9 @@ void OwnerManager::Verify(const BrowserThread::ID thread_id, BootTimesLoader::Get()->AddLoginTimeMarker("VerifyEnd", false); } -void OwnerManager::SendNotification(int type, - const NotificationDetails& details) { +void OwnerManager::SendNotification( + int type, + const content::NotificationDetails& details) { NotificationService::current()->Notify( type, NotificationService::AllSources(), diff --git a/chrome/browser/chromeos/login/owner_manager.h b/chrome/browser/chromeos/login/owner_manager.h index d546b02..639bfa2 100644 --- a/chrome/browser/chromeos/login/owner_manager.h +++ b/chrome/browser/chromeos/login/owner_manager.h @@ -15,7 +15,10 @@ #include "content/browser/browser_thread.h" class FilePath; + +namespace content { class NotificationDetails; +} namespace chromeos { @@ -90,7 +93,7 @@ class OwnerManager : public base::RefCountedThreadSafe<OwnerManager> { private: // A helper method to send a notification on another thread. void SendNotification(int type, - const NotificationDetails& details); + const content::NotificationDetails& details); // Calls back a key update delegate on a given thread. void CallKeyUpdateDelegate(KeyUpdateDelegate* d) { diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.cc b/chrome/browser/chromeos/login/owner_manager_unittest.cc index 9793886..de6f5f03 100644 --- a/chrome/browser/chromeos/login/owner_manager_unittest.cc +++ b/chrome/browser/chromeos/login/owner_manager_unittest.cc @@ -51,8 +51,8 @@ MockKeyLoadObserver::~MockKeyLoadObserver() { } void MockKeyLoadObserver::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { LOG(INFO) << "Observed key fetch event"; if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) { DCHECK(success_expected_); diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.h b/chrome/browser/chromeos/login/owner_manager_unittest.h index 5da5f7b..f18cca0 100644 --- a/chrome/browser/chromeos/login/owner_manager_unittest.h +++ b/chrome/browser/chromeos/login/owner_manager_unittest.h @@ -14,8 +14,8 @@ #include "base/file_util.h" #include "base/logging.h" #include "base/synchronization/waitable_event.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/common/notification_service.h" #include "content/public/browser/notification_types.h" #include "testing/gmock/include/gmock/gmock.h" @@ -23,20 +23,20 @@ namespace chromeos { -class MockKeyLoadObserver : public NotificationObserver { +class MockKeyLoadObserver : public content::NotificationObserver { public: explicit MockKeyLoadObserver(base::WaitableEvent* e); virtual ~MockKeyLoadObserver(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); void ExpectKeyFetchSuccess(bool should_succeed); private: - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; bool success_expected_; base::WaitableEvent* event_; bool observed_; diff --git a/chrome/browser/chromeos/login/ownership_service.cc b/chrome/browser/chromeos/login/ownership_service.cc index 954e62a..1e30995 100644 --- a/chrome/browser/chromeos/login/ownership_service.cc +++ b/chrome/browser/chromeos/login/ownership_service.cc @@ -138,8 +138,8 @@ void OwnershipService::StartVerifyAttempt(const std::string& data, } void OwnershipService::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) { SetStatus(OWNERSHIP_TAKEN); notification_registrar_.RemoveAll(); diff --git a/chrome/browser/chromeos/login/ownership_service.h b/chrome/browser/chromeos/login/ownership_service.h index d96102e..920e063 100644 --- a/chrome/browser/chromeos/login/ownership_service.h +++ b/chrome/browser/chromeos/login/ownership_service.h @@ -15,8 +15,8 @@ #include "chrome/browser/chromeos/login/owner_manager.h" #include "chrome/browser/policy/proto/device_management_backend.pb.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/common/notification_service.h" namespace base { @@ -26,7 +26,7 @@ template <typename T> struct DefaultLazyInstanceTraits; namespace em = enterprise_management; namespace chromeos { -class OwnershipService : public NotificationObserver { +class OwnershipService : public content::NotificationObserver { public: enum Status { // Listed in upgrade order. @@ -102,10 +102,10 @@ class OwnershipService : public NotificationObserver { protected: OwnershipService(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: friend struct base::DefaultLazyInstanceTraits<OwnershipService>; @@ -138,7 +138,7 @@ class OwnershipService : public NotificationObserver { scoped_refptr<OwnerManager> manager_; scoped_refptr<OwnerKeyUtils> utils_; scoped_ptr<em::PolicyData> policy_; - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; volatile Status ownership_status_; base::Lock ownership_status_lock_; }; diff --git a/chrome/browser/chromeos/login/parallel_authenticator.cc b/chrome/browser/chromeos/login/parallel_authenticator.cc index d7b11c8..2301943 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator.cc +++ b/chrome/browser/chromeos/login/parallel_authenticator.cc @@ -222,7 +222,7 @@ void ParallelAuthenticator::OnLoginSuccess( NotificationService::current()->Notify( chrome::NOTIFICATION_LOGIN_AUTHENTICATION, NotificationService::AllSources(), - Details<AuthenticationNotificationDetails>(&details)); + content::Details<AuthenticationNotificationDetails>(&details)); { base::AutoLock for_this_block(success_lock_); already_reported_success_ = true; diff --git a/chrome/browser/chromeos/login/profile_image_downloader.h b/chrome/browser/chromeos/login/profile_image_downloader.h index b134d68..16ee463 100644 --- a/chrome/browser/chromeos/login/profile_image_downloader.h +++ b/chrome/browser/chromeos/login/profile_image_downloader.h @@ -11,9 +11,9 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "chrome/browser/chromeos/login/image_decoder.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" #include "content/common/net/url_fetcher.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" namespace chromeos { @@ -21,7 +21,7 @@ namespace chromeos { // Downloads user profile image, decodes it in a sandboxed process. class ProfileImageDownloader : public URLFetcher::Delegate, public ImageDecoder::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: // Reports on success or failure of Profile image download. class Delegate { @@ -57,10 +57,10 @@ class ProfileImageDownloader : public URLFetcher::Delegate, const SkBitmap& decoded_image) OVERRIDE; virtual void OnDecodeImageFailed(const ImageDecoder* decoder) OVERRIDE; - // Overriden from NotificationObserver: + // Overriden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Searches for profile image URL in user entry response from Picasa. // Returns an empty string on failure. @@ -73,7 +73,7 @@ class ProfileImageDownloader : public URLFetcher::Delegate, std::string auth_token_; scoped_ptr<URLFetcher> user_entry_fetcher_; scoped_ptr<URLFetcher> profile_image_fetcher_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(ProfileImageDownloader); }; diff --git a/chrome/browser/chromeos/login/screen_lock_view.cc b/chrome/browser/chromeos/login/screen_lock_view.cc index 6a572eb..1509241 100644 --- a/chrome/browser/chromeos/login/screen_lock_view.cc +++ b/chrome/browser/chromeos/login/screen_lock_view.cc @@ -249,12 +249,12 @@ bool ScreenLockView::HandleKeyEvent( void ScreenLockView::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED || !user_view_) return; - UserManager::User* user = Details<UserManager::User>(details).ptr(); + UserManager::User* user = content::Details<UserManager::User>(details).ptr(); if (screen_locker_->user().email() != user->email()) return; user_view_->SetImage(user->image(), user->image()); diff --git a/chrome/browser/chromeos/login/screen_lock_view.h b/chrome/browser/chromeos/login/screen_lock_view.h index e845585..6df1df1 100644 --- a/chrome/browser/chromeos/login/screen_lock_view.h +++ b/chrome/browser/chromeos/login/screen_lock_view.h @@ -8,8 +8,8 @@ #include "chrome/browser/chromeos/login/helper.h" #include "chrome/browser/chromeos/login/user_view.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "views/controls/textfield/textfield_controller.h" #include "views/view.h" @@ -30,7 +30,7 @@ class ScreenLockerTester; // a user to unlock the screen. class ScreenLockView : public ThrobberHostView, public views::TextfieldController, - public NotificationObserver, + public content::NotificationObserver, public UserView::Delegate { public: explicit ScreenLockView(ScreenLocker* screen_locker); @@ -52,10 +52,10 @@ class ScreenLockView : public ThrobberHostView, virtual void Layout(); virtual gfx::Size GetPreferredSize(); - // NotificationObserver: + // content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // views::TextfieldController: virtual void ContentsChanged(views::Textfield* sender, @@ -78,7 +78,7 @@ class ScreenLockView : public ThrobberHostView, // ScreenLocker is owned by itself. ScreenLocker* screen_locker_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // User's picture, signout button and password field. views::View* main_; diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc index 3f82096..005bb3e 100644 --- a/chrome/browser/chromeos/login/screen_locker.cc +++ b/chrome/browser/chromeos/login/screen_locker.cc @@ -53,7 +53,7 @@ namespace { // Observer to start ScreenLocker when the screen lock class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer, - public NotificationObserver { + public content::NotificationObserver { public: ScreenLockObserver() { registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_CHANGED, @@ -62,8 +62,8 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer, // NotificationObserver overrides: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE { + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) { // Register Screen Lock after login screen to make sure // we don't show the screen lock on top of the login screen by accident. @@ -164,7 +164,7 @@ class ScreenLockObserver : public chromeos::ScreenLockLibrary::Observer, } } - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; std::string saved_previous_input_method_id_; std::string saved_current_input_method_id_; std::vector<std::string> saved_active_input_method_list_; @@ -423,8 +423,8 @@ ScreenLocker::~ScreenLocker() { bool state = false; NotificationService::current()->Notify( chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, - Source<ScreenLocker>(this), - Details<bool>(&state)); + content::Source<ScreenLocker>(this), + content::Details<bool>(&state)); if (CrosLibrary::Get()->EnsureLoaded()) CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenUnlockCompleted(); } @@ -443,7 +443,7 @@ void ScreenLocker::ScreenLockReady() { bool state = true; NotificationService::current()->Notify( chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED, - Source<ScreenLocker>(this), + content::Source<ScreenLocker>(this), Details<bool>(&state)); if (CrosLibrary::Get()->EnsureLoaded()) CrosLibrary::Get()->GetScreenLockLibrary()->NotifyScreenLockCompleted(); diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc index 3d8c25f..18e8802 100644 --- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc +++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc @@ -28,7 +28,7 @@ namespace { // An object that wait for lock state and fullscreen state. -class Waiter : public NotificationObserver { +class Waiter : public content::NotificationObserver { public: explicit Waiter(Browser* browser) : browser_(browser), @@ -50,8 +50,8 @@ class Waiter : public NotificationObserver { } virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED); if (running_) MessageLoop::current()->Quit(); @@ -77,7 +77,7 @@ class Waiter : public NotificationObserver { private: Browser* browser_; gulong handler_id_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Are we currently running the message loop? bool running_; diff --git a/chrome/browser/chromeos/login/user_image_screen.cc b/chrome/browser/chromeos/login/user_image_screen.cc index 47ebe44..0d8f7a1 100644 --- a/chrome/browser/chromeos/login/user_image_screen.cc +++ b/chrome/browser/chromeos/login/user_image_screen.cc @@ -170,8 +170,8 @@ void UserImageScreen::OnActorDestroyed(UserImageScreenActor* actor) { } void UserImageScreen::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED); bool is_screen_locked = *Details<bool>(details).ptr(); if (is_screen_locked) diff --git a/chrome/browser/chromeos/login/user_image_screen.h b/chrome/browser/chromeos/login/user_image_screen.h index 23dcb16..06b0ab3 100644 --- a/chrome/browser/chromeos/login/user_image_screen.h +++ b/chrome/browser/chromeos/login/user_image_screen.h @@ -11,8 +11,8 @@ #include "chrome/browser/chromeos/login/profile_image_downloader.h" #include "chrome/browser/chromeos/login/user_image_screen_actor.h" #include "chrome/browser/chromeos/login/wizard_screen.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "third_party/skia/include/core/SkBitmap.h" namespace chromeos { @@ -20,7 +20,7 @@ namespace chromeos { class UserImageScreen: public WizardScreen, public CameraController::Delegate, public UserImageScreenActor::Delegate, - public NotificationObserver, + public content::NotificationObserver, public ProfileImageDownloader::Delegate { public: UserImageScreen(ScreenObserver* screen_observer, @@ -44,10 +44,10 @@ class UserImageScreen: public WizardScreen, virtual void OnDefaultImageSelected(int index) OVERRIDE; virtual void OnActorDestroyed(UserImageScreenActor* actor) OVERRIDE; - // NotificationObserver implementation: + // content::NotificationObserver implementation: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // ProfileImageDownloader::Delegate implementation. virtual void OnDownloadSuccess(const SkBitmap& profile_image) OVERRIDE; @@ -58,7 +58,7 @@ class UserImageScreen: public WizardScreen, CameraController camera_controller_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; UserImageScreenActor* actor_; diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc index ed01829..e0cbf26 100644 --- a/chrome/browser/chromeos/login/user_manager.cc +++ b/chrome/browser/chromeos/login/user_manager.cc @@ -231,8 +231,8 @@ void UserManager::SaveImageToLocalState(const std::string& username, NotifyLocalStateChanged(); NotificationService::current()->Notify( chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, - Source<UserManager>(this), - Details<const User>(&logged_in_user_)); + content::Source<UserManager>(this), + content::Details<const User>(&logged_in_user_)); } void UserManager::SaveImageToFile(const SkBitmap& image, @@ -691,7 +691,7 @@ void UserManager::OnDownloadSuccess(const SkBitmap& image) { SaveUserImage(logged_in_user_.email(), image, User::kProfileImageIndex); NotificationService::current()->Notify( chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED, - Source<UserManager>(this), + content::Source<UserManager>(this), Details<const UserManager::User>(&logged_in_user())); } } @@ -759,7 +759,7 @@ void RealTPMTokenInfoDelegate::GetTokenInfo(std::string* token_name, void UserManager::NotifyOnLogin() { NotificationService::current()->Notify( chrome::NOTIFICATION_LOGIN_USER_CHANGED, - Source<UserManager>(this), + content::Source<UserManager>(this), Details<const User>(&logged_in_user_)); chromeos::input_method::InputMethodManager::GetInstance()-> @@ -791,8 +791,8 @@ void UserManager::NotifyOnLogin() { } void UserManager::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) { BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, base::Bind(&UserManager::CheckOwnership, diff --git a/chrome/browser/chromeos/login/user_manager.h b/chrome/browser/chromeos/login/user_manager.h index 722f09a..526aefb 100644 --- a/chrome/browser/chromeos/login/user_manager.h +++ b/chrome/browser/chromeos/login/user_manager.h @@ -16,8 +16,8 @@ #include "base/synchronization/lock.h" #include "chrome/browser/chromeos/login/profile_image_downloader.h" #include "chrome/browser/chromeos/login/user_image_loader.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "third_party/skia/include/core/SkBitmap.h" class FilePath; @@ -34,7 +34,7 @@ class RemoveUserDelegate; // into this chromium os device before and updating that list. class UserManager : public UserImageLoader::Delegate, public ProfileImageDownloader::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: // User OAuth token status according to the last check. typedef enum { @@ -173,10 +173,10 @@ class UserManager : public UserImageLoader::Delegate, // ProfileImageDownloader::Delegate implementation. virtual void OnDownloadSuccess(const SkBitmap& image) OVERRIDE; - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Accessor for current_user_is_owner_ virtual bool current_user_is_owner() const; @@ -285,7 +285,7 @@ class UserManager : public UserImageLoader::Delegate, // Cached flag of whether any user is logged in at the moment. bool user_is_logged_in_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; friend struct base::DefaultLazyInstanceTraits<UserManager>; diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc index aec9062..ae09646 100644 --- a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc +++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc @@ -14,7 +14,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "content/common/notification_service.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.h b/chrome/browser/chromeos/login/wizard_accessibility_helper.h index 05ea7b6..5cd0cfd 100644 --- a/chrome/browser/chromeos/login/wizard_accessibility_helper.h +++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/singleton.h" #include "chrome/browser/chromeos/login/wizard_accessibility_handler.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "ui/base/keycodes/keyboard_codes.h" class Profile; @@ -66,7 +66,7 @@ class WizardAccessibilityHelper { Profile* profile_; // Used for tracking registrations to accessibility notifications. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; bool registered_notifications_; diff --git a/chrome/browser/chromeos/media/media_player.cc b/chrome/browser/chromeos/media/media_player.cc index 2d562bc..f62bd6e 100644 --- a/chrome/browser/chromeos/media/media_player.cc +++ b/chrome/browser/chromeos/media/media_player.cc @@ -148,15 +148,15 @@ void MediaPlayer::SetPlaybackError(GURL const& url) { } void MediaPlayer::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSED); registrar_.Remove(this, chrome::NOTIFICATION_BROWSER_CLOSED, source); - if (Source<Browser>(source).ptr() == mediaplayer_browser_) { + if (content::Source<Browser>(source).ptr() == mediaplayer_browser_) { mediaplayer_browser_ = NULL; - } else if (Source<Browser>(source).ptr() == playlist_browser_) { + } else if (content::Source<Browser>(source).ptr() == playlist_browser_) { playlist_browser_ = NULL; } } @@ -192,7 +192,7 @@ void MediaPlayer::PopupPlaylist(Browser* creator) { profile); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, - Source<Browser>(playlist_browser_)); + content::Source<Browser>(playlist_browser_)); playlist_browser_->AddSelectedTabWithURL(GetMediaplayerPlaylistUrl(), content::PAGE_TRANSITION_LINK); playlist_browser_->window()->SetBounds(gfx::Rect(kPopupLeft, @@ -220,7 +220,7 @@ void MediaPlayer::PopupMediaPlayer(Browser* creator) { profile); registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED, - Source<Browser>(mediaplayer_browser_)); + content::Source<Browser>(mediaplayer_browser_)); #if defined(OS_CHROMEOS) && defined(TOOLKIT_USES_GTK) // Since we are on chromeos, popups should be a PanelBrowserView, diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc index 1778e66..68c28f4 100644 --- a/chrome/browser/chromeos/notifications/balloon_collection_impl.cc +++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.cc @@ -147,9 +147,10 @@ const BalloonCollectionImpl::Balloons& return base_.balloons(); } -void BalloonCollectionImpl::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void BalloonCollectionImpl::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == chrome::NOTIFICATION_BROWSER_CLOSED); bool app_closing = *Details<bool>(details).ptr(); // When exiting, we need to shutdown all renderers in diff --git a/chrome/browser/chromeos/notifications/balloon_collection_impl.h b/chrome/browser/chromeos/notifications/balloon_collection_impl.h index e8b3980..1ae433c 100644 --- a/chrome/browser/chromeos/notifications/balloon_collection_impl.h +++ b/chrome/browser/chromeos/notifications/balloon_collection_impl.h @@ -13,7 +13,7 @@ #include "chrome/browser/chromeos/notifications/balloon_view_host.h" #include "chrome/browser/notifications/balloon_collection.h" #include "chrome/browser/notifications/balloon_collection_base.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/point.h" #include "ui/gfx/rect.h" @@ -30,7 +30,7 @@ class BalloonViewImpl; // chromeos shows the all notifications in the notification panel, and // this class does not manage the location of balloons. class BalloonCollectionImpl : public BalloonCollection, - public NotificationObserver { + public content::NotificationObserver { public: // An interface to display balloons on the screen. // This is used for unit tests to inject a mock ui implementation. @@ -73,8 +73,8 @@ class BalloonCollectionImpl : public BalloonCollection, // NotificationObserver overrides: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Adds a callback for WebUI message. Returns true if the callback // is succssfully registered, or false otherwise. It fails to add if @@ -134,7 +134,7 @@ class BalloonCollectionImpl : public BalloonCollection, scoped_ptr<NotificationUI> notification_ui_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); }; diff --git a/chrome/browser/chromeos/notifications/balloon_view.h b/chrome/browser/chromeos/notifications/balloon_view.h index 2f38f22..74673dd 100644 --- a/chrome/browser/chromeos/notifications/balloon_view.h +++ b/chrome/browser/chromeos/notifications/balloon_view.h @@ -12,8 +12,8 @@ #include "base/memory/scoped_ptr.h" #include "base/task.h" #include "chrome/browser/notifications/balloon.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/path.h" #include "ui/gfx/point.h" #include "ui/gfx/rect.h" @@ -28,8 +28,6 @@ class Widget; } // namespace views class Notification; -class NotificationDetails; -class NotificationSource; namespace chromeos { @@ -39,7 +37,7 @@ class NotificationControlView; // A balloon view is the UI component for a notification panel. class BalloonViewImpl : public BalloonView, public views::View, - public NotificationObserver { + public content::NotificationObserver { public: BalloonViewImpl(bool sticky, bool controls, bool web_ui); virtual ~BalloonViewImpl(); @@ -83,10 +81,10 @@ class BalloonViewImpl : public BalloonView, // views::View interface. virtual gfx::Size GetPreferredSize(); - // NotificationObserver interface. + // content::NotificationObserver interface. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Initializes the options menu. void CreateOptionsMenu(); @@ -113,7 +111,7 @@ class BalloonViewImpl : public BalloonView, scoped_ptr<views::Widget> control_view_host_; bool stale_; - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; // A sticky flag. A sticky notification cannot be dismissed by a user. bool sticky_; // True if a notification should have info/option/dismiss label/buttons. diff --git a/chrome/browser/chromeos/notifications/notification_browsertest.cc b/chrome/browser/chromeos/notifications/notification_browsertest.cc index 49d2895..dbe881a 100644 --- a/chrome/browser/chromeos/notifications/notification_browsertest.cc +++ b/chrome/browser/chromeos/notifications/notification_browsertest.cc @@ -33,7 +33,7 @@ const char* kChromeOsWindowManagerName = "chromeos-wm"; namespace chromeos { class NotificationTest : public InProcessBrowserTest, - public NotificationObserver { + public content::NotificationObserver { public: NotificationTest() : under_chromeos_(false), @@ -112,8 +112,8 @@ class NotificationTest : public InProcessBrowserTest, // NotificationObserver overrides. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { ASSERT_TRUE(chrome::NOTIFICATION_PANEL_STATE_CHANGED == type); PanelController::State* state = reinterpret_cast<PanelController::State*>(details.map_key()); @@ -301,7 +301,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition1) { // 0. This test explicitly controls the stale state instead. IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) { // Register observer here as the registration does not work in SetUp(). - NotificationRegistrar registrar; + content::NotificationRegistrar registrar; registrar.Add(this, chrome::NOTIFICATION_PANEL_STATE_CHANGED, NotificationService::AllSources()); @@ -368,7 +368,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) { } IN_PROC_BROWSER_TEST_F(NotificationTest, TestCleanupOnExit) { - NotificationRegistrar registrar; + content::NotificationRegistrar registrar; registrar.Add(this, chrome::NOTIFICATION_PANEL_STATE_CHANGED, NotificationService::AllSources()); diff --git a/chrome/browser/chromeos/notifications/notification_panel.h b/chrome/browser/chromeos/notifications/notification_panel.h index 13c5e03..652d424 100644 --- a/chrome/browser/chromeos/notifications/notification_panel.h +++ b/chrome/browser/chromeos/notifications/notification_panel.h @@ -12,7 +12,7 @@ #include "base/task.h" #include "chrome/browser/chromeos/frame/panel_controller.h" #include "chrome/browser/chromeos/notifications/balloon_collection_impl.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "ui/gfx/rect.h" class Balloon; @@ -71,7 +71,7 @@ class NotificationPanelTester; // class NotificationPanel : public PanelController::Delegate, public BalloonCollectionImpl::NotificationUI, - public NotificationObserver { + public content::NotificationObserver { public: enum State { FULL, // Show all notifications @@ -106,8 +106,8 @@ class NotificationPanel : public PanelController::Delegate, // NotificationObserver overrides: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Called when a mouse left the panel window. void OnMouseLeave(); @@ -185,7 +185,7 @@ class NotificationPanel : public PanelController::Delegate, int stale_timeout_; // A registrar to subscribe PANEL_STATE_CHANGED event. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The notification a mouse pointer is currently on. NULL if the mouse // is out of the panel. diff --git a/chrome/browser/chromeos/options/take_photo_dialog.cc b/chrome/browser/chromeos/options/take_photo_dialog.cc index 17f4108..9023936 100644 --- a/chrome/browser/chromeos/options/take_photo_dialog.cc +++ b/chrome/browser/chromeos/options/take_photo_dialog.cc @@ -139,8 +139,8 @@ void TakePhotoDialog::NotifyOnCapturingStopped() { } void TakePhotoDialog::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != chrome::NOTIFICATION_SCREEN_LOCK_STATE_CHANGED) return; diff --git a/chrome/browser/chromeos/options/take_photo_dialog.h b/chrome/browser/chromeos/options/take_photo_dialog.h index 25874ed..d59bf48 100644 --- a/chrome/browser/chromeos/options/take_photo_dialog.h +++ b/chrome/browser/chromeos/options/take_photo_dialog.h @@ -10,8 +10,8 @@ #include "base/observer_list.h" #include "chrome/browser/chromeos/login/camera_controller.h" #include "chrome/browser/chromeos/login/take_photo_view.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "views/window/dialog_delegate.h" namespace views { @@ -24,7 +24,7 @@ namespace chromeos { class TakePhotoDialog : public views::DialogDelegateView, public TakePhotoView::Delegate, public CameraController::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: class Delegate { public: @@ -86,10 +86,10 @@ class TakePhotoDialog : public views::DialogDelegateView, void NotifyOnCaptureFailure(); void NotifyOnCapturingStopped(); - // NotificationObserver implementation: + // content::NotificationObserver implementation: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); protected: // views::View overrides: @@ -105,7 +105,7 @@ class TakePhotoDialog : public views::DialogDelegateView, CameraController camera_controller_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; Delegate* delegate_; diff --git a/chrome/browser/chromeos/preferences.h b/chrome/browser/chromeos/preferences.h index 1da0a30..6c593e1 100644 --- a/chrome/browser/chromeos/preferences.h +++ b/chrome/browser/chromeos/preferences.h @@ -11,7 +11,7 @@ #include "chrome/browser/chromeos/language_preferences.h" #include "chrome/browser/prefs/pref_member.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" class PrefService; @@ -21,7 +21,7 @@ namespace chromeos { // is first initialized, it will initialize the OS settings to what's stored in // the preferences. These include touchpad settings, etc. // When the preferences change, we change the settings to reflect the new value. -class Preferences : public NotificationObserver { +class Preferences : public content::NotificationObserver { public: Preferences(); virtual ~Preferences(); @@ -36,10 +36,10 @@ class Preferences : public NotificationObserver { // This method will initialize Chrome OS settings to values in user prefs. void Init(PrefService* prefs); - // Overridden from NotificationObserver: + // Overridden from content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // This will set the OS settings when the preference changes. diff --git a/chrome/browser/chromeos/status/accessibility_menu_button.cc b/chrome/browser/chromeos/status/accessibility_menu_button.cc index 7d8f8b9..2070da1 100644 --- a/chrome/browser/chromeos/status/accessibility_menu_button.cc +++ b/chrome/browser/chromeos/status/accessibility_menu_button.cc @@ -73,11 +73,12 @@ void AccessibilityMenuButton::ExecuteCommand(int id) { } //////////////////////////////////////////////////////////////////////////////// -// NotificationObserver implementation +// content::NotificationObserver implementation -void AccessibilityMenuButton::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void AccessibilityMenuButton::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) Update(); } diff --git a/chrome/browser/chromeos/status/accessibility_menu_button.h b/chrome/browser/chromeos/status/accessibility_menu_button.h index 36988ca..148bad5 100644 --- a/chrome/browser/chromeos/status/accessibility_menu_button.h +++ b/chrome/browser/chromeos/status/accessibility_menu_button.h @@ -8,7 +8,7 @@ #include "chrome/browser/chromeos/status/status_area_button.h" #include "chrome/browser/prefs/pref_member.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" #include "views/controls/menu/view_menu_delegate.h" #include "views/controls/menu/menu_delegate.h" @@ -25,7 +25,7 @@ class StatusAreaHost; class AccessibilityMenuButton : public StatusAreaButton, public views::ViewMenuDelegate, public views::MenuDelegate, - public NotificationObserver { + public content::NotificationObserver { public: explicit AccessibilityMenuButton(StatusAreaHost* host); virtual ~AccessibilityMenuButton(); @@ -36,10 +36,10 @@ class AccessibilityMenuButton : public StatusAreaButton, // views::MenuDelegate implementation virtual void ExecuteCommand(int id) OVERRIDE; - // NotificationObserver implementation + // content::NotificationObserver implementation virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; private: // Updates the state along with the preferences. diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button.cc b/chrome/browser/chromeos/status/caps_lock_menu_button.cc index a4a8c6c..2b0bc76 100644 --- a/chrome/browser/chromeos/status/caps_lock_menu_button.cc +++ b/chrome/browser/chromeos/status/caps_lock_menu_button.cc @@ -214,11 +214,11 @@ void CapsLockMenuButton::OnCapsLockChange(bool enabled) { } //////////////////////////////////////////////////////////////////////////////// -// NotificationObserver implementation +// content::NotificationObserver implementation void CapsLockMenuButton::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_PREF_CHANGED) UpdateAccessibleName(); } diff --git a/chrome/browser/chromeos/status/caps_lock_menu_button.h b/chrome/browser/chromeos/status/caps_lock_menu_button.h index f0ca1cd..0db2d1f 100644 --- a/chrome/browser/chromeos/status/caps_lock_menu_button.h +++ b/chrome/browser/chromeos/status/caps_lock_menu_button.h @@ -11,7 +11,7 @@ #include "chrome/browser/chromeos/status/status_area_button.h" #include "chrome/browser/chromeos/system_key_event_listener.h" #include "chrome/browser/prefs/pref_member.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" #include "views/controls/menu/menu_delegate.h" #include "views/controls/menu/view_menu_delegate.h" @@ -25,7 +25,7 @@ class StatusAreaHost; // A class for the button in the status area which alerts the user when caps // lock is active. -class CapsLockMenuButton : public NotificationObserver, +class CapsLockMenuButton : public content::NotificationObserver, public StatusAreaButton, public views::MenuDelegate, public views::ViewMenuDelegate, @@ -47,10 +47,10 @@ class CapsLockMenuButton : public NotificationObserver, // SystemKeyEventListener::CapsLockObserver implementation virtual void OnCapsLockChange(bool enabled); - // NotificationObserver implementation + // content::NotificationObserver implementation virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Updates the accessible name. void UpdateAccessibleName(); diff --git a/chrome/browser/chromeos/status/clock_menu_button.h b/chrome/browser/chromeos/status/clock_menu_button.h index 941ec5d4..b4ea90f 100644 --- a/chrome/browser/chromeos/status/clock_menu_button.h +++ b/chrome/browser/chromeos/status/clock_menu_button.h @@ -13,7 +13,7 @@ #include "chrome/browser/chromeos/system/timezone_settings.h" #include "chrome/browser/prefs/pref_change_registrar.h" #include "chrome/browser/prefs/pref_member.h" -#include "content/common/notification_observer.h" +#include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_types.h" #include "unicode/calendar.h" #include "views/controls/button/menu_button.h" @@ -33,7 +33,7 @@ class StatusAreaHost; class ClockMenuButton : public StatusAreaButton, public views::MenuDelegate, public views::ViewMenuDelegate, - public NotificationObserver, + public content::NotificationObserver, public PowerLibrary::Observer, public system::TimezoneSettings::Observer { public: @@ -62,10 +62,10 @@ class ClockMenuButton : public StatusAreaButton, // Sets default use 24hour clock mode. void SetDefaultUse24HourClock(bool use_24hour_clock); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); protected: virtual int horizontal_padding(); diff --git a/chrome/browser/chromeos/status/input_method_menu.cc b/chrome/browser/chromeos/status/input_method_menu.cc index 8a8037e..18eaf44 100644 --- a/chrome/browser/chromeos/status/input_method_menu.cc +++ b/chrome/browser/chromeos/status/input_method_menu.cc @@ -699,8 +699,8 @@ void InputMethodMenu::RegisterPrefs(PrefService* local_state) { } void InputMethodMenu::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == chrome::NOTIFICATION_LOGIN_USER_CHANGED) { // When a user logs in, we should remove |this| object from the observer // list so that PreferenceUpdateNeeded() does not update the local state diff --git a/chrome/browser/chromeos/status/input_method_menu.h b/chrome/browser/chromeos/status/input_method_menu.h index 7ceab26..6d712af 100644 --- a/chrome/browser/chromeos/status/input_method_menu.h +++ b/chrome/browser/chromeos/status/input_method_menu.h @@ -11,8 +11,8 @@ #include "chrome/browser/chromeos/input_method/input_method_manager.h" #include "chrome/browser/chromeos/status/status_area_host.h" #include "chrome/browser/prefs/pref_member.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" #include "ui/base/models/menu_model.h" #include "views/controls/menu/menu_item_view.h" @@ -42,7 +42,7 @@ class InputMethodMenu public ui::MenuModel, public input_method::InputMethodManager::Observer, public input_method::InputMethodManager::PreferenceObserver, - public NotificationObserver { + public content::NotificationObserver { public: InputMethodMenu(PrefService* pref_service, StatusAreaHost::ScreenMode screen_mode, @@ -93,10 +93,10 @@ class InputMethodMenu const input_method::InputMethodDescriptor& current_input_method); virtual void FirstObserverIsAdded(input_method::InputMethodManager* manager); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Specify menu alignment (default TOPRIGHT). void set_menu_alignment(views::MenuItemView::AnchorPosition menu_alignment) { @@ -190,7 +190,7 @@ class InputMethodMenu views::MenuItemView::AnchorPosition menu_alignment_; PrefService* pref_service_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // The mode of the host screen (e.g. browser, screen locker, login screen.) const StatusAreaHost::ScreenMode screen_mode_; diff --git a/chrome/browser/chromeos/status/memory_menu_button.cc b/chrome/browser/chromeos/status/memory_menu_button.cc index 04f5ada..1d26743 100644 --- a/chrome/browser/chromeos/status/memory_menu_button.cc +++ b/chrome/browser/chromeos/status/memory_menu_button.cc @@ -253,15 +253,16 @@ views::MenuItemView* MemoryMenuButton::CreateMenu() { } ///////////////////////////////////////////////////////////////////////////// -// NotificationObserver overrides. +// content::NotificationObserver overrides. void MemoryMenuButton::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: { RenderProcessHost::RendererClosedDetails* process_details = - Details<RenderProcessHost::RendererClosedDetails>(details).ptr(); + content::Details<RenderProcessHost::RendererClosedDetails>(details). + ptr(); if (process_details->status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED) { renderer_kills_++; diff --git a/chrome/browser/chromeos/status/memory_menu_button.h b/chrome/browser/chromeos/status/memory_menu_button.h index ac3a30e..47be7a6 100644 --- a/chrome/browser/chromeos/status/memory_menu_button.h +++ b/chrome/browser/chromeos/status/memory_menu_button.h @@ -9,8 +9,8 @@ #include "base/memory/scoped_ptr.h" #include "base/timer.h" #include "chrome/browser/chromeos/status/status_area_button.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "views/controls/menu/menu_delegate.h" #include "views/controls/menu/view_menu_delegate.h" @@ -31,7 +31,7 @@ class StatusAreaHost; class MemoryMenuButton : public StatusAreaButton, public views::MenuDelegate, public views::ViewMenuDelegate, - public NotificationObserver { + public content::NotificationObserver { public: explicit MemoryMenuButton(StatusAreaHost* host); virtual ~MemoryMenuButton(); @@ -44,10 +44,10 @@ class MemoryMenuButton : public StatusAreaButton, // views::ViewMenuDelegate implementation. virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE; - // NotificationObserver overrides. + // content::NotificationObserver overrides. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Updates the text on the menu button. void UpdateText(); @@ -70,7 +70,7 @@ class MemoryMenuButton : public StatusAreaButton, // Raw data from /proc/meminfo scoped_ptr<base::SystemMemoryInfoKB> meminfo_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Number of renderer kills we have observed. int renderer_kills_; diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.cc b/chrome/browser/chromeos/tab_closeable_state_watcher.cc index a45a0d6c..2cddd98 100644 --- a/chrome/browser/chromeos/tab_closeable_state_watcher.cc +++ b/chrome/browser/chromeos/tab_closeable_state_watcher.cc @@ -186,10 +186,11 @@ void TabCloseableStateWatcher::OnBrowserRemoved(const Browser* browser) { } //////////////////////////////////////////////////////////////////////////////// -// TabCloseableStateWatcher, NotificationObserver implementation: +// TabCloseableStateWatcher, content::NotificationObserver implementation: void TabCloseableStateWatcher::Observe(int type, - const NotificationSource& source, const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type != content::NOTIFICATION_APP_EXITING) NOTREACHED(); if (!signing_off_) { @@ -263,7 +264,7 @@ void TabCloseableStateWatcher::SetCloseableState(bool closeable) { NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CLOSEABLE_STATE_CHANGED, NotificationService::AllSources(), - Details<bool>(&can_close_tab_)); + content::Details<bool>(&can_close_tab_)); } bool TabCloseableStateWatcher::CanCloseBrowserImpl( diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.h b/chrome/browser/chromeos/tab_closeable_state_watcher.h index b31f18d..47ec5a2 100644 --- a/chrome/browser/chromeos/tab_closeable_state_watcher.h +++ b/chrome/browser/chromeos/tab_closeable_state_watcher.h @@ -11,7 +11,7 @@ #include "chrome/browser/tab_closeable_state_watcher.h" #include "chrome/browser/tabs/tab_strip_model_observer.h" #include "chrome/browser/ui/browser_list.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" namespace chromeos { @@ -41,7 +41,7 @@ namespace chromeos { class TabCloseableStateWatcher : public ::TabCloseableStateWatcher, public BrowserList::Observer, - public NotificationObserver { + public content::NotificationObserver { public: TabCloseableStateWatcher(); virtual ~TabCloseableStateWatcher(); @@ -65,8 +65,8 @@ class TabCloseableStateWatcher : public ::TabCloseableStateWatcher, virtual void OnBrowserRemoved(const Browser* browser); // NotificationObserver implementation: - virtual void Observe(int type, const NotificationSource& source, - const NotificationDetails& details); + virtual void Observe(int type, const content::NotificationSource& source, + const content::NotificationDetails& details); // Called by private class TabStripWatcher for TabStripModelObserver // notifications. @@ -108,7 +108,7 @@ class TabCloseableStateWatcher : public ::TabCloseableStateWatcher, // being created. bool waiting_for_browser_; - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; // TabStripWatcher is a TabStripModelObserver that funnels all interesting // methods to TabCloseableStateWatcher::OnTabStripChanged. TabStripWatcher is diff --git a/chrome/browser/chromeos/tab_first_render_watcher.h b/chrome/browser/chromeos/tab_first_render_watcher.h index 2fde9b0..22218c2 100644 --- a/chrome/browser/chromeos/tab_first_render_watcher.h +++ b/chrome/browser/chromeos/tab_first_render_watcher.h @@ -7,8 +7,8 @@ #pragma once #include "base/compiler_specific.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" class RenderViewHost; class TabContents; @@ -17,7 +17,7 @@ namespace chromeos { // This class watches given TabContent's loading and rendering state change. // TODO(xiyuan): Move this to a proper place and share with HTMLDialogView. -class TabFirstRenderWatcher : public NotificationObserver { +class TabFirstRenderWatcher : public content::NotificationObserver { public: class Delegate { public: @@ -29,10 +29,10 @@ class TabFirstRenderWatcher : public NotificationObserver { TabFirstRenderWatcher(TabContents* tab, Delegate* delegate); private: - // Overridden from NotificationObserver + // Overridden from content::NotificationObserver virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; enum State { NONE, @@ -47,7 +47,7 @@ class TabFirstRenderWatcher : public NotificationObserver { // Delegate to notify. Delegate* delegate_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(TabFirstRenderWatcher); }; diff --git a/chrome/browser/chromeos/user_cros_settings_provider.cc b/chrome/browser/chromeos/user_cros_settings_provider.cc index 55b0b44..c01c897 100644 --- a/chrome/browser/chromeos/user_cros_settings_provider.cc +++ b/chrome/browser/chromeos/user_cros_settings_provider.cc @@ -65,7 +65,7 @@ const char* kListSettings[] = { // SignedSettingsTempStorage if there is no owner yet, or waits for an // OWNERSHIP_CHECKED notification to delay the storing until the owner has // logged in. -class MigrationHelper : public NotificationObserver { +class MigrationHelper : public content::NotificationObserver { public: explicit MigrationHelper() : callback_(NULL) { registrar_.Add(this, chrome::NOTIFICATION_OWNERSHIP_CHECKED, @@ -87,8 +87,8 @@ class MigrationHelper : public NotificationObserver { // NotificationObserver overrides: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE { + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE { if (type == chrome::NOTIFICATION_OWNERSHIP_CHECKED) MigrateValues(); } @@ -114,7 +114,7 @@ class MigrationHelper : public NotificationObserver { } } - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; scoped_ptr<OwnershipStatusChecker> ownership_checker_; SignedSettingsHelper::Callback* callback_; diff --git a/chrome/browser/chromeos/web_socket_proxy.cc b/chrome/browser/chromeos/web_socket_proxy.cc index d1712cb..0d685da 100644 --- a/chrome/browser/chromeos/web_socket_proxy.cc +++ b/chrome/browser/chromeos/web_socket_proxy.cc @@ -36,8 +36,8 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/url_constants.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_types.h" #include "content/public/common/url_constants.h" #include "googleurl/src/gurl.h" @@ -194,7 +194,7 @@ void SendNotification(int port) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); NotificationService::current()->Notify( chrome::NOTIFICATION_WEB_SOCKET_PROXY_STARTED, - NotificationService::AllSources(), Details<int>(&port)); + NotificationService::AllSources(), content::Details<int>(&port)); } class Conn; diff --git a/chrome/browser/chromeos/web_socket_proxy_controller.cc b/chrome/browser/chromeos/web_socket_proxy_controller.cc index 3001ce0..1368ce2 100644 --- a/chrome/browser/chromeos/web_socket_proxy_controller.cc +++ b/chrome/browser/chromeos/web_socket_proxy_controller.cc @@ -22,8 +22,8 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/url_constants.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/common/notification_service.h" #include "content/public/common/url_constants.h" #include "googleurl/src/gurl.h" @@ -127,7 +127,7 @@ class ProxyLifetime : public net::NetworkChangeNotifier::OnlineStateObserver { chromeos::WebSocketProxy* volatile server_; volatile bool shutdown_requested_; base::Lock lock_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; friend class ProxyTask; friend class chromeos::WebSocketProxyController; }; diff --git a/chrome/browser/chromeos/wm_ipc.cc b/chrome/browser/chromeos/wm_ipc.cc index 668327a..f400996 100644 --- a/chrome/browser/chromeos/wm_ipc.cc +++ b/chrome/browser/chromeos/wm_ipc.cc @@ -305,8 +305,8 @@ void WmIpc::FetchLayoutModeProperty() { layout_mode_ = static_cast<WmIpcLayoutMode>(value); NotificationService::current()->Notify( chrome::NOTIFICATION_LAYOUT_MODE_CHANGED, - Source<WmIpc>(this), - Details<WmIpcLayoutMode>(&layout_mode_)); + content::Source<WmIpc>(this), + content::Details<WmIpcLayoutMode>(&layout_mode_)); } else { DLOG(WARNING) << "Missing _CHROME_LAYOUT_MODE property on root window"; } |