diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/DEPS | 1 | ||||
-rw-r--r-- | chrome/renderer/chrome_render_process_observer.cc | 10 | ||||
-rw-r--r-- | chrome/renderer/chrome_render_process_observer.h | 9 | ||||
-rw-r--r-- | chrome/renderer/mock_render_thread.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/mock_render_thread.h | 1 |
5 files changed, 13 insertions, 12 deletions
diff --git a/chrome/DEPS b/chrome/DEPS index 4d20732..2580f54 100644 --- a/chrome/DEPS +++ b/chrome/DEPS @@ -13,6 +13,7 @@ include_rules = [ "+chrome/test", "-content", "+content/common", + "+content/public/common", "+content/test", # Don't allow inclusion of these other libs we shouldn't be calling directly. diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc index ddd02b6..dd6edbd 100644 --- a/chrome/renderer/chrome_render_process_observer.cc +++ b/chrome/renderer/chrome_render_process_observer.cc @@ -21,9 +21,9 @@ #include "chrome/renderer/chrome_content_renderer_client.h" #include "chrome/renderer/content_settings_observer.h" #include "chrome/renderer/security_filter_peer.h" -#include "content/common/resource_dispatcher.h" -#include "content/common/resource_dispatcher_delegate.h" +#include "content/common/child_thread.h" #include "content/common/view_messages.h" +#include "content/public/common/resource_dispatcher_delegate.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/render_view_visitor.h" #include "content/public/renderer/render_view.h" @@ -58,7 +58,7 @@ namespace { static const unsigned int kCacheStatsDelayMS = 2000 /* milliseconds */; -class RendererResourceDelegate : public ResourceDispatcherDelegate { +class RendererResourceDelegate : public content::ResourceDispatcherDelegate { public: RendererResourceDelegate() : ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) { @@ -211,7 +211,9 @@ ChromeRenderProcessObserver::ChromeRenderProcessObserver( RenderThread* thread = RenderThread::Get(); resource_delegate_.reset(new RendererResourceDelegate()); - thread->GetResourceDispatcher()->set_delegate(resource_delegate_.get()); + + ChildThread* child_thread = ChildThread::current(); + child_thread->SetResourceDispatcherDelegate(resource_delegate_.get()); #if defined(OS_POSIX) thread->AddFilter(new SuicideOnChannelErrorFilter()); diff --git a/chrome/renderer/chrome_render_process_observer.h b/chrome/renderer/chrome_render_process_observer.h index b7740e6..7c14c24 100644 --- a/chrome/renderer/chrome_render_process_observer.h +++ b/chrome/renderer/chrome_render_process_observer.h @@ -13,13 +13,16 @@ #include "base/memory/scoped_ptr.h" #include "content/public/renderer/render_process_observer.h" +class GURL; +struct ContentSettings; + namespace chrome { class ChromeContentRendererClient; } -class GURL; +namespace content { class ResourceDispatcherDelegate; -struct ContentSettings; +} // This class filters the incoming control messages (i.e. ones not destined for // a RenderView) for Chrome specific messages that the content layer doesn't @@ -62,7 +65,7 @@ class ChromeRenderProcessObserver : public content::RenderProcessObserver { void OnPurgeMemory(); static bool is_incognito_process_; - scoped_ptr<ResourceDispatcherDelegate> resource_delegate_; + scoped_ptr<content::ResourceDispatcherDelegate> resource_delegate_; chrome::ChromeContentRendererClient* client_; // If true, the web cache shall be cleared before the next navigation event. bool clear_cache_pending_; diff --git a/chrome/renderer/mock_render_thread.cc b/chrome/renderer/mock_render_thread.cc index e36047e..982e5ac 100644 --- a/chrome/renderer/mock_render_thread.cc +++ b/chrome/renderer/mock_render_thread.cc @@ -66,10 +66,6 @@ IPC::SyncChannel* MockRenderThread::GetChannel() { return NULL; } -ResourceDispatcher* MockRenderThread::GetResourceDispatcher() { - return NULL; -} - std::string MockRenderThread::GetLocale() { return std::string(); } diff --git a/chrome/renderer/mock_render_thread.h b/chrome/renderer/mock_render_thread.h index b0beefd..31ce743 100644 --- a/chrome/renderer/mock_render_thread.h +++ b/chrome/renderer/mock_render_thread.h @@ -46,7 +46,6 @@ class MockRenderThread : public content::RenderThread { virtual bool Send(IPC::Message* msg) OVERRIDE; virtual MessageLoop* GetMessageLoop() OVERRIDE; virtual IPC::SyncChannel* GetChannel() OVERRIDE; - virtual ResourceDispatcher* GetResourceDispatcher() OVERRIDE; virtual std::string GetLocale() OVERRIDE; virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) OVERRIDE; |