diff options
Diffstat (limited to 'content/browser')
46 files changed, 296 insertions, 276 deletions
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc index 0923c94..72fa620 100644 --- a/content/browser/appcache/chrome_appcache_service.cc +++ b/content/browser/appcache/chrome_appcache_service.cc @@ -56,9 +56,10 @@ bool ChromeAppCacheService::CanCreateAppCache( manifest_url, first_party, *resource_context_); } -void ChromeAppCacheService::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void ChromeAppCacheService::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK(type == content::NOTIFICATION_PURGE_MEMORY); PurgeMemory(); diff --git a/content/browser/appcache/chrome_appcache_service.h b/content/browser/appcache/chrome_appcache_service.h index a599517..e5f73e1 100644 --- a/content/browser/appcache/chrome_appcache_service.h +++ b/content/browser/appcache/chrome_appcache_service.h @@ -10,8 +10,8 @@ #include "base/memory/ref_counted.h" #include "content/browser/browser_thread.h" #include "content/common/content_export.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 "webkit/appcache/appcache_policy.h" #include "webkit/appcache/appcache_service.h" #include "webkit/quota/special_storage_policy.h" @@ -38,7 +38,7 @@ class CONTENT_EXPORT ChromeAppCacheService BrowserThread::DeleteOnIOThread>, NON_EXPORTED_BASE(public appcache::AppCacheService), NON_EXPORTED_BASE(public appcache::AppCachePolicy), - public NotificationObserver { + public content::NotificationObserver { public: explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy); @@ -61,13 +61,13 @@ class CONTENT_EXPORT ChromeAppCacheService virtual bool CanCreateAppCache(const GURL& manifest_url, const GURL& first_party); - // NotificationObserver override + // content::NotificationObserver override virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); const content::ResourceContext* resource_context_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; FilePath cache_path_; DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); diff --git a/content/browser/browser_child_process_host.cc b/content/browser/browser_child_process_host.cc index 12a023a..63604a3 100644 --- a/content/browser/browser_child_process_host.cc +++ b/content/browser/browser_child_process_host.cc @@ -46,7 +46,7 @@ class ChildNotificationTask : public Task { virtual void Run() { NotificationService::current()-> Notify(notification_type_, NotificationService::AllSources(), - Details<ChildProcessInfo>(&info_)); + content::Details<ChildProcessInfo>(&info_)); } private: diff --git a/content/browser/cert_store.cc b/content/browser/cert_store.cc index 55ab630..22c8c47 100644 --- a/content/browser/cert_store.cc +++ b/content/browser/cert_store.cc @@ -137,11 +137,11 @@ void CertStore::RemoveCertsForRenderProcesHost(int process_id) { } void CertStore::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED || type == content::NOTIFICATION_RENDERER_PROCESS_CLOSED); - RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); + RenderProcessHost* rph = content::Source<RenderProcessHost>(source).ptr(); DCHECK(rph); RemoveCertsForRenderProcesHost(rph->id()); } diff --git a/content/browser/cert_store.h b/content/browser/cert_store.h index 326f1b8..e5a6a67 100644 --- a/content/browser/cert_store.h +++ b/content/browser/cert_store.h @@ -11,8 +11,8 @@ #include "base/memory/singleton.h" #include "base/synchronization/lock.h" #include "content/common/content_export.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 "net/base/x509_certificate.h" // The purpose of the cert store is to provide an easy way to store/retrieve @@ -25,7 +25,7 @@ // Note that the cert ids will overflow if we register more than 2^32 - 1 certs // in 1 browsing session (which is highly unlikely to happen). -class CONTENT_EXPORT CertStore : public NotificationObserver { +class CONTENT_EXPORT CertStore : public content::NotificationObserver { public: // Returns the singleton instance of the CertStore. static CertStore* GetInstance(); @@ -42,10 +42,10 @@ class CONTENT_EXPORT CertStore : public NotificationObserver { // non-NULL, copies it in. bool RetrieveCert(int cert_id, scoped_refptr<net::X509Certificate>* cert); - // 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 DefaultSingletonTraits<CertStore>; @@ -65,7 +65,7 @@ class CONTENT_EXPORT CertStore : public NotificationObserver { typedef std::map<net::X509Certificate*, int, net::X509Certificate::LessThan> ReverseCertMap; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; IDMap process_id_to_cert_id_; IDMap cert_id_to_process_id_; diff --git a/content/browser/debugger/render_view_devtools_agent_host.cc b/content/browser/debugger/render_view_devtools_agent_host.cc index fd04963..b393240 100644 --- a/content/browser/debugger/render_view_devtools_agent_host.cc +++ b/content/browser/debugger/render_view_devtools_agent_host.cc @@ -56,9 +56,9 @@ void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { void RenderViewDevToolsAgentHost::NotifyClientClosing() { NotificationService::current()->Notify( content::NOTIFICATION_DEVTOOLS_WINDOW_CLOSING, - Source<content::BrowserContext>( + content::Source<content::BrowserContext>( render_view_host_->site_instance()->GetProcess()->browser_context()), - Details<RenderViewHost>(render_view_host_)); + content::Details<RenderViewHost>(render_view_host_)); } int RenderViewDevToolsAgentHost::GetRenderProcessId() { diff --git a/content/browser/debugger/worker_devtools_manager.cc b/content/browser/debugger/worker_devtools_manager.cc index f782aff..9f5e626 100644 --- a/content/browser/debugger/worker_devtools_manager.cc +++ b/content/browser/debugger/worker_devtools_manager.cc @@ -15,12 +15,13 @@ #include "content/browser/worker_host/worker_process_host.h" #include "content/browser/worker_host/worker_service.h" #include "content/common/devtools_messages.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" -class WorkerDevToolsManager::AgentHosts : private NotificationObserver { +class WorkerDevToolsManager::AgentHosts + : private content::NotificationObserver { public: static void Add(WorkerId id, WorkerDevToolsAgentHost* host) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); @@ -57,15 +58,15 @@ private: } ~AgentHosts() {} - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource&, - const NotificationDetails&) OVERRIDE; + const content::NotificationSource&, + const content::NotificationDetails&) OVERRIDE; static AgentHosts* instance_; typedef std::map<WorkerId, WorkerDevToolsAgentHost*> Instances; Instances map_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; }; WorkerDevToolsManager::AgentHosts* @@ -212,9 +213,10 @@ WorkerDevToolsManager::DetachedClientHosts* WorkerDevToolsManager::DetachedClientHosts::instance_ = NULL; -void WorkerDevToolsManager::AgentHosts::Observe(int type, - const NotificationSource&, - const NotificationDetails&) { +void WorkerDevToolsManager::AgentHosts::Observe( + int type, + const content::NotificationSource&, + const content::NotificationDetails&) { DCHECK(type == content::NOTIFICATION_APP_TERMINATING); Instances copy(map_); for (Instances::iterator it = copy.begin(); it != copy.end(); ++it) diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc index eb91ef0..7c4c5b7 100644 --- a/content/browser/download/download_manager.cc +++ b/content/browser/download/download_manager.cc @@ -1075,8 +1075,8 @@ void DownloadManager::SavePageDownloadFinished(DownloadItem* download) { if (download->IsComplete()) NotificationService::current()->Notify( content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED, - Source<DownloadManager>(this), - Details<DownloadItem>(download)); + content::Source<DownloadManager>(this), + content::Details<DownloadItem>(download)); } } diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc index 588fe1b..8e19f19 100644 --- a/content/browser/download/mhtml_generation_browsertest.cc +++ b/content/browser/download/mhtml_generation_browsertest.cc @@ -46,7 +46,7 @@ IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateMHTML) { MHTMLGenerationManager* mhtml_generation_manager = g_browser_process->mhtml_generation_manager(); - Source<RenderViewHost> source(tab->render_view_host()); + content::Source<RenderViewHost> source(tab->render_view_host()); ui_test_utils::WindowedNotificationObserverWithDetails< MHTMLGenerationManager::NotificationDetails> signal( content::NOTIFICATION_MHTML_GENERATED, source); diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc index 00306f5..2802c24 100644 --- a/content/browser/download/mhtml_generation_manager.cc +++ b/content/browser/download/mhtml_generation_manager.cc @@ -115,8 +115,8 @@ void MHTMLGenerationManager::JobFinished(int job_id, int64 file_size) { NotificationService::current()->Notify( content::NOTIFICATION_MHTML_GENERATED, - Source<RenderViewHost>(rvh), - Details<NotificationDetails>(&details)); + content::Source<RenderViewHost>(rvh), + content::Details<NotificationDetails>(&details)); } BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, diff --git a/content/browser/host_zoom_map.cc b/content/browser/host_zoom_map.cc index 6eaba75..6aa228b 100644 --- a/content/browser/host_zoom_map.cc +++ b/content/browser/host_zoom_map.cc @@ -63,8 +63,8 @@ void HostZoomMap::SetZoomLevel(std::string host, double level) { NotificationService::current()->Notify( content::NOTIFICATION_ZOOM_LEVEL_CHANGED, - Source<HostZoomMap>(this), - Details<const std::string>(&host)); + content::Source<HostZoomMap>(this), + content::Details<const std::string>(&host)); } double HostZoomMap::GetTemporaryZoomLevel(int render_process_id, @@ -111,21 +111,23 @@ void HostZoomMap::SetTemporaryZoomLevel(int render_process_id, std::string host; NotificationService::current()->Notify( content::NOTIFICATION_ZOOM_LEVEL_CHANGED, - Source<HostZoomMap>(this), - Details<const std::string>(&host)); + content::Source<HostZoomMap>(this), + content::Details<const std::string>(&host)); } void HostZoomMap::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); switch (type) { case content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW: { base::AutoLock auto_lock(lock_); - int render_view_id = Source<RenderViewHost>(source)->routing_id(); - int render_process_id = Source<RenderViewHost>(source)->process()->id(); + int render_view_id = + content::Source<RenderViewHost>(source)->routing_id(); + int render_process_id = + content::Source<RenderViewHost>(source)->process()->id(); for (size_t i = 0; i < temporary_zoom_levels_.size(); ++i) { if (temporary_zoom_levels_[i].render_process_id == render_process_id && diff --git a/content/browser/host_zoom_map.h b/content/browser/host_zoom_map.h index 0eb86c4..57cfbba 100644 --- a/content/browser/host_zoom_map.h +++ b/content/browser/host_zoom_map.h @@ -18,8 +18,8 @@ #include "base/synchronization/lock.h" #include "content/browser/browser_thread.h" #include "content/common/content_export.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 base { class DictionaryValue; @@ -30,7 +30,7 @@ class GURL; // HostZoomMap needs to be deleted on the UI thread because it listens // to notifications on there (and holds a NotificationRegistrar). class CONTENT_EXPORT HostZoomMap - : public NotificationObserver, + : public content::NotificationObserver, public base::RefCountedThreadSafe<HostZoomMap, BrowserThread::DeleteOnUIThread> { public: @@ -70,10 +70,10 @@ class CONTENT_EXPORT HostZoomMap int render_view_id, double level); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); double default_zoom_level() const { return default_zoom_level_; } void set_default_zoom_level(double level) { default_zoom_level_ = level; } @@ -112,7 +112,7 @@ class CONTENT_EXPORT HostZoomMap // |temporary_zoom_levels_| to guarantee thread safety. mutable base::Lock lock_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(HostZoomMap); }; diff --git a/content/browser/mach_broker_mac.cc b/content/browser/mach_broker_mac.cc index 30ac5f8..2dbd1c8 100644 --- a/content/browser/mach_broker_mac.cc +++ b/content/browser/mach_broker_mac.cc @@ -200,8 +200,8 @@ mach_port_t MachBroker::TaskForPid(base::ProcessHandle pid) const { } void MachBroker::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { // TODO(rohitrao): These notifications do not always carry the proper PIDs, // especially when the renderer is already gone or has crashed. Find a better // way to listen for child process deaths. http://crbug.com/55734 @@ -209,11 +209,11 @@ void MachBroker::Observe(int type, switch (type) { case content::NOTIFICATION_RENDERER_PROCESS_CLOSED: case content::NOTIFICATION_RENDERER_PROCESS_TERMINATED: - handle = Source<RenderProcessHost>(source)->GetHandle(); + handle = content::Source<RenderProcessHost>(source)->GetHandle(); break; case content::NOTIFICATION_CHILD_PROCESS_CRASHED: case content::NOTIFICATION_CHILD_PROCESS_HOST_DISCONNECTED: - handle = Details<ChildProcessInfo>(details)->handle(); + handle = content::Details<ChildProcessInfo>(details)->handle(); break; default: NOTREACHED() << "Unexpected notification"; diff --git a/content/browser/mach_broker_mac.h b/content/browser/mach_broker_mac.h index d78b0d7..6fdaaa8 100644 --- a/content/browser/mach_broker_mac.h +++ b/content/browser/mach_broker_mac.h @@ -15,8 +15,8 @@ #include "base/process.h" #include "base/process_util.h" #include "base/synchronization/lock.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" // On OS X, the mach_port_t of a process is required to collect metrics about // the process. Running |task_for_pid()| is only allowed for privileged code. @@ -33,7 +33,7 @@ // Since this data arrives over a separate channel, it is not available // immediately after a child process has been started. class MachBroker : public base::ProcessMetrics::PortProvider, - public NotificationObserver { + public content::NotificationObserver { public: // Returns the global MachBroker. static MachBroker* GetInstance(); @@ -81,10 +81,10 @@ class MachBroker : public base::ProcessMetrics::PortProvider, // Implement |ProcessMetrics::PortProvider|. virtual mach_port_t TaskForPid(base::ProcessHandle process) const; - // Implement |NotificationObserver|. + // Implement |content::NotificationObserver|. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Private constructor. MachBroker(); @@ -95,7 +95,7 @@ class MachBroker : public base::ProcessMetrics::PortProvider, // Used to register for notifications received by NotificationObserver. // Accessed only on the UI thread. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Stores mach info for every process in the broker. typedef std::map<base::ProcessHandle, MachInfo> MachMap; diff --git a/content/browser/plugin_service.cc b/content/browser/plugin_service.cc index ffc6d28..8b638935 100644 --- a/content/browser/plugin_service.cc +++ b/content/browser/plugin_service.cc @@ -548,8 +548,8 @@ void PluginService::OnWaitableEventSignaled( } void PluginService::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { #if defined(OS_MACOSX) if (type == content::NOTIFICATION_APP_ACTIVATED) { BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, diff --git a/content/browser/plugin_service.h b/content/browser/plugin_service.h index b53bb5d..5c4edc7 100644 --- a/content/browser/plugin_service.h +++ b/content/browser/plugin_service.h @@ -21,8 +21,8 @@ #include "content/browser/plugin_process_host.h" #include "content/browser/ppapi_plugin_process_host.h" #include "content/common/content_export.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 "ipc/ipc_channel_handle.h" @@ -62,7 +62,7 @@ class PluginList; // doing expensive disk operations on the IO/UI threads. class CONTENT_EXPORT PluginService : public base::WaitableEventWatcher::Delegate, - public NotificationObserver { + public content::NotificationObserver { public: struct OverriddenPlugin { int render_process_id; @@ -186,9 +186,9 @@ class CONTENT_EXPORT PluginService // base::WaitableEventWatcher::Delegate implementation. virtual void OnWaitableEventSignaled(base::WaitableEvent* waitable_event); - // NotificationObserver implementation - virtual void Observe(int type, const NotificationSource& source, - const NotificationDetails& details); + // content::NotificationObserver implementation + virtual void Observe(int type, const content::NotificationSource& source, + const content::NotificationDetails& details); void RegisterPepperPlugins(); @@ -233,7 +233,7 @@ class CONTENT_EXPORT PluginService // The browser's UI locale. const std::string ui_locale_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; #if defined(OS_WIN) // Registry keys for getting notifications when new plugins are installed. diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc index 4147ed4..0bc26f9 100644 --- a/content/browser/renderer_host/browser_render_process_host.cc +++ b/content/browser/renderer_host/browser_render_process_host.cc @@ -872,8 +872,8 @@ void BrowserRenderProcessHost::ProcessDied( RendererClosedDetails details(status, exit_code, was_alive); NotificationService::current()->Notify( content::NOTIFICATION_RENDERER_PROCESS_CLOSED, - Source<RenderProcessHost>(this), - Details<RendererClosedDetails>(&details)); + content::Source<RenderProcessHost>(this), + content::Details<RendererClosedDetails>(&details)); child_process_launcher_.reset(); channel_.reset(); @@ -902,7 +902,8 @@ void BrowserRenderProcessHost::OnShutdownRequest() { // They should not attempt to swap them back in. NotificationService::current()->Notify( content::NOTIFICATION_RENDERER_PROCESS_CLOSING, - Source<RenderProcessHost>(this), NotificationService::NoDetails()); + content::Source<RenderProcessHost>(this), + NotificationService::NoDetails()); Send(new ChildProcessMsg_Shutdown()); } @@ -966,7 +967,8 @@ void BrowserRenderProcessHost::OnProcessLaunched() { // happens. NotificationService::current()->Notify( content::NOTIFICATION_RENDERER_PROCESS_CREATED, - Source<RenderProcessHost>(this), NotificationService::NoDetails()); + content::Source<RenderProcessHost>(this), + NotificationService::NoDetails()); while (!queued_messages_.empty()) { Send(queued_messages_.front()); diff --git a/content/browser/renderer_host/render_process_host.cc b/content/browser/renderer_host/render_process_host.cc index bf4d98a..d783884 100644 --- a/content/browser/renderer_host/render_process_host.cc +++ b/content/browser/renderer_host/render_process_host.cc @@ -151,7 +151,8 @@ void RenderProcessHost::Cleanup() { if (listeners_.IsEmpty()) { NotificationService::current()->Notify( content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, - Source<RenderProcessHost>(this), NotificationService::NoDetails()); + content::Source<RenderProcessHost>(this), + NotificationService::NoDetails()); MessageLoop::current()->DeleteSoon(FROM_HERE, this); deleting_soon_ = true; // It's important not to wait for the DeleteTask to delete the channel diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index 964ad05..a562d54 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -32,13 +32,13 @@ #include "content/common/content_constants.h" #include "content/common/desktop_notification_messages.h" #include "content/common/drag_messages.h" -#include "content/common/notification_details.h" #include "content/common/notification_service.h" #include "content/common/result_codes.h" #include "content/common/speech_input_messages.h" #include "content/common/swapped_out_messages.h" #include "content/common/view_messages.h" #include "content/public/browser/native_web_keyboard_event.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_types.h" #include "content/public/common/bindings_policy.h" #include "content/public/common/url_constants.h" @@ -131,7 +131,7 @@ RenderViewHost::RenderViewHost(SiteInstance* instance, NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, - Source<RenderViewHost>(this), + content::Source<RenderViewHost>(this), NotificationService::NoDetails()); } @@ -141,7 +141,7 @@ RenderViewHost::~RenderViewHost() { NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, - Source<RenderViewHost>(this), + content::Source<RenderViewHost>(this), NotificationService::NoDetails()); delegate()->RenderViewDeleted(this); @@ -368,7 +368,7 @@ void RenderViewHost::ClosePage() { // RenderViewHosts that have been swapped out. NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW, - Source<RenderViewHost>(this), + content::Source<RenderViewHost>(this), NotificationService::NoDetails()); Send(new ViewMsg_ClosePage(routing_id())); @@ -1068,7 +1068,7 @@ void RenderViewHost::OnUpdateDragCursor(WebDragOperation current_op) { void RenderViewHost::OnTargetDropACK() { NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, - Source<RenderViewHost>(this), + content::Source<RenderViewHost>(this), NotificationService::NoDetails()); } @@ -1338,7 +1338,7 @@ void RenderViewHost::OnAccessibilityNotifications( NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, - Source<RenderViewHost>(this), + content::Source<RenderViewHost>(this), NotificationService::NoDetails()); } @@ -1355,8 +1355,8 @@ void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { std::pair<int, Value*> details(id, result_value); NotificationService::current()->Notify( content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, - Source<RenderViewHost>(this), - Details<std::pair<int, Value*> >(&details)); + content::Source<RenderViewHost>(this), + content::Details<std::pair<int, Value*> >(&details)); } void RenderViewHost::OnDidZoomURL(double zoom_level, diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc index 5f9a6e1f..0bd5577 100644 --- a/content/browser/renderer_host/render_view_host_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_browsertest.cc @@ -22,15 +22,16 @@ namespace { // NotificationObserver used to listen for EXECUTE_JAVASCRIPT_RESULT // notifications. -class ExecuteNotificationObserver : public NotificationObserver { +class ExecuteNotificationObserver : public content::NotificationObserver { public: ExecuteNotificationObserver() : id_(0) {} virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { - id_ = (static_cast<Details<ExecuteDetailType > >(details))->first; - Value* value = (static_cast<Details<ExecuteDetailType > >(details))->second; + const content::NotificationSource& source, + const content::NotificationDetails& details) { + id_ = (static_cast<content::Details<ExecuteDetailType > >(details))->first; + Value* value = + (static_cast<content::Details<ExecuteDetailType > >(details))->second; if (value) value_.reset(value->DeepCopy()); MessageLoopForUI::current()->Quit(); @@ -66,7 +67,7 @@ class RenderViewHostTest : public InProcessBrowserTest { ui_test_utils::RegisterAndWait( out_result, content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, - Source<RenderViewHost>(rvh)); + content::Source<RenderViewHost>(rvh)); EXPECT_EQ(execute_id, out_result->id()); ASSERT_TRUE(out_result->value()); last_execute_id_ = execute_id; diff --git a/content/browser/renderer_host/render_view_host_manager_browsertest.cc b/content/browser/renderer_host/render_view_host_manager_browsertest.cc index a6f9bfb..576cf70 100644 --- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc @@ -12,9 +12,9 @@ #include "content/browser/renderer_host/render_view_host_observer.h" #include "content/browser/site_instance.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_details.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" #include "content/public/common/url_constants.h" #include "net/base/net_util.h" diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc index 84e4d09..b98a702 100644 --- a/content/browser/renderer_host/render_widget_host.cc +++ b/content/browser/renderer_host/render_widget_host.cc @@ -267,8 +267,8 @@ void RenderWidgetHost::WasHidden() { bool is_visible = false; NotificationService::current()->Notify( content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, - Source<RenderWidgetHost>(this), - Details<bool>(&is_visible)); + content::Source<RenderWidgetHost>(this), + content::Details<bool>(&is_visible)); } void RenderWidgetHost::WasRestored() { @@ -302,8 +302,8 @@ void RenderWidgetHost::WasRestored() { bool is_visible = true; NotificationService::current()->Notify( content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, - Source<RenderWidgetHost>(this), - Details<bool>(&is_visible)); + content::Source<RenderWidgetHost>(this), + content::Details<bool>(&is_visible)); // It's possible for our size to be out of sync with the renderer. The // following is one case that leads to this: @@ -835,7 +835,7 @@ bool RenderWidgetHost::IsFullscreen() const { void RenderWidgetHost::Destroy() { NotificationService::current()->Notify( content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, - Source<RenderWidgetHost>(this), + content::Source<RenderWidgetHost>(this), NotificationService::NoDetails()); // Tell the view to die. @@ -863,7 +863,7 @@ void RenderWidgetHost::CheckRendererIsUnresponsive() { // OK, looks like we have a hung renderer! NotificationService::current()->Notify( content::NOTIFICATION_RENDERER_PROCESS_HANG, - Source<RenderWidgetHost>(this), + content::Source<RenderWidgetHost>(this), NotificationService::NoDetails()); is_unresponsive_ = true; NotifyRendererUnresponsive(); @@ -936,8 +936,8 @@ void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { gfx::Size size_details = size; NotificationService::current()->Notify( content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, - Source<RenderWidgetHost>(this), - Details<PaintAtSizeAckDetails>(&details)); + content::Source<RenderWidgetHost>(this), + content::Details<PaintAtSizeAckDetails>(&details)); } void RenderWidgetHost::OnMsgUpdateRect( @@ -1040,7 +1040,7 @@ void RenderWidgetHost::OnMsgUpdateRect( NotificationService::current()->Notify( content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, - Source<RenderWidgetHost>(this), + content::Source<RenderWidgetHost>(this), NotificationService::NoDetails()); // If we got a resize ack, then perhaps we have another resize to send? @@ -1092,8 +1092,8 @@ void RenderWidgetHost::OnMsgInputEventAck(WebInputEvent::Type event_type, // This is used only for testing. NotificationService::current()->Notify( content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK, - Source<RenderWidgetHost>(this), - Details<int>(&type)); + content::Source<RenderWidgetHost>(this), + content::Details<int>(&type)); } void RenderWidgetHost::ProcessWheelAck(bool processed) { diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index c412397..8abb488 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc @@ -10,11 +10,11 @@ #include "content/browser/content_browser_client.h" #include "content/browser/renderer_host/backing_store.h" #include "content/browser/renderer_host/test_render_view_host.h" -#include "content/common/notification_details.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" -#include "content/common/notification_source.h" #include "content/common/view_messages.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "content/test/test_browser_context.h" #include "testing/gtest/include/gtest/gtest.h" @@ -204,7 +204,7 @@ class MockRenderWidgetHost : public RenderWidgetHost { // MockPaintingObserver -------------------------------------------------------- -class MockPaintingObserver : public NotificationObserver { +class MockPaintingObserver : public content::NotificationObserver { public: void WidgetDidReceivePaintAtSizeAck(RenderWidgetHost* host, int tag, @@ -215,14 +215,15 @@ class MockPaintingObserver : public NotificationObserver { } void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK) { RenderWidgetHost::PaintAtSizeAckDetails* size_ack_details = - Details<RenderWidgetHost::PaintAtSizeAckDetails>(details).ptr(); + content::Details<RenderWidgetHost::PaintAtSizeAckDetails>(details). + ptr(); WidgetDidReceivePaintAtSizeAck( - Source<RenderWidgetHost>(source).ptr(), + content::Source<RenderWidgetHost>(source).ptr(), size_ack_details->tag, size_ack_details->size); } @@ -564,12 +565,12 @@ TEST_F(RenderWidgetHostTest, PaintAtSize) { EXPECT_TRUE( process_->sink().GetUniqueMessageMatching(ViewMsg_PaintAtSize::ID)); - NotificationRegistrar registrar; + content::NotificationRegistrar registrar; MockPaintingObserver observer; registrar.Add( &observer, content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, - Source<RenderWidgetHost>(host_.get())); + content::Source<RenderWidgetHost>(host_.get())); host_->OnMsgPaintAtSizeAck(kPaintAtSizeTag, gfx::Size(20, 30)); EXPECT_EQ(host_.get(), observer.host()); diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index b33bcde..40de3ae 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -1526,15 +1526,16 @@ void RenderWidgetHostViewWin::UnlockMouse() { render_widget_host_->LostMouseLock(); } -void RenderWidgetHostViewWin::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void RenderWidgetHostViewWin::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED); // Get the RenderProcessHost that posted this notification, and exit // if it's not the one associated with this host view. RenderProcessHost* render_process_host = - Source<RenderProcessHost>(source).ptr(); + content::Source<RenderProcessHost>(source).ptr(); DCHECK(render_process_host); if (!render_widget_host_ || render_process_host != render_widget_host_->process()) diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h index d3a5652..72eec9b 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.h +++ b/content/browser/renderer_host/render_widget_host_view_win.h @@ -22,8 +22,8 @@ #include "content/browser/accessibility/browser_accessibility_manager.h" #include "content/browser/renderer_host/render_widget_host_view.h" #include "content/common/content_export.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/base/win/ime_input.h" #include "ui/gfx/native_widget_types.h" #include "ui/gfx/point.h" @@ -70,7 +70,7 @@ class RenderWidgetHostViewWin CWindow, RenderWidgetHostHWNDTraits>, public RenderWidgetHostView, - public NotificationObserver, + public content::NotificationObserver, public BrowserAccessibilityDelegate { public: // The view will associate itself with the given widget. @@ -186,10 +186,10 @@ class RenderWidgetHostViewWin virtual bool LockMouse() OVERRIDE; virtual void UnlockMouse() OVERRIDE; - // Implementation of NotificationObserver: + // Implementation of content::NotificationObserver: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) OVERRIDE; + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; // Implementation of BrowserAccessibilityDelegate: virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE; @@ -384,7 +384,7 @@ class RenderWidgetHostViewWin SkColor overlay_color_; // Registrar so we can listen to RENDERER_PROCESS_TERMINATED events. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // Stores the current text input type received by TextInputStateChanged() // method. diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc index 184a54a..47418bc 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.cc +++ b/content/browser/renderer_host/resource_dispatcher_host.cc @@ -1905,7 +1905,8 @@ void ResourceDispatcherHost::NotifyOnUI(int type, if (rvh) { RenderViewHostDelegate* rvhd = rvh->delegate(); NotificationService::current()->Notify( - type, Source<RenderViewHostDelegate>(rvhd), Details<T>(detail)); + type, content::Source<RenderViewHostDelegate>(rvhd), + content::Details<T>(detail)); } delete detail; } diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h index 2dc5eec..86566ce 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.h +++ b/content/browser/renderer_host/resource_dispatcher_host.h @@ -34,7 +34,6 @@ class CrossSiteResourceHandler; class DownloadFileManager; class LoginHandler; -class NotificationDetails; class PluginService; class ResourceDispatcherHostDelegate; class ResourceDispatcherHostRequestInfo; diff --git a/content/browser/site_instance.cc b/content/browser/site_instance.cc index 10d6351..49e19a3 100644 --- a/content/browser/site_instance.cc +++ b/content/browser/site_instance.cc @@ -44,7 +44,7 @@ SiteInstance::SiteInstance(BrowsingInstance* browsing_instance) SiteInstance::~SiteInstance() { NotificationService::current()->Notify( content::NOTIFICATION_SITE_INSTANCE_DELETED, - Source<SiteInstance>(this), + content::Source<SiteInstance>(this), NotificationService::NoDetails()); // Now that no one is referencing us, we can safely remove ourselves from @@ -221,10 +221,10 @@ GURL SiteInstance::GetEffectiveURL(content::BrowserContext* browser_context, } void SiteInstance::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED); - RenderProcessHost* rph = Source<RenderProcessHost>(source).ptr(); + RenderProcessHost* rph = content::Source<RenderProcessHost>(source).ptr(); if (rph == process_) process_ = NULL; } diff --git a/content/browser/site_instance.h b/content/browser/site_instance.h index 0a3494f..7631f8c 100644 --- a/content/browser/site_instance.h +++ b/content/browser/site_instance.h @@ -8,8 +8,8 @@ #include "content/browser/renderer_host/render_process_host.h" #include "content/common/content_export.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" class BrowsingInstance; @@ -53,7 +53,7 @@ class BrowserContext; // /////////////////////////////////////////////////////////////////////////////// class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance>, - public NotificationObserver { + public content::NotificationObserver { public: // Returns a unique ID for this SiteInstance. int32 id() { return id_; } @@ -165,10 +165,10 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance>, const GURL& url); 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); // The next available SiteInstance ID. static int32 next_site_instance_id_; @@ -176,7 +176,7 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance>, // A unique ID for this SiteInstance. int32 id_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; // BrowsingInstance to which this SiteInstance belongs. scoped_refptr<BrowsingInstance> browsing_instance_; diff --git a/content/browser/speech/speech_input_browsertest.cc b/content/browser/speech/speech_input_browsertest.cc index e37fd1c..73f9596 100644 --- a/content/browser/speech/speech_input_browsertest.cc +++ b/content/browser/speech/speech_input_browsertest.cc @@ -167,7 +167,7 @@ class SpeechInputBrowserTest : public InProcessBrowserTest { TabContents* tab_contents = browser()->GetSelectedTabContents(); ui_test_utils::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, - Source<NavigationController>(&tab_contents->controller())); + content::Source<NavigationController>(&tab_contents->controller())); tab_contents->render_view_host()->ForwardMouseEvent(mouse_event); mouse_event.type = WebKit::WebInputEvent::MouseUp; tab_contents->render_view_host()->ForwardMouseEvent(mouse_event); diff --git a/content/browser/ssl/ssl_client_auth_handler.cc b/content/browser/ssl/ssl_client_auth_handler.cc index d7699b3..642b554 100644 --- a/content/browser/ssl/ssl_client_auth_handler.cc +++ b/content/browser/ssl/ssl_client_auth_handler.cc @@ -60,8 +60,8 @@ void SSLClientAuthHandler::CertificateSelected(net::X509Certificate* cert) { SSLClientAuthNotificationDetails details(cert_request_info_, cert); NotificationService* service = NotificationService::current(); service->Notify(content::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED, - Source<SSLClientAuthHandler>(this), - Details<SSLClientAuthNotificationDetails>(&details)); + content::Source<SSLClientAuthHandler>(this), + content::Details<SSLClientAuthNotificationDetails>(&details)); CertificateSelectedNoNotify(cert); } @@ -113,19 +113,19 @@ SSLClientAuthObserver::~SSLClientAuthObserver() { void SSLClientAuthObserver::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { VLOG(1) << "SSLClientAuthObserver::Observe " << this << " " << handler_.get(); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(type == content::NOTIFICATION_SSL_CLIENT_AUTH_CERT_SELECTED); - if (Source<SSLClientAuthHandler>(source).ptr() == handler_.get()) { + if (content::Source<SSLClientAuthHandler>(source).ptr() == handler_.get()) { VLOG(1) << "got notification from ourself " << handler_.get(); return; } SSLClientAuthNotificationDetails* auth_details = - Details<SSLClientAuthNotificationDetails>(details).ptr(); + content::Details<SSLClientAuthNotificationDetails>(details).ptr(); if (!auth_details->IsSameHost(cert_request_info_)) return; diff --git a/content/browser/ssl/ssl_client_auth_handler.h b/content/browser/ssl/ssl_client_auth_handler.h index 9905a68..3a6468a 100644 --- a/content/browser/ssl/ssl_client_auth_handler.h +++ b/content/browser/ssl/ssl_client_auth_handler.h @@ -10,8 +10,8 @@ #include "base/memory/ref_counted.h" #include "content/browser/browser_thread.h" #include "content/common/content_export.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 "net/base/ssl_cert_request_info.h" namespace net { @@ -77,7 +77,8 @@ class CONTENT_EXPORT SSLClientAuthHandler DISALLOW_COPY_AND_ASSIGN(SSLClientAuthHandler); }; -class CONTENT_EXPORT SSLClientAuthObserver : public NotificationObserver { +class CONTENT_EXPORT SSLClientAuthObserver + : public content::NotificationObserver { public: SSLClientAuthObserver(net::SSLCertRequestInfo* cert_request_info, SSLClientAuthHandler* handler); @@ -86,10 +87,10 @@ class CONTENT_EXPORT SSLClientAuthObserver : public NotificationObserver { // UI should implement this to close the dialog. virtual void OnCertSelectedByNotification() = 0; - // NotificationObserver implementation: + // content::NotificationObserver implementation: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Begins observing notifications from other SSLClientAuthHandler instances. // If another instance chooses a cert for a matching SSLCertRequestInfo, we @@ -106,7 +107,7 @@ class CONTENT_EXPORT SSLClientAuthObserver : public NotificationObserver { scoped_refptr<SSLClientAuthHandler> handler_; - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; DISALLOW_COPY_AND_ASSIGN(SSLClientAuthObserver); }; diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc index 247c611..19c0546 100644 --- a/content/browser/ssl/ssl_manager.cc +++ b/content/browser/ssl/ssl_manager.cc @@ -19,7 +19,7 @@ #include "content/browser/tab_contents/provisional_load_details.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "net/base/cert_status_flags.h" // static @@ -52,7 +52,7 @@ void SSLManager::NotifySSLInternalStateChanged( NavigationController* controller) { NotificationService::current()->Notify( content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED, - Source<content::BrowserContext>(controller->browser_context()), + content::Source<content::BrowserContext>(controller->browser_context()), NotificationService::NoDetails()); } @@ -102,25 +102,28 @@ SSLManager::SSLManager(NavigationController* controller) // Subscribe to various notifications. registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR, - Source<NavigationController>(controller_)); - registrar_.Add(this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED, - Source<RenderViewHostDelegate>(controller_->tab_contents())); - registrar_.Add(this, content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT, - Source<RenderViewHostDelegate>(controller_->tab_contents())); - registrar_.Add(this, content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, - Source<NavigationController>(controller_)); - registrar_.Add(this, content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED, - Source<content::BrowserContext>( - controller_->browser_context())); + content::Source<NavigationController>(controller_)); + registrar_.Add( + this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED, + content::Source<RenderViewHostDelegate>(controller_->tab_contents())); + registrar_.Add( + this, content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT, + content::Source<RenderViewHostDelegate>(controller_->tab_contents())); + registrar_.Add( + this, content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, + content::Source<NavigationController>(controller_)); + registrar_.Add( + this, content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED, + content::Source<content::BrowserContext>(controller_->browser_context())); } SSLManager::~SSLManager() { } void SSLManager::DidCommitProvisionalLoad( - const NotificationDetails& in_details) { + const content::NotificationDetails& in_details) { content::LoadCommittedDetails* details = - Details<content::LoadCommittedDetails>(in_details).ptr(); + content::Details<content::LoadCommittedDetails>(in_details).ptr(); NavigationEntry* entry = controller_->GetActiveEntry(); @@ -166,23 +169,24 @@ bool SSLManager::ProcessedSSLErrorFromRequest() const { } void SSLManager::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { // Dispatch by type. switch (type) { case content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR: // Do nothing. break; case content::NOTIFICATION_RESOURCE_RESPONSE_STARTED: - DidStartResourceResponse(Details<ResourceRequestDetails>(details).ptr()); + DidStartResourceResponse( + content::Details<ResourceRequestDetails>(details).ptr()); break; case content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT: DidReceiveResourceRedirect( - Details<ResourceRedirectDetails>(details).ptr()); + content::Details<ResourceRedirectDetails>(details).ptr()); break; case content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE: DidLoadFromMemoryCache( - Details<LoadFromMemoryCacheDetails>(details).ptr()); + content::Details<LoadFromMemoryCacheDetails>(details).ptr()); break; case content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED: DidChangeSSLInternalState(); @@ -248,7 +252,7 @@ void SSLManager::UpdateEntry(NavigationEntry* entry) { if (!entry->ssl().Equals(original_ssl_status)) { NotificationService::current()->Notify( content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED, - Source<NavigationController>(controller_), + content::Source<NavigationController>(controller_), NotificationService::NoDetails()); } } diff --git a/content/browser/ssl/ssl_manager.h b/content/browser/ssl/ssl_manager.h index abb9522..34d79e8 100644 --- a/content/browser/ssl/ssl_manager.h +++ b/content/browser/ssl/ssl_manager.h @@ -12,8 +12,8 @@ #include "base/memory/scoped_ptr.h" #include "content/browser/ssl/ssl_policy_backend.h" #include "content/common/content_export.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 "net/base/cert_status_flags.h" #include "net/base/net_errors.h" @@ -40,7 +40,7 @@ class URLRequest; // The security state (secure/insecure) is stored in the navigation entry. // Along with it are stored any SSL error code and the associated cert. -class SSLManager : public NotificationObserver { +class SSLManager : public content::NotificationObserver { public: // Entry point for SSLCertificateErrors. This function begins the process // of resolving a certificate error during an SSL connection. SSLManager @@ -84,7 +84,7 @@ class SSLManager : public NotificationObserver { // This entry point is called directly (instead of via the notification // service) because we need more precise control of the order in which folks // are notified of this event. - void DidCommitProvisionalLoad(const NotificationDetails& details); + void DidCommitProvisionalLoad(const content::NotificationDetails& details); // Insecure content entry point. void DidRunInsecureContent(const std::string& security_origin); @@ -97,8 +97,8 @@ class SSLManager : public NotificationObserver { // // Called on the UI thread. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); private: // Entry points for notifications to which we subscribe. Note that @@ -124,7 +124,7 @@ class SSLManager : public NotificationObserver { NavigationController* controller_; // Handles registering notifications with the NotificationService. - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(SSLManager); }; diff --git a/content/browser/tab_contents/interstitial_page.cc b/content/browser/tab_contents/interstitial_page.cc index b567161..d00ac6fb 100644 --- a/content/browser/tab_contents/interstitial_page.cc +++ b/content/browser/tab_contents/interstitial_page.cc @@ -24,8 +24,8 @@ #include "content/browser/tab_contents/tab_contents_view.h" #include "content/common/dom_storage_common.h" #include "content/common/notification_service.h" -#include "content/common/notification_source.h" #include "content/common/view_messages.h" +#include "content/public/browser/notification_source.h" #include "content/public/common/bindings_policy.h" #include "content/public/common/page_transition_types.h" #include "content/public/common/view_types.h" @@ -194,7 +194,7 @@ void InterstitialPage::Show() { // already been destroyed. notification_registrar_.Add( this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, - Source<RenderWidgetHost>(tab_->render_view_host())); + content::Source<RenderWidgetHost>(tab_->render_view_host())); // Update the tab_to_interstitial_page_ map. iter = tab_to_interstitial_page_->find(tab_); @@ -223,11 +223,11 @@ void InterstitialPage::Show() { notification_registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(tab_)); + content::Source<TabContents>(tab_)); notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, - Source<NavigationController>(&tab_->controller())); + content::Source<NavigationController>(&tab_->controller())); notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, - Source<NavigationController>(&tab_->controller())); + content::Source<NavigationController>(&tab_->controller())); } void InterstitialPage::Hide() { @@ -262,8 +262,8 @@ void InterstitialPage::Hide() { } void InterstitialPage::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case content::NOTIFICATION_NAV_ENTRY_PENDING: // We are navigating away from the interstitial (the user has typed a URL @@ -283,7 +283,7 @@ void InterstitialPage::Observe(int type, // The RenderViewHost is being destroyed (as part of the tab being // closed); make sure we clear the blocked requests. RenderViewHost* rvh = static_cast<RenderViewHost*>( - Source<RenderWidgetHost>(source).ptr()); + content::Source<RenderWidgetHost>(source).ptr()); DCHECK(rvh->process()->id() == original_child_id_ && rvh->routing_id() == original_rvh_id_); TakeActionOnResourceDispatcher(CANCEL); @@ -350,7 +350,7 @@ void InterstitialPage::DidNavigate( // hiding the bookmark bar. NotificationService::current()->Notify( content::NOTIFICATION_INTERSTITIAL_ATTACHED, - Source<TabContents>(tab_), + content::Source<TabContents>(tab_), NotificationService::NoDetails()); RenderWidgetHostView* rwh_view = tab_->render_view_host()->view(); diff --git a/content/browser/tab_contents/interstitial_page.h b/content/browser/tab_contents/interstitial_page.h index b0d33c8..98fbe9e 100644 --- a/content/browser/tab_contents/interstitial_page.h +++ b/content/browser/tab_contents/interstitial_page.h @@ -13,9 +13,9 @@ #include "base/process_util.h" #include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/common/content_export.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" #include "content/common/renderer_preferences.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" #include "ui/gfx/size.h" @@ -41,7 +41,7 @@ enum ResourceRequestAction { CANCEL }; -class CONTENT_EXPORT InterstitialPage : public NotificationObserver, +class CONTENT_EXPORT InterstitialPage : public content::NotificationObserver, public RenderViewHostDelegate { public: // The different state of actions the user can take in an interstitial. @@ -111,10 +111,10 @@ class CONTENT_EXPORT InterstitialPage : public NotificationObserver, bool reload_on_dont_proceed() const { return reload_on_dont_proceed_; } protected: - // NotificationObserver method: + // content::NotificationObserver method: virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // RenderViewHostDelegate implementation: virtual View* GetViewDelegate() OVERRIDE; @@ -156,7 +156,7 @@ class CONTENT_EXPORT InterstitialPage : public NotificationObserver, virtual TabContentsView* CreateTabContentsView(); // Notification magic. - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; private: // AutomationProvider needs access to Proceed and DontProceed to simulate diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc index 88d2e99..4e78f36 100644 --- a/content/browser/tab_contents/navigation_controller.cc +++ b/content/browser/tab_contents/navigation_controller.cc @@ -44,8 +44,8 @@ void NotifyPrunedEntries(NavigationController* nav_controller, details.count = count; NotificationService::current()->Notify( content::NOTIFICATION_NAV_LIST_PRUNED, - Source<NavigationController>(nav_controller), - Details<content::PrunedDetails>(&details)); + content::Source<NavigationController>(nav_controller), + content::Details<content::PrunedDetails>(&details)); } // Ensure the given NavigationEntry has a valid state, so that WebKit does not @@ -135,7 +135,7 @@ NavigationController::~NavigationController() { NotificationService::current()->Notify( content::NOTIFICATION_TAB_CLOSED, - Source<NavigationController>(this), + content::Source<NavigationController>(this), NotificationService::NoDetails()); } @@ -185,7 +185,7 @@ void NavigationController::ReloadInternal(bool check_for_repost, // with check_for_repost = false. NotificationService::current()->Notify( content::NOTIFICATION_REPOST_WARNING_SHOWN, - Source<NavigationController>(this), + content::Source<NavigationController>(this), NotificationService::NoDetails()); pending_reload_ = reload_type; @@ -276,8 +276,8 @@ void NavigationController::LoadEntry(NavigationEntry* entry) { pending_entry_ = entry; NotificationService::current()->Notify( content::NOTIFICATION_NAV_ENTRY_PENDING, - Source<NavigationController>(this), - Details<NavigationEntry>(entry)); + content::Source<NavigationController>(this), + content::Details<NavigationEntry>(entry)); NavigateToPendingEntry(NO_RELOAD); } @@ -1126,8 +1126,8 @@ void NavigationController::NavigateToPendingEntry(ReloadType reload_type) { void NavigationController::NotifyNavigationEntryCommitted( content::LoadCommittedDetails* details) { details->entry = GetActiveEntry(); - NotificationDetails notification_details = - Details<content::LoadCommittedDetails>(details); + content::NotificationDetails notification_details = + content::Details<content::LoadCommittedDetails>(details); // We need to notify the ssl_manager_ before the tab_contents_ so the // location bar will have up-to-date information about the security style @@ -1141,7 +1141,7 @@ void NavigationController::NotifyNavigationEntryCommitted( NotificationService::current()->Notify( content::NOTIFICATION_NAV_ENTRY_COMMITTED, - Source<NavigationController>(this), + content::Source<NavigationController>(this), notification_details); } @@ -1173,8 +1173,8 @@ void NavigationController::NotifyEntryChanged(const NavigationEntry* entry, det.index = index; NotificationService::current()->Notify( content::NOTIFICATION_NAV_ENTRY_CHANGED, - Source<NavigationController>(this), - Details<content::EntryChangedDetails>(&det)); + content::Source<NavigationController>(this), + content::Details<content::EntryChangedDetails>(&det)); } void NavigationController::FinishRestore(int selected_index, diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc index 543c98a..cf6b72e 100644 --- a/content/browser/tab_contents/navigation_controller_unittest.cc +++ b/content/browser/tab_contents/navigation_controller_unittest.cc @@ -25,8 +25,8 @@ #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_delegate.h" #include "content/browser/tab_contents/test_tab_contents.h" -#include "content/common/notification_registrar.h" #include "content/common/view_messages.h" +#include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_types.h" #include "content/test/test_notification_tracker.h" #include "net/base/net_util.h" @@ -45,11 +45,11 @@ class NavigationControllerTest : public ChromeRenderViewHostTestHarness { void RegisterForAllNavNotifications(TestNotificationTracker* tracker, NavigationController* controller) { tracker->ListenFor(content::NOTIFICATION_NAV_ENTRY_COMMITTED, - Source<NavigationController>(controller)); + content::Source<NavigationController>(controller)); tracker->ListenFor(content::NOTIFICATION_NAV_LIST_PRUNED, - Source<NavigationController>(controller)); + content::Source<NavigationController>(controller)); tracker->ListenFor(content::NOTIFICATION_NAV_ENTRY_CHANGED, - Source<NavigationController>(controller)); + content::Source<NavigationController>(controller)); } class TestTabContentsDelegate : public TabContentsDelegate { @@ -1380,20 +1380,20 @@ TEST_F(NavigationControllerTest, ClientRedirectAfterInPageNavigation) { // NotificationObserver implementation used in verifying we've received the // content::NOTIFICATION_NAV_LIST_PRUNED method. -class PrunedListener : public NotificationObserver { +class PrunedListener : public content::NotificationObserver { public: explicit PrunedListener(NavigationController* controller) : notification_count_(0) { registrar_.Add(this, content::NOTIFICATION_NAV_LIST_PRUNED, - Source<NavigationController>(controller)); + content::Source<NavigationController>(controller)); } virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { if (type == content::NOTIFICATION_NAV_LIST_PRUNED) { notification_count_++; - details_ = *(Details<content::PrunedDetails>(details).ptr()); + details_ = *(content::Details<content::PrunedDetails>(details).ptr()); } } @@ -1404,7 +1404,7 @@ class PrunedListener : public NotificationObserver { content::PrunedDetails details_; private: - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(PrunedListener); }; diff --git a/content/browser/tab_contents/popup_menu_helper_mac.h b/content/browser/tab_contents/popup_menu_helper_mac.h index 2d18d72..0e134b2 100644 --- a/content/browser/tab_contents/popup_menu_helper_mac.h +++ b/content/browser/tab_contents/popup_menu_helper_mac.h @@ -7,14 +7,14 @@ #include <vector> -#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" class RenderViewHost; struct WebMenuItem; -class PopupMenuHelper : public NotificationObserver { +class PopupMenuHelper : public content::NotificationObserver { public: // Creates a PopupMenuHelper that will notify |render_view_host| when a user // selects or cancels the popup. @@ -31,12 +31,12 @@ class PopupMenuHelper : public NotificationObserver { bool right_aligned); 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); - NotificationRegistrar notification_registrar_; + content::NotificationRegistrar notification_registrar_; RenderViewHost* render_view_host_; diff --git a/content/browser/tab_contents/popup_menu_helper_mac.mm b/content/browser/tab_contents/popup_menu_helper_mac.mm index 9fba03b..c0f6ac6 100644 --- a/content/browser/tab_contents/popup_menu_helper_mac.mm +++ b/content/browser/tab_contents/popup_menu_helper_mac.mm @@ -11,7 +11,7 @@ #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_widget_host_view_mac.h" #import "content/common/chrome_application_mac.h" -#include "content/common/notification_source.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #import "ui/base/cocoa/base_view.h" #include "webkit/glue/webmenurunner_mac.h" @@ -20,7 +20,7 @@ PopupMenuHelper::PopupMenuHelper(RenderViewHost* render_view_host) : render_view_host_(render_view_host) { notification_registrar_.Add( this, content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, - Source<RenderWidgetHost>(render_view_host)); + content::Source<RenderWidgetHost>(render_view_host)); } void PopupMenuHelper::ShowPopupMenu( @@ -78,10 +78,10 @@ void PopupMenuHelper::ShowPopupMenu( void PopupMenuHelper::Observe( int type, - const NotificationSource& source, - const NotificationDetails& details) { + const content::NotificationSource& source, + const content::NotificationDetails& details) { DCHECK(type == content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED); - DCHECK(Source<RenderWidgetHost>(source).ptr() == render_view_host_); + DCHECK(content::Source<RenderWidgetHost>(source).ptr() == render_view_host_); render_view_host_ = NULL; } diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc index cf437c3..50ab46e 100644 --- a/content/browser/tab_contents/render_view_host_manager.cc +++ b/content/browser/tab_contents/render_view_host_manager.cc @@ -114,9 +114,9 @@ RenderViewHost* RenderViewHostManager::Navigate(const NavigationEntry& entry) { details.old_host = NULL; NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED, - Source<NavigationController>( + content::Source<NavigationController>( &delegate_->GetControllerForRenderManager()), - Details<RenderViewHostSwitchedDetails>(&details)); + content::Details<RenderViewHostSwitchedDetails>(&details)); } } @@ -313,12 +313,13 @@ void RenderViewHostManager::OnCrossSiteNavigationCanceled() { CancelPending(); } -void RenderViewHostManager::Observe(int type, - const NotificationSource& source, - const NotificationDetails& details) { +void RenderViewHostManager::Observe( + int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) { switch (type) { case content::NOTIFICATION_RENDERER_PROCESS_CLOSING: - RendererProcessClosing(Source<RenderProcessHost>(source).ptr()); + RendererProcessClosing(content::Source<RenderProcessHost>(source).ptr()); break; default: @@ -614,8 +615,9 @@ void RenderViewHostManager::CommitPending() { details.old_host = old_render_view_host; NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED, - Source<NavigationController>(&delegate_->GetControllerForRenderManager()), - Details<RenderViewHostSwitchedDetails>(&details)); + content::Source<NavigationController>( + &delegate_->GetControllerForRenderManager()), + content::Details<RenderViewHostSwitchedDetails>(&details)); // If the pending view was on the swapped out list, we can remove it. swapped_out_hosts_.erase(render_view_host_->site_instance()->id()); diff --git a/content/browser/tab_contents/render_view_host_manager.h b/content/browser/tab_contents/render_view_host_manager.h index 4a2e765..392fef9 100644 --- a/content/browser/tab_contents/render_view_host_manager.h +++ b/content/browser/tab_contents/render_view_host_manager.h @@ -10,10 +10,10 @@ #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "content/browser/renderer_host/render_view_host_delegate.h" -#include "content/common/content_export.h" -#include "content/common/notification_observer.h" -#include "content/common/notification_registrar.h" #include "content/browser/site_instance.h" +#include "content/common/content_export.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" class InterstitialPage; class NavigationController; @@ -31,7 +31,7 @@ class BrowserContext; // RenderViewHosts) that can get complex. class CONTENT_EXPORT RenderViewHostManager : public RenderViewHostDelegate::RendererManagement, - public NotificationObserver { + public content::NotificationObserver { public: // Functions implemented by our owner that we need. // @@ -177,10 +177,10 @@ class CONTENT_EXPORT RenderViewHostManager int new_request_id); virtual void OnCrossSiteNavigationCanceled(); - // NotificationObserver implementation. + // content::NotificationObserver implementation. virtual void Observe(int type, - const NotificationSource& source, - const NotificationDetails& details); + const content::NotificationSource& source, + const content::NotificationDetails& details); // Called when a RenderViewHost is about to be deleted. void RenderViewDeleted(RenderViewHost* rvh); @@ -276,7 +276,7 @@ class CONTENT_EXPORT RenderViewHostManager // (the InterstitialPage is self-owned, it deletes itself when hidden). InterstitialPage* interstitial_page_; - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(RenderViewHostManager); }; diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc index d8e6afe..a22b800 100644 --- a/content/browser/tab_contents/render_view_host_manager_unittest.cc +++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc @@ -11,10 +11,10 @@ #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/render_view_host_manager.h" #include "content/browser/tab_contents/test_tab_contents.h" -#include "content/common/notification_details.h" -#include "content/common/notification_source.h" #include "content/common/test_url_constants.h" #include "content/common/view_messages.h" +#include "content/public/browser/notification_details.h" +#include "content/public/browser/notification_source.h" #include "content/public/browser/notification_types.h" #include "content/public/common/page_transition_types.h" #include "content/test/test_notification_tracker.h" @@ -193,8 +193,9 @@ TEST_F(RenderViewHostManagerTest, Navigate) { SiteInstance* instance = SiteInstance::CreateSiteInstance(profile()); TestTabContents tab_contents(profile(), instance); - notifications.ListenFor(content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED, - Source<NavigationController>(&tab_contents.controller())); + notifications.ListenFor( + content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED, + content::Source<NavigationController>(&tab_contents.controller())); // Create. RenderViewHostManager manager(&tab_contents, &tab_contents); diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc index 98dc8b9..7d9af87 100644 --- a/content/browser/tab_contents/tab_contents.cc +++ b/content/browser/tab_contents/tab_contents.cc @@ -224,7 +224,7 @@ TabContents::~TabContents() { // Notify any observer that have a reference on this tab contents. NotificationService::current()->Notify( content::NOTIFICATION_TAB_CONTENTS_DESTROYED, - Source<TabContents>(this), + content::Source<TabContents>(this), NotificationService::NoDetails()); // TODO(brettw) this should be moved to the view. @@ -453,7 +453,7 @@ void TabContents::WasHidden() { NotificationService::current()->Notify( content::NOTIFICATION_TAB_CONTENTS_HIDDEN, - Source<TabContents>(this), + content::Source<TabContents>(this), NotificationService::NoDetails()); } @@ -985,8 +985,8 @@ void TabContents::OnDidFailProvisionalLoadWithError( NotificationService::current()->Notify( content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR, - Source<NavigationController>(&controller_), - Details<ProvisionalLoadDetails>(&details)); + content::Source<NavigationController>(&controller_), + content::Details<ProvisionalLoadDetails>(&details)); FOR_EACH_OBSERVER(TabContentsObserver, observers_, @@ -1019,8 +1019,8 @@ void TabContents::OnDidLoadResourceFromMemoryCache( NotificationService::current()->Notify( content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, - Source<NavigationController>(&controller_), - Details<LoadFromMemoryCacheDetails>(&details)); + content::Source<NavigationController>(&controller_), + content::Details<LoadFromMemoryCacheDetails>(&details)); } void TabContents::OnDidDisplayInsecureContent() { @@ -1092,8 +1092,8 @@ void TabContents::OnUpdateZoomLimits(int minimum_percent, void TabContents::OnFocusedNodeChanged(bool is_editable_node) { NotificationService::current()->Notify( content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, - Source<TabContents>(this), - Details<const bool>(&is_editable_node)); + content::Source<TabContents>(this), + content::Details<const bool>(&is_editable_node)); } void TabContents::OnEnumerateDirectory(int request_id, @@ -1177,11 +1177,11 @@ void TabContents::SetIsLoading(bool is_loading, int type = is_loading ? content::NOTIFICATION_LOAD_START : content::NOTIFICATION_LOAD_STOP; - NotificationDetails det = NotificationService::NoDetails(); + content::NotificationDetails det = NotificationService::NoDetails(); if (details) - det = Details<LoadNotificationDetails>(details); + det = content::Details<LoadNotificationDetails>(details); NotificationService::current()->Notify(type, - Source<NavigationController>(&controller_), + content::Source<NavigationController>(&controller_), det); } @@ -1350,8 +1350,8 @@ bool TabContents::UpdateTitleForEntry(NavigationEntry* entry, NotificationService::current()->Notify( content::NOTIFICATION_TAB_CONTENTS_TITLE_UPDATED, - Source<TabContents>(this), - Details<TitleUpdatedDetails>(&details)); + content::Source<TabContents>(this), + content::Details<TitleUpdatedDetails>(&details)); return true; } @@ -1363,7 +1363,7 @@ void TabContents::NotifySwapped() { notify_disconnection_ = true; NotificationService::current()->Notify( content::NOTIFICATION_TAB_CONTENTS_SWAPPED, - Source<TabContents>(this), + content::Source<TabContents>(this), NotificationService::NoDetails()); } @@ -1371,7 +1371,7 @@ void TabContents::NotifyConnected() { notify_disconnection_ = true; NotificationService::current()->Notify( content::NOTIFICATION_TAB_CONTENTS_CONNECTED, - Source<TabContents>(this), + content::Source<TabContents>(this), NotificationService::NoDetails()); } @@ -1382,7 +1382,7 @@ void TabContents::NotifyDisconnected() { notify_disconnection_ = false; NotificationService::current()->Notify( content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED, - Source<TabContents>(this), + content::Source<TabContents>(this), NotificationService::NoDetails()); } @@ -1411,8 +1411,8 @@ content::ViewType TabContents::GetRenderViewType() const { void TabContents::RenderViewCreated(RenderViewHost* render_view_host) { NotificationService::current()->Notify( content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB, - Source<TabContents>(this), - Details<RenderViewHost>(render_view_host)); + content::Source<TabContents>(this), + content::Details<RenderViewHost>(render_view_host)); NavigationEntry* entry = controller_.GetActiveEntry(); if (!entry) return; @@ -1680,8 +1680,8 @@ void TabContents::DocumentOnLoadCompletedInMainFrame( int32 page_id) { NotificationService::current()->Notify( content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, - Source<TabContents>(this), - Details<int>(&page_id)); + content::Source<TabContents>(this), + content::Details<int>(&page_id)); } void TabContents::RequestOpenURL(const GURL& url, diff --git a/content/browser/user_metrics.cc b/content/browser/user_metrics.cc index 31facf8..7224b89 100644 --- a/content/browser/user_metrics.cc +++ b/content/browser/user_metrics.cc @@ -24,9 +24,10 @@ void UserMetrics::Record(const char *action) { return; } - NotificationService::current()->Notify(content::NOTIFICATION_USER_ACTION, - NotificationService::AllSources(), - Details<const char*>(&action)); + NotificationService::current()->Notify( + content::NOTIFICATION_USER_ACTION, + NotificationService::AllSources(), + content::Details<const char*>(&action)); } void UserMetrics::CallRecordOnUI(const std::string& action) { diff --git a/content/browser/worker_host/worker_service.h b/content/browser/worker_host/worker_service.h index c9f8464..635dd8b 100644 --- a/content/browser/worker_host/worker_service.h +++ b/content/browser/worker_host/worker_service.h @@ -12,7 +12,7 @@ #include "base/threading/non_thread_safe.h" #include "content/browser/worker_host/worker_process_host.h" #include "content/common/content_export.h" -#include "content/common/notification_registrar.h" +#include "content/public/browser/notification_registrar.h" #include "googleurl/src/gurl.h" namespace content { @@ -133,7 +133,7 @@ class WorkerService { const string16& name, const content::ResourceContext* resource_context); - NotificationRegistrar registrar_; + content::NotificationRegistrar registrar_; int next_worker_route_id_; WorkerProcessHost::Instances queued_workers_; |