diff options
27 files changed, 317 insertions, 323 deletions
diff --git a/chrome/browser/appcache/appcache_dispatcher_host.h b/chrome/browser/appcache/appcache_dispatcher_host.h index 425fdd2..364a4e8 100644 --- a/chrome/browser/appcache/appcache_dispatcher_host.h +++ b/chrome/browser/appcache/appcache_dispatcher_host.h @@ -23,7 +23,7 @@ class URLRequestContextGetter; // Handles appcache related messages sent to the main browser process from // its child processes. There is a distinct host for each child process. -// Messages are handled on the IO thread. The ResourceMessageFilter and +// Messages are handled on the IO thread. The BrowserRenderProcessHost and // WorkerProcessHost create an instance and delegates calls to it. class AppCacheDispatcherHost : public BrowserMessageFilter { public: diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc index 98461d7..500b62b 100644 --- a/chrome/browser/automation/automation_resource_message_filter.cc +++ b/chrome/browser/automation/automation_resource_message_filter.cc @@ -14,7 +14,7 @@ #include "chrome/browser/net/url_request_mock_util.h" #include "chrome/browser/net/url_request_slow_download_job.h" #include "chrome/browser/net/url_request_slow_http_job.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/common/automation_messages.h" #include "chrome/common/chrome_paths.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/file_system/file_system_dispatcher_host.h b/chrome/browser/file_system/file_system_dispatcher_host.h index b7f50ed..8f1620b 100644 --- a/chrome/browser/file_system/file_system_dispatcher_host.h +++ b/chrome/browser/file_system/file_system_dispatcher_host.h @@ -23,7 +23,7 @@ class GURL; class HostContentSettingsMap; class Profile; class Receiver; -class ResourceMessageFilter; +class RenderMessageFilter; class URLRequestContext; class URLRequestContextGetter; diff --git a/chrome/browser/geolocation/geolocation_dispatcher_host_old.cc b/chrome/browser/geolocation/geolocation_dispatcher_host_old.cc index 0af76e0..ca5298d 100644 --- a/chrome/browser/geolocation/geolocation_dispatcher_host_old.cc +++ b/chrome/browser/geolocation/geolocation_dispatcher_host_old.cc @@ -11,10 +11,10 @@ #include "chrome/common/geoposition.h" #include "chrome/browser/geolocation/geolocation_permission_context.h" #include "chrome/browser/geolocation/geolocation_provider.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_view_host_notification_task.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/common/render_messages.h" #include "ipc/ipc_message.h" diff --git a/chrome/browser/gpu_process_host.cc b/chrome/browser/gpu_process_host.cc index 8626fde..af4229a 100644 --- a/chrome/browser/gpu_process_host.cc +++ b/chrome/browser/gpu_process_host.cc @@ -13,9 +13,9 @@ #include "chrome/browser/browser_thread.h" #include "chrome/browser/gpu_blacklist.h" #include "chrome/browser/gpu_process_host_ui_shim.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host_view.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/gpu_feature_flags.h" @@ -142,7 +142,7 @@ void GpuProcessHost::OnMessageReceived(const IPC::Message& message) { } void GpuProcessHost::EstablishGpuChannel(int renderer_id, - ResourceMessageFilter* filter) { + RenderMessageFilter* filter) { DCHECK(CalledOnValidThread()); if (Send(new GpuMsg_EstablishChannel(renderer_id))) { @@ -153,7 +153,7 @@ void GpuProcessHost::EstablishGpuChannel(int renderer_id, } void GpuProcessHost::Synchronize(IPC::Message* reply, - ResourceMessageFilter* filter) { + RenderMessageFilter* filter) { DCHECK(CalledOnValidThread()); if (Send(new GpuMsg_Synchronize())) { @@ -163,7 +163,7 @@ void GpuProcessHost::Synchronize(IPC::Message* reply, } } -GpuProcessHost::ChannelRequest::ChannelRequest(ResourceMessageFilter* filter) +GpuProcessHost::ChannelRequest::ChannelRequest(RenderMessageFilter* filter) : filter(filter) { } @@ -171,7 +171,7 @@ GpuProcessHost::ChannelRequest::~ChannelRequest() {} GpuProcessHost::SynchronizationRequest::SynchronizationRequest( IPC::Message* reply, - ResourceMessageFilter* filter) + RenderMessageFilter* filter) : reply(reply), filter(filter) { } @@ -460,7 +460,7 @@ void GpuProcessHost::OnGetCompositorHostWindow( void GpuProcessHost::SendEstablishChannelReply( const IPC::ChannelHandle& channel, const GPUInfo& gpu_info, - ResourceMessageFilter* filter) { + RenderMessageFilter* filter) { ViewMsg_GpuChannelEstablished* message = new ViewMsg_GpuChannelEstablished(channel, gpu_info); // If the renderer process is performing synchronous initialization, @@ -473,7 +473,7 @@ void GpuProcessHost::SendEstablishChannelReply( // Sends the response for synchronization request to the renderer. void GpuProcessHost::SendSynchronizationReply( IPC::Message* reply, - ResourceMessageFilter* filter) { + RenderMessageFilter* filter) { filter->Send(reply); } diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h index a3c2dfc..a2b3c9e 100644 --- a/chrome/browser/gpu_process_host.h +++ b/chrome/browser/gpu_process_host.h @@ -18,7 +18,7 @@ struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; class GpuBlacklist; class GPUInfo; -class ResourceMessageFilter; +class RenderMessageFilter; namespace gfx { class Size; @@ -42,28 +42,25 @@ class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { // Tells the GPU process to create a new channel for communication with a // renderer. Will asynchronously send message to object with given routing id // on completion. - void EstablishGpuChannel(int renderer_id, - ResourceMessageFilter* filter); + void EstablishGpuChannel(int renderer_id, RenderMessageFilter* filter); // Sends a reply message later when the next GpuHostMsg_SynchronizeReply comes // in. - void Synchronize(IPC::Message* reply, - ResourceMessageFilter* filter); + void Synchronize(IPC::Message* reply, RenderMessageFilter* filter); private: // Used to queue pending channel requests. struct ChannelRequest { - explicit ChannelRequest(ResourceMessageFilter* filter); + explicit ChannelRequest(RenderMessageFilter* filter); ~ChannelRequest(); // Used to send the reply message back to the renderer. - scoped_refptr<ResourceMessageFilter> filter; + scoped_refptr<RenderMessageFilter> filter; }; // Used to queue pending synchronization requests. struct SynchronizationRequest { - SynchronizationRequest(IPC::Message* reply, - ResourceMessageFilter* filter); + SynchronizationRequest(IPC::Message* reply, RenderMessageFilter* filter); ~SynchronizationRequest(); // The delayed reply message which needs to be sent to the @@ -71,7 +68,7 @@ class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { IPC::Message* reply; // Used to send the reply message back to the renderer. - scoped_refptr<ResourceMessageFilter> filter; + scoped_refptr<RenderMessageFilter> filter; }; GpuProcessHost(); @@ -104,10 +101,10 @@ class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { // Sends the response for establish channel request to the renderer. void SendEstablishChannelReply(const IPC::ChannelHandle& channel, const GPUInfo& gpu_info, - ResourceMessageFilter* filter); + RenderMessageFilter* filter); // Sends the response for synchronization request to the renderer. void SendSynchronizationReply(IPC::Message* reply, - ResourceMessageFilter* filter); + RenderMessageFilter* filter); // ResourceDispatcherHost::Receiver implementation: virtual URLRequestContext* GetRequestContext( diff --git a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc index 4056a95..6fb7d82 100644 --- a/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc +++ b/chrome/browser/in_process_webkit/indexed_db_dispatcher_host.cc @@ -11,8 +11,8 @@ #include "chrome/browser/in_process_webkit/indexed_db_callbacks.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/renderer_host/browser_render_process_host.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_view_host_notification_task.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/indexed_db_messages.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index 8200892..ded7390 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -13,7 +13,7 @@ #include "base/command_line.h" #include "base/metrics/nacl_histogram.h" #include "base/utf_string_conversions.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/logging_chrome.h" #include "chrome/common/nacl_cmd_line.h" @@ -74,10 +74,10 @@ NaClProcessHost::~NaClProcessHost() { // OnProcessLaunched didn't get called because the process couldn't launch. // Don't keep the renderer hanging. reply_msg_->set_reply_error(); - resource_message_filter_->Send(reply_msg_); + render_message_filter_->Send(reply_msg_); } -bool NaClProcessHost::Launch(ResourceMessageFilter* resource_message_filter, +bool NaClProcessHost::Launch(RenderMessageFilter* render_message_filter, int socket_count, IPC::Message* reply_msg) { #ifdef DISABLE_NACL @@ -116,7 +116,7 @@ bool NaClProcessHost::Launch(ResourceMessageFilter* resource_message_filter, return false; } UmaNaclHistogramEnumeration(NACL_STARTED); - resource_message_filter_ = resource_message_filter; + render_message_filter_ = render_message_filter; reply_msg_ = reply_msg; return true; @@ -186,7 +186,7 @@ void NaClProcessHost::OnProcessLaunched() { HANDLE handle_in_renderer; DuplicateHandle(base::GetCurrentProcessHandle(), reinterpret_cast<HANDLE>(sockets_for_renderer_[i]), - resource_message_filter_->handle(), + render_message_filter_->handle(), &handle_in_renderer, GENERIC_READ | GENERIC_WRITE, FALSE, @@ -207,7 +207,7 @@ void NaClProcessHost::OnProcessLaunched() { // Copy the process handle into the renderer process. DuplicateHandle(base::GetCurrentProcessHandle(), handle(), - resource_message_filter_->handle(), + render_message_filter_->handle(), &nacl_process_handle, PROCESS_DUP_HANDLE, FALSE, @@ -222,8 +222,8 @@ void NaClProcessHost::OnProcessLaunched() { ViewHostMsg_LaunchNaCl::WriteReplyParams( reply_msg_, handles_for_renderer, nacl_process_handle, nacl_process_id); - resource_message_filter_->Send(reply_msg_); - resource_message_filter_ = NULL; + render_message_filter_->Send(reply_msg_); + render_message_filter_ = NULL; reply_msg_ = NULL; sockets_for_renderer_.clear(); diff --git a/chrome/browser/nacl_host/nacl_process_host.h b/chrome/browser/nacl_host/nacl_process_host.h index 618492a..3b35bf7 100644 --- a/chrome/browser/nacl_host/nacl_process_host.h +++ b/chrome/browser/nacl_host/nacl_process_host.h @@ -13,7 +13,7 @@ #include "chrome/common/nacl_types.h" #include "native_client/src/shared/imc/nacl_imc.h" -class ResourceMessageFilter; +class RenderMessageFilter; // Represents the browser side of the browser <--> NaCl communication // channel. There will be one NaClProcessHost per NaCl process @@ -28,7 +28,7 @@ class NaClProcessHost : public BrowserChildProcessHost { ~NaClProcessHost(); // Initialize the new NaCl process, returning true on success. - bool Launch(ResourceMessageFilter* resource_message_filter, + bool Launch(RenderMessageFilter* render_message_filter, int socket_count, IPC::Message* reply_msg); @@ -62,9 +62,9 @@ class NaClProcessHost : public BrowserChildProcessHost { private: ResourceDispatcherHost* resource_dispatcher_host_; - // The ResourceMessageFilter that requested this NaCl process. We use this + // The RenderMessageFilter that requested this NaCl process. We use this // for sending the reply once the process has started. - scoped_refptr<ResourceMessageFilter> resource_message_filter_; + scoped_refptr<RenderMessageFilter> render_message_filter_; // The reply message to send. IPC::Message* reply_msg_; diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h index d6de864..e83e804 100644 --- a/chrome/browser/plugin_service.h +++ b/chrome/browser/plugin_service.h @@ -40,7 +40,6 @@ class Message; class MessageLoop; class Profile; class ResourceDispatcherHost; -class ResourceMessageFilter; class URLRequestContext; struct WebPluginInfo; diff --git a/chrome/browser/ppapi_plugin_process_host.cc b/chrome/browser/ppapi_plugin_process_host.cc index ded8964..eda9847 100644 --- a/chrome/browser/ppapi_plugin_process_host.cc +++ b/chrome/browser/ppapi_plugin_process_host.cc @@ -7,14 +7,14 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/process_util.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/render_messages.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_switches.h" #include "ppapi/proxy/ppapi_messages.h" -PpapiPluginProcessHost::PpapiPluginProcessHost(ResourceMessageFilter* filter) +PpapiPluginProcessHost::PpapiPluginProcessHost(RenderMessageFilter* filter) : BrowserChildProcessHost(ChildProcessInfo::PPAPI_PLUGIN_PROCESS, filter->resource_dispatcher_host()), filter_(filter) { diff --git a/chrome/browser/ppapi_plugin_process_host.h b/chrome/browser/ppapi_plugin_process_host.h index dd71b14..905242d 100644 --- a/chrome/browser/ppapi_plugin_process_host.h +++ b/chrome/browser/ppapi_plugin_process_host.h @@ -10,7 +10,7 @@ #include "base/file_path.h" #include "chrome/browser/browser_child_process_host.h" -class ResourceMessageFilter; +class RenderMessageFilter; namespace IPC { struct ChannelHandle; @@ -19,7 +19,7 @@ class Message; class PpapiPluginProcessHost : public BrowserChildProcessHost { public: - explicit PpapiPluginProcessHost(ResourceMessageFilter* filter); + explicit PpapiPluginProcessHost(RenderMessageFilter* filter); virtual ~PpapiPluginProcessHost(); void Init(const FilePath& path, IPC::Message* reply_msg); @@ -42,7 +42,7 @@ class PpapiPluginProcessHost : public BrowserChildProcessHost { void ReplyToRenderer(base::ProcessHandle plugin_handle, const IPC::ChannelHandle& channel_handle); - ResourceMessageFilter* filter_; + RenderMessageFilter* filter_; // Path to the plugin library. FilePath plugin_path_; diff --git a/chrome/browser/printing/print_job_manager.h b/chrome/browser/printing/print_job_manager.h index 017b732..228f7ad 100644 --- a/chrome/browser/printing/print_job_manager.h +++ b/chrome/browser/printing/print_job_manager.h @@ -73,7 +73,7 @@ class PrintJobManager : public NotificationObserver { PrintJobs current_jobs_; // Printing is enabled/disabled. This variable is checked at only one place, - // by ResourceMessageFilter::OnGetDefaultPrintSettings. If its value is true + // by RenderMessageFilter::OnGetDefaultPrintSettings. If its value is true // at that point, then the initiated print flow will complete itself, // even if the value of this variable changes afterwards. bool printing_enabled_; diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 79cdfb3..98b642b 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -51,11 +51,11 @@ #include "chrome/browser/renderer_host/database_message_filter.h" #include "chrome/browser/renderer_host/file_utilities_message_filter.h" #include "chrome/browser/renderer_host/pepper_file_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/renderer_host/render_widget_helper.h" #include "chrome/browser/renderer_host/render_widget_host.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/browser/renderer_host/web_cache_manager.h" #include "chrome/browser/safe_browsing/client_side_detection_service.h" #include "chrome/browser/search_engines/search_provider_install_state_message_filter.h" @@ -386,14 +386,14 @@ bool BrowserRenderProcessHost::Init( } void BrowserRenderProcessHost::CreateMessageFilters() { - scoped_refptr<ResourceMessageFilter> resource_message_filter( - new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(), - id(), - PluginService::GetInstance(), - g_browser_process->print_job_manager(), - profile(), - widget_helper_)); - channel_->AddFilter(resource_message_filter); + scoped_refptr<RenderMessageFilter> render_message_filter( + new RenderMessageFilter(g_browser_process->resource_dispatcher_host(), + id(), + PluginService::GetInstance(), + g_browser_process->print_job_manager(), + profile(), + widget_helper_)); + channel_->AddFilter(render_message_filter); channel_->AddFilter(new AudioRendererHost()); channel_->AddFilter( diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc index a3d66a3..6f12cdd 100644 --- a/chrome/browser/renderer_host/resource_message_filter.cc +++ b/chrome/browser/renderer_host/render_message_filter.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "base/command_line.h" #include "base/file_util.h" @@ -168,7 +168,7 @@ void RenderParamsFromPrintSettings(const printing::PrintSettings& settings, class ClearCacheCompletion : public net::CompletionCallback { public: ClearCacheCompletion(IPC::Message* reply_msg, - ResourceMessageFilter* filter) + RenderMessageFilter* filter) : reply_msg_(reply_msg), filter_(filter) { } @@ -181,12 +181,12 @@ class ClearCacheCompletion : public net::CompletionCallback { private: IPC::Message* reply_msg_; - scoped_refptr<ResourceMessageFilter> filter_; + scoped_refptr<RenderMessageFilter> filter_; }; class OpenChannelToPluginCallback : public PluginProcessHost::Client { public: - OpenChannelToPluginCallback(ResourceMessageFilter* filter, + OpenChannelToPluginCallback(RenderMessageFilter* filter, IPC::Message* reply_msg) : filter_(filter), reply_msg_(reply_msg) { @@ -221,14 +221,14 @@ class OpenChannelToPluginCallback : public PluginProcessHost::Client { delete this; } - scoped_refptr<ResourceMessageFilter> filter_; + scoped_refptr<RenderMessageFilter> filter_; IPC::Message* reply_msg_; WebPluginInfo info_; }; } // namespace -ResourceMessageFilter::ResourceMessageFilter( +RenderMessageFilter::RenderMessageFilter( ResourceDispatcherHost* resource_dispatcher_host, int child_id, PluginService* plugin_service, @@ -268,14 +268,14 @@ ResourceMessageFilter::ResourceMessageFilter( #endif } -ResourceMessageFilter::~ResourceMessageFilter() { +RenderMessageFilter::~RenderMessageFilter() { // This function should be called on the IO thread. DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); // Let interested observers know we are being deleted. NotificationService::current()->Notify( NotificationType::RESOURCE_MESSAGE_FILTER_SHUTDOWN, - Source<ResourceMessageFilter>(this), + Source<RenderMessageFilter>(this), NotificationService::NoDetails()); if (handle()) @@ -283,12 +283,12 @@ ResourceMessageFilter::~ResourceMessageFilter() { } // Called on the IPC thread: -void ResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) { +void RenderMessageFilter::OnFilterAdded(IPC::Channel* channel) { channel_ = channel; } // Called on the IPC thread: -void ResourceMessageFilter::OnChannelConnected(int32 peer_pid) { +void RenderMessageFilter::OnChannelConnected(int32 peer_pid) { DCHECK(!handle()) << " " << handle(); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -301,15 +301,15 @@ void ResourceMessageFilter::OnChannelConnected(int32 peer_pid) { WorkerService::GetInstance()->Initialize(resource_dispatcher_host_); } -void ResourceMessageFilter::OnChannelError() { +void RenderMessageFilter::OnChannelError() { NotificationService::current()->Notify( NotificationType::RESOURCE_MESSAGE_FILTER_SHUTDOWN, - Source<ResourceMessageFilter>(this), + Source<RenderMessageFilter>(this), NotificationService::NoDetails()); } // Called on the IPC thread: -void ResourceMessageFilter::OnChannelClosing() { +void RenderMessageFilter::OnChannelClosing() { channel_ = NULL; // Unhook us from all pending network requests so they don't get sent to a @@ -318,7 +318,7 @@ void ResourceMessageFilter::OnChannelClosing() { } // Called on the IPC thread: -bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { +bool RenderMessageFilter::OnMessageReceived(const IPC::Message& msg) { MessagePortDispatcher* mp_dispatcher = MessagePortDispatcher::GetInstance(); bool msg_is_ok = true; bool handled = @@ -330,7 +330,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { if (!handled) { DCHECK(msg_is_ok); // It should have been marked handled if it wasn't OK. handled = true; - IPC_BEGIN_MESSAGE_MAP_EX(ResourceMessageFilter, msg, msg_is_ok) + IPC_BEGIN_MESSAGE_MAP_EX(RenderMessageFilter, msg, msg_is_ok) // On Linux we need to dispatch these messages to the UI2 thread // because we cannot make X calls from the IO thread. Mac // doesn't have windowed plug-ins so we handle the messages in @@ -486,7 +486,7 @@ bool ResourceMessageFilter::OnMessageReceived(const IPC::Message& msg) { return handled; } -void ResourceMessageFilter::OnRevealFolderInOS(const FilePath& path) { +void RenderMessageFilter::OnRevealFolderInOS(const FilePath& path) { #if defined(OS_MACOSX) const BrowserThread::ID kThreadID = BrowserThread::UI; #else @@ -498,7 +498,7 @@ void ResourceMessageFilter::OnRevealFolderInOS(const FilePath& path) { BrowserThread::PostTask( kThreadID, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OnRevealFolderInOS, path)); + this, &RenderMessageFilter::OnRevealFolderInOS, path)); return; } @@ -506,11 +506,11 @@ void ResourceMessageFilter::OnRevealFolderInOS(const FilePath& path) { platform_util::OpenItem(path); } -void ResourceMessageFilter::OnDestruct() const { +void RenderMessageFilter::OnDestruct() const { BrowserThread::DeleteOnIOThread::Destruct(this); } -void ResourceMessageFilter::OnReceiveContextMenuMsg(const IPC::Message& msg) { +void RenderMessageFilter::OnReceiveContextMenuMsg(const IPC::Message& msg) { void* iter = NULL; ContextMenuParams params; if (!IPC::ParamTraits<ContextMenuParams>::Read(&msg, &iter, ¶ms)) @@ -524,7 +524,7 @@ void ResourceMessageFilter::OnReceiveContextMenuMsg(const IPC::Message& msg) { } // Called on the IPC thread: -bool ResourceMessageFilter::Send(IPC::Message* message) { +bool RenderMessageFilter::Send(IPC::Message* message) { if (!channel_) { delete message; return false; @@ -533,7 +533,7 @@ bool ResourceMessageFilter::Send(IPC::Message* message) { return channel_->Send(message); } -URLRequestContext* ResourceMessageFilter::GetRequestContext( +URLRequestContext* RenderMessageFilter::GetRequestContext( uint32 request_id, const ViewHostMsg_Resource_Request& request_data) { URLRequestContextGetter* request_context = request_context_; @@ -545,7 +545,7 @@ URLRequestContext* ResourceMessageFilter::GetRequestContext( return request_context->GetURLRequestContext(); } -void ResourceMessageFilter::OnMsgCreateWindow( +void RenderMessageFilter::OnMsgCreateWindow( const ViewHostMsg_CreateWindow_Params& params, int* route_id, int64* cloned_session_storage_namespace_id) { *cloned_session_storage_namespace_id = @@ -559,22 +559,22 @@ void ResourceMessageFilter::OnMsgCreateWindow( route_id); } -void ResourceMessageFilter::OnMsgCreateWidget(int opener_id, - WebKit::WebPopupType popup_type, - int* route_id) { +void RenderMessageFilter::OnMsgCreateWidget(int opener_id, + WebKit::WebPopupType popup_type, + int* route_id) { render_widget_helper_->CreateNewWidget(opener_id, popup_type, route_id); } -void ResourceMessageFilter::OnMsgCreateFullscreenWidget( +void RenderMessageFilter::OnMsgCreateFullscreenWidget( int opener_id, WebKit::WebPopupType popup_type, int* route_id) { render_widget_helper_->CreateNewFullscreenWidget( opener_id, popup_type, route_id); } -void ResourceMessageFilter::OnSetCookie(const IPC::Message& message, - const GURL& url, - const GURL& first_party_for_cookies, - const std::string& cookie) { +void RenderMessageFilter::OnSetCookie(const IPC::Message& message, + const GURL& url, + const GURL& first_party_for_cookies, + const std::string& cookie) { ChromeURLRequestContext* context = GetRequestContextForURL(url); SetCookieCompletion* callback = @@ -583,8 +583,7 @@ void ResourceMessageFilter::OnSetCookie(const IPC::Message& message, // If this render view is associated with an automation channel, aka // ChromeFrame then we need to set cookies in the external host. - if (!AutomationResourceMessageFilter::SetCookiesForUrl(url, cookie, - callback)) { + if (!AutomationResourceMessageFilter::SetCookiesForUrl(url, cookie, callback)) { int policy = net::OK; if (context->cookie_policy()) { policy = context->cookie_policy()->CanSetCookie( @@ -596,9 +595,9 @@ void ResourceMessageFilter::OnSetCookie(const IPC::Message& message, } } -void ResourceMessageFilter::OnGetCookies(const GURL& url, - const GURL& first_party_for_cookies, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetCookies(const GURL& url, + const GURL& first_party_for_cookies, + IPC::Message* reply_msg) { ChromeURLRequestContext* context = GetRequestContextForURL(url); GetCookiesCompletion* callback = @@ -621,7 +620,7 @@ void ResourceMessageFilter::OnGetCookies(const GURL& url, } } -void ResourceMessageFilter::OnGetRawCookies( +void RenderMessageFilter::OnGetRawCookies( const GURL& url, const GURL& first_party_for_cookies, IPC::Message* reply_msg) { @@ -660,13 +659,13 @@ void ResourceMessageFilter::OnGetRawCookies( callback->Run(policy); } -void ResourceMessageFilter::OnDeleteCookie(const GURL& url, - const std::string& cookie_name) { +void RenderMessageFilter::OnDeleteCookie(const GURL& url, + const std::string& cookie_name) { URLRequestContext* context = GetRequestContextForURL(url); context->cookie_store()->DeleteCookie(url, cookie_name); } -void ResourceMessageFilter::OnCookiesEnabled( +void RenderMessageFilter::OnCookiesEnabled( const GURL& url, const GURL& first_party_for_cookies, IPC::Message* reply_msg) { @@ -689,9 +688,9 @@ void ResourceMessageFilter::OnCookiesEnabled( } #if defined(OS_MACOSX) -void ResourceMessageFilter::OnLoadFont(const FontDescriptor& font, - uint32* handle_size, - base::SharedMemoryHandle* handle) { +void RenderMessageFilter::OnLoadFont(const FontDescriptor& font, + uint32* handle_size, + base::SharedMemoryHandle* handle) { base::SharedMemory font_data; uint32 font_data_size = 0; bool ok = FontLoader::LoadFontIntoBuffer(font.nsFont(), &font_data, @@ -710,13 +709,13 @@ void ResourceMessageFilter::OnLoadFont(const FontDescriptor& font, #endif // OS_MACOSX #if defined(OS_WIN) // This hack is Windows-specific. -void ResourceMessageFilter::OnPreCacheFont(LOGFONT font) { +void RenderMessageFilter::OnPreCacheFont(LOGFONT font) { ChildProcessHost::PreCacheFont(font); } #endif // OS_WIN -void ResourceMessageFilter::OnGetPlugins(bool refresh, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetPlugins(bool refresh, + IPC::Message* reply_msg) { // Don't refresh if the specified threshold has not been passed. Note that // this check is performed before off-loading to the file thread. The reason // we do this is that some pages tend to request that the list of plugins be @@ -737,11 +736,11 @@ void ResourceMessageFilter::OnGetPlugins(bool refresh, BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OnGetPluginsOnFileThread, refresh, + this, &RenderMessageFilter::OnGetPluginsOnFileThread, refresh, reply_msg)); } -void ResourceMessageFilter::OnGetPluginsOnFileThread( +void RenderMessageFilter::OnGetPluginsOnFileThread( bool refresh, IPC::Message* reply_msg) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); std::vector<WebPluginInfo> plugins; @@ -749,23 +748,23 @@ void ResourceMessageFilter::OnGetPluginsOnFileThread( ViewHostMsg_GetPlugins::WriteReplyParams(reply_msg, plugins); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); + NewRunnableMethod(this, &RenderMessageFilter::Send, reply_msg)); } -void ResourceMessageFilter::OnGetPluginInfo(const GURL& url, - const GURL& policy_url, - const std::string& mime_type, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetPluginInfo(const GURL& url, + const GURL& policy_url, + const std::string& mime_type, + IPC::Message* reply_msg) { // The PluginService::GetFirstAllowedPluginInfo may need to load the // plugins. Don't do it on the IO thread. BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OnGetPluginInfoOnFileThread, + this, &RenderMessageFilter::OnGetPluginInfoOnFileThread, url, policy_url, mime_type, reply_msg)); } -void ResourceMessageFilter::OnGetPluginInfoOnFileThread( +void RenderMessageFilter::OnGetPluginInfoOnFileThread( const GURL& url, const GURL& policy_url, const std::string& mime_type, @@ -779,15 +778,15 @@ void ResourceMessageFilter::OnGetPluginInfoOnFileThread( BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OnGotPluginInfo, + this, &RenderMessageFilter::OnGotPluginInfo, found, info, actual_mime_type, policy_url, reply_msg)); } -void ResourceMessageFilter::OnGotPluginInfo(bool found, - const WebPluginInfo& info, - const std::string& actual_mime_type, - const GURL& policy_url, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGotPluginInfo(bool found, + const WebPluginInfo& info, + const std::string& actual_mime_type, + const GURL& policy_url, + IPC::Message* reply_msg) { ContentSetting setting = CONTENT_SETTING_DEFAULT; WebPluginInfo info_copy = info; if (found) { @@ -806,16 +805,16 @@ void ResourceMessageFilter::OnGotPluginInfo(bool found, Send(reply_msg); } -void ResourceMessageFilter::OnOpenChannelToPlugin(const GURL& url, - const std::string& mime_type, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnOpenChannelToPlugin(const GURL& url, + const std::string& mime_type, + IPC::Message* reply_msg) { plugin_service_->OpenChannelToPlugin( url, mime_type, new OpenChannelToPluginCallback(this, reply_msg)); } -void ResourceMessageFilter::OnOpenChannelToPepperPlugin( +void RenderMessageFilter::OnOpenChannelToPepperPlugin( const FilePath& path, IPC::Message* reply_msg) { PpapiPluginProcessHost* host = new PpapiPluginProcessHost(this); @@ -823,13 +822,13 @@ void ResourceMessageFilter::OnOpenChannelToPepperPlugin( ppapi_plugin_hosts_.push_back(linked_ptr<PpapiPluginProcessHost>(host)); } -void ResourceMessageFilter::OnLaunchNaCl( +void RenderMessageFilter::OnLaunchNaCl( const std::wstring& url, int channel_descriptor, IPC::Message* reply_msg) { NaClProcessHost* host = new NaClProcessHost(resource_dispatcher_host_, url); host->Launch(this, channel_descriptor, reply_msg); } -void ResourceMessageFilter::OnCreateWorker( +void RenderMessageFilter::OnCreateWorker( const ViewHostMsg_CreateWorker_Params& params, int* route_id) { *route_id = params.route_id != MSG_ROUTING_NONE ? params.route_id : render_widget_helper_->GetNextRoutingID(); @@ -849,7 +848,7 @@ void ResourceMessageFilter::OnCreateWorker( request_context_->GetURLRequestContext())); } -void ResourceMessageFilter::OnLookupSharedWorker( +void RenderMessageFilter::OnLookupSharedWorker( const ViewHostMsg_CreateWorker_Params& params, bool* exists, int* route_id, bool* url_mismatch) { *route_id = render_widget_helper_->GetNextRoutingID(); @@ -858,23 +857,23 @@ void ResourceMessageFilter::OnLookupSharedWorker( params.render_view_route_id, this, *route_id, url_mismatch); } -void ResourceMessageFilter::OnDocumentDetached(unsigned long long document_id) { +void RenderMessageFilter::OnDocumentDetached(unsigned long long document_id) { // Notify the WorkerService that the passed document was detached so any // associated shared workers can be shut down. WorkerService::GetInstance()->DocumentDetached(this, document_id); } -void ResourceMessageFilter::OnCancelCreateDedicatedWorker(int route_id) { +void RenderMessageFilter::OnCancelCreateDedicatedWorker(int route_id) { WorkerService::GetInstance()->CancelCreateDedicatedWorker(this, route_id); } -void ResourceMessageFilter::OnForwardToWorker(const IPC::Message& message) { +void RenderMessageFilter::OnForwardToWorker(const IPC::Message& message) { WorkerService::GetInstance()->ForwardMessage(message, this); } -void ResourceMessageFilter::OnDownloadUrl(const IPC::Message& message, - const GURL& url, - const GURL& referrer) { +void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message, + const GURL& url, + const GURL& referrer) { URLRequestContext* context = request_context_->GetURLRequestContext(); // Don't show "Save As" UI. @@ -888,7 +887,7 @@ void ResourceMessageFilter::OnDownloadUrl(const IPC::Message& message, context); } -void ResourceMessageFilter::OnClipboardWriteObjectsSync( +void RenderMessageFilter::OnClipboardWriteObjectsSync( const Clipboard::ObjectMap& objects, base::SharedMemoryHandle bitmap_handle) { DCHECK(base::SharedMemory::IsHandleValid(bitmap_handle)) @@ -909,7 +908,7 @@ void ResourceMessageFilter::OnClipboardWriteObjectsSync( new WriteClipboardTask(long_living_objects)); } -void ResourceMessageFilter::OnClipboardWriteObjectsAsync( +void RenderMessageFilter::OnClipboardWriteObjectsAsync( const Clipboard::ObjectMap& objects) { // We cannot write directly from the IO thread, and cannot service the IPC // on the UI thread. We'll copy the relevant data and post a task to preform @@ -938,7 +937,7 @@ void ResourceMessageFilter::OnClipboardWriteObjectsAsync( // See resource_message_filter_gtk.cc for the Linux implementation of these // functions. -void ResourceMessageFilter::OnClipboardIsFormatAvailable( +void RenderMessageFilter::OnClipboardIsFormatAvailable( Clipboard::FormatType format, Clipboard::Buffer buffer, IPC::Message* reply) { const bool result = GetClipboard()->IsFormatAvailable(format, buffer); @@ -946,24 +945,24 @@ void ResourceMessageFilter::OnClipboardIsFormatAvailable( Send(reply); } -void ResourceMessageFilter::OnClipboardReadText(Clipboard::Buffer buffer, - IPC::Message* reply) { +void RenderMessageFilter::OnClipboardReadText(Clipboard::Buffer buffer, + IPC::Message* reply) { string16 result; GetClipboard()->ReadText(buffer, &result); ViewHostMsg_ClipboardReadText::WriteReplyParams(reply, result); Send(reply); } -void ResourceMessageFilter::OnClipboardReadAsciiText(Clipboard::Buffer buffer, - IPC::Message* reply) { +void RenderMessageFilter::OnClipboardReadAsciiText(Clipboard::Buffer buffer, + IPC::Message* reply) { std::string result; GetClipboard()->ReadAsciiText(buffer, &result); ViewHostMsg_ClipboardReadAsciiText::WriteReplyParams(reply, result); Send(reply); } -void ResourceMessageFilter::OnClipboardReadHTML(Clipboard::Buffer buffer, - IPC::Message* reply) { +void RenderMessageFilter::OnClipboardReadHTML(Clipboard::Buffer buffer, + IPC::Message* reply) { std::string src_url_str; string16 markup; GetClipboard()->ReadHTML(buffer, &markup, &src_url_str); @@ -973,7 +972,7 @@ void ResourceMessageFilter::OnClipboardReadHTML(Clipboard::Buffer buffer, Send(reply); } -void ResourceMessageFilter::OnClipboardReadAvailableTypes( +void RenderMessageFilter::OnClipboardReadAvailableTypes( Clipboard::Buffer buffer, IPC::Message* reply) { std::vector<string16> types; bool contains_filenames = false; @@ -984,7 +983,7 @@ void ResourceMessageFilter::OnClipboardReadAvailableTypes( Send(reply); } -void ResourceMessageFilter::OnClipboardReadData( +void RenderMessageFilter::OnClipboardReadData( Clipboard::Buffer buffer, const string16& type, IPC::Message* reply) { string16 data; string16 metadata; @@ -994,7 +993,7 @@ void ResourceMessageFilter::OnClipboardReadData( Send(reply); } -void ResourceMessageFilter::OnClipboardReadFilenames( +void RenderMessageFilter::OnClipboardReadFilenames( Clipboard::Buffer buffer, IPC::Message* reply) { std::vector<string16> filenames; bool result = ClipboardDispatcher::ReadFilenames(buffer, &filenames); @@ -1005,7 +1004,7 @@ void ResourceMessageFilter::OnClipboardReadFilenames( #endif -void ResourceMessageFilter::OnCheckNotificationPermission( +void RenderMessageFilter::OnCheckNotificationPermission( const GURL& source_url, int* result) { *result = WebKit::WebNotificationPresenter::PermissionNotAllowed; @@ -1021,7 +1020,7 @@ void ResourceMessageFilter::OnCheckNotificationPermission( *result = notification_prefs_->HasPermission(source_url.GetOrigin()); } -void ResourceMessageFilter::OnGetCPBrowsingContext(uint32* context) { +void RenderMessageFilter::OnGetCPBrowsingContext(uint32* context) { // Always allocate a new context when a plugin requests one, since it needs to // be unique for that plugin instance. *context = CPBrowsingContextManager::GetInstance()->Allocate( @@ -1029,7 +1028,7 @@ void ResourceMessageFilter::OnGetCPBrowsingContext(uint32* context) { } #if defined(OS_WIN) -void ResourceMessageFilter::OnDuplicateSection( +void RenderMessageFilter::OnDuplicateSection( base::SharedMemoryHandle renderer_handle, base::SharedMemoryHandle* browser_handle) { // Duplicate the handle in this process right now so the memory is kept alive @@ -1040,7 +1039,7 @@ void ResourceMessageFilter::OnDuplicateSection( #endif #if defined(OS_POSIX) -void ResourceMessageFilter::OnAllocateSharedMemoryBuffer( +void RenderMessageFilter::OnAllocateSharedMemoryBuffer( uint32 buffer_size, base::SharedMemoryHandle* handle) { base::SharedMemory shared_buf; @@ -1053,7 +1052,7 @@ void ResourceMessageFilter::OnAllocateSharedMemoryBuffer( } #endif -void ResourceMessageFilter::OnResourceTypeStats( +void RenderMessageFilter::OnResourceTypeStats( const WebCache::ResourceTypeStats& stats) { HISTOGRAM_COUNTS("WebCoreCache.ImagesSizeKB", static_cast<int>(stats.images.size / 1024)); @@ -1070,12 +1069,12 @@ void ResourceMessageFilter::OnResourceTypeStats( BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableFunction( - &ResourceMessageFilter::OnResourceTypeStatsOnUIThread, + &RenderMessageFilter::OnResourceTypeStatsOnUIThread, stats, base::GetProcId(handle()))); } -void ResourceMessageFilter::OnResourceTypeStatsOnUIThread( +void RenderMessageFilter::OnResourceTypeStatsOnUIThread( const WebCache::ResourceTypeStats& stats, base::ProcessId renderer_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); TaskManager::GetInstance()->model()->NotifyResourceTypeStats( @@ -1083,18 +1082,18 @@ void ResourceMessageFilter::OnResourceTypeStatsOnUIThread( } -void ResourceMessageFilter::OnV8HeapStats(int v8_memory_allocated, - int v8_memory_used) { +void RenderMessageFilter::OnV8HeapStats(int v8_memory_allocated, + int v8_memory_used) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, - NewRunnableFunction(&ResourceMessageFilter::OnV8HeapStatsOnUIThread, + NewRunnableFunction(&RenderMessageFilter::OnV8HeapStatsOnUIThread, v8_memory_allocated, v8_memory_used, base::GetProcId(handle()))); } // static -void ResourceMessageFilter::OnV8HeapStatsOnUIThread( +void RenderMessageFilter::OnV8HeapStatsOnUIThread( int v8_memory_allocated, int v8_memory_used, base::ProcessId renderer_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); TaskManager::GetInstance()->model()->NotifyV8HeapStats( @@ -1103,12 +1102,12 @@ void ResourceMessageFilter::OnV8HeapStatsOnUIThread( static_cast<size_t>(v8_memory_used)); } -void ResourceMessageFilter::OnDidZoomURL(const IPC::Message& message, - double zoom_level, - bool remember, - const GURL& url) { +void RenderMessageFilter::OnDidZoomURL(const IPC::Message& message, + double zoom_level, + bool remember, + const GURL& url) { Task* task = NewRunnableMethod(this, - &ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread, zoom_level, + &RenderMessageFilter::UpdateHostZoomLevelsOnUIThread, zoom_level, remember, url, id(), message.routing_id()); #if defined(OS_MACOSX) cocoa_utils::PostTaskInEventTrackingRunLoopMode(FROM_HERE, task); @@ -1117,7 +1116,7 @@ void ResourceMessageFilter::OnDidZoomURL(const IPC::Message& message, #endif } -void ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread( +void RenderMessageFilter::UpdateHostZoomLevelsOnUIThread( double zoom_level, bool remember, const GURL& url, @@ -1141,12 +1140,12 @@ void ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread( } } -void ResourceMessageFilter::OnResolveProxy(const GURL& url, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnResolveProxy(const GURL& url, + IPC::Message* reply_msg) { resolve_proxy_msg_helper_.Start(url, reply_msg); } -void ResourceMessageFilter::OnResolveProxyCompleted( +void RenderMessageFilter::OnResolveProxyCompleted( IPC::Message* reply_msg, int result, const std::string& proxy_list) { @@ -1154,7 +1153,7 @@ void ResourceMessageFilter::OnResolveProxyCompleted( Send(reply_msg); } -void ResourceMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { scoped_refptr<printing::PrinterQuery> printer_query; if (!print_job_manager_->printing_enabled()) { // Reply with NULL query. @@ -1169,7 +1168,7 @@ void ResourceMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { CancelableTask* task = NewRunnableMethod( this, - &ResourceMessageFilter::OnGetDefaultPrintSettingsReply, + &RenderMessageFilter::OnGetDefaultPrintSettingsReply, printer_query, reply_msg); // Loads default settings. This is asynchronous, only the IPC message sender @@ -1182,7 +1181,7 @@ void ResourceMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { task); } -void ResourceMessageFilter::OnGetDefaultPrintSettingsReply( +void RenderMessageFilter::OnGetDefaultPrintSettingsReply( scoped_refptr<printing::PrinterQuery> printer_query, IPC::Message* reply_msg) { ViewMsg_Print_Params params; @@ -1206,7 +1205,7 @@ void ResourceMessageFilter::OnGetDefaultPrintSettingsReply( } } -void ResourceMessageFilter::OnScriptedPrint( +void RenderMessageFilter::OnScriptedPrint( const ViewHostMsg_ScriptedPrint_Params& params, IPC::Message* reply_msg) { gfx::NativeView host_view = @@ -1220,7 +1219,7 @@ void ResourceMessageFilter::OnScriptedPrint( CancelableTask* task = NewRunnableMethod( this, - &ResourceMessageFilter::OnScriptedPrintReply, + &RenderMessageFilter::OnScriptedPrintReply, printer_query, params.routing_id, reply_msg); @@ -1233,7 +1232,7 @@ void ResourceMessageFilter::OnScriptedPrint( task); } -void ResourceMessageFilter::OnScriptedPrintReply( +void RenderMessageFilter::OnScriptedPrintReply( scoped_refptr<printing::PrinterQuery> printer_query, int routing_id, IPC::Message* reply_msg) { @@ -1257,7 +1256,7 @@ void ResourceMessageFilter::OnScriptedPrintReply( } // static -Clipboard* ResourceMessageFilter::GetClipboard() { +Clipboard* RenderMessageFilter::GetClipboard() { // We have a static instance of the clipboard service for use by all message // filters. This instance lives for the life of the browser processes. static Clipboard* clipboard = new Clipboard; @@ -1265,7 +1264,7 @@ Clipboard* ResourceMessageFilter::GetClipboard() { return clipboard; } -ChromeURLRequestContext* ResourceMessageFilter::GetRequestContextForURL( +ChromeURLRequestContext* RenderMessageFilter::GetRequestContextForURL( const GURL& url) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); URLRequestContextGetter* context_getter = @@ -1275,62 +1274,62 @@ ChromeURLRequestContext* ResourceMessageFilter::GetRequestContextForURL( context_getter->GetURLRequestContext()); } -void ResourceMessageFilter::OnPlatformCheckSpelling(const string16& word, - int tag, - bool* correct) { +void RenderMessageFilter::OnPlatformCheckSpelling(const string16& word, + int tag, + bool* correct) { *correct = SpellCheckerPlatform::CheckSpelling(word, tag); } -void ResourceMessageFilter::OnPlatformFillSuggestionList( +void RenderMessageFilter::OnPlatformFillSuggestionList( const string16& word, std::vector<string16>* suggestions) { SpellCheckerPlatform::FillSuggestionList(word, suggestions); } -void ResourceMessageFilter::OnGetDocumentTag(IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetDocumentTag(IPC::Message* reply_msg) { int tag = SpellCheckerPlatform::GetDocumentTag(); ViewHostMsg_GetDocumentTag::WriteReplyParams(reply_msg, tag); Send(reply_msg); return; } -void ResourceMessageFilter::OnDocumentWithTagClosed(int tag) { +void RenderMessageFilter::OnDocumentWithTagClosed(int tag) { SpellCheckerPlatform::CloseDocumentWithTag(tag); } -void ResourceMessageFilter::OnShowSpellingPanel(bool show) { +void RenderMessageFilter::OnShowSpellingPanel(bool show) { SpellCheckerPlatform::ShowSpellingPanel(show); } -void ResourceMessageFilter::OnUpdateSpellingPanelWithMisspelledWord( +void RenderMessageFilter::OnUpdateSpellingPanelWithMisspelledWord( const string16& word) { SpellCheckerPlatform::UpdateSpellingPanelWithMisspelledWord(word); } -void ResourceMessageFilter::OnDnsPrefetch( +void RenderMessageFilter::OnDnsPrefetch( const std::vector<std::string>& hostnames) { chrome_browser_net::DnsPrefetchList(hostnames); } -void ResourceMessageFilter::OnRendererHistograms( +void RenderMessageFilter::OnRendererHistograms( int sequence_number, const std::vector<std::string>& histograms) { HistogramSynchronizer::DeserializeHistogramList(sequence_number, histograms); } #if defined(OS_MACOSX) -void ResourceMessageFilter::OnAllocTransportDIB( +void RenderMessageFilter::OnAllocTransportDIB( size_t size, bool cache_in_browser, TransportDIB::Handle* handle) { render_widget_helper_->AllocTransportDIB(size, cache_in_browser, handle); } -void ResourceMessageFilter::OnFreeTransportDIB( +void RenderMessageFilter::OnFreeTransportDIB( TransportDIB::Id dib_id) { render_widget_helper_->FreeTransportDIB(dib_id); } #endif -void ResourceMessageFilter::OnOpenChannelToExtension( +void RenderMessageFilter::OnOpenChannelToExtension( int routing_id, const std::string& source_extension_id, const std::string& target_extension_id, const std::string& channel_name, int* port_id) { @@ -1340,12 +1339,12 @@ void ResourceMessageFilter::OnOpenChannelToExtension( BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OpenChannelToExtensionOnUIThread, + this, &RenderMessageFilter::OpenChannelToExtensionOnUIThread, id(), routing_id, port2_id, source_extension_id, target_extension_id, channel_name)); } -void ResourceMessageFilter::OpenChannelToExtensionOnUIThread( +void RenderMessageFilter::OpenChannelToExtensionOnUIThread( int source_process_id, int source_routing_id, int receiver_port_id, const std::string& source_extension_id, @@ -1357,7 +1356,7 @@ void ResourceMessageFilter::OpenChannelToExtensionOnUIThread( source_extension_id, target_extension_id, channel_name); } -void ResourceMessageFilter::OnOpenChannelToTab( +void RenderMessageFilter::OnOpenChannelToTab( int routing_id, int tab_id, const std::string& extension_id, const std::string& channel_name, int* port_id) { int port2_id; @@ -1366,11 +1365,11 @@ void ResourceMessageFilter::OnOpenChannelToTab( BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OpenChannelToTabOnUIThread, + this, &RenderMessageFilter::OpenChannelToTabOnUIThread, id(), routing_id, port2_id, tab_id, extension_id, channel_name)); } -void ResourceMessageFilter::OpenChannelToTabOnUIThread( +void RenderMessageFilter::OpenChannelToTabOnUIThread( int source_process_id, int source_routing_id, int receiver_port_id, int tab_id, @@ -1382,7 +1381,7 @@ void ResourceMessageFilter::OpenChannelToTabOnUIThread( tab_id, extension_id, channel_name); } -bool ResourceMessageFilter::CheckBenchmarkingEnabled() const { +bool RenderMessageFilter::CheckBenchmarkingEnabled() const { static bool checked = false; static bool result = false; if (!checked) { @@ -1393,7 +1392,7 @@ bool ResourceMessageFilter::CheckBenchmarkingEnabled() const { return result; } -void ResourceMessageFilter::OnCloseCurrentConnections() { +void RenderMessageFilter::OnCloseCurrentConnections() { // This function is disabled unless the user has enabled // benchmarking extensions. if (!CheckBenchmarkingEnabled()) @@ -1402,7 +1401,7 @@ void ResourceMessageFilter::OnCloseCurrentConnections() { http_transaction_factory()->GetCache()->CloseCurrentConnections(); } -void ResourceMessageFilter::OnSetCacheMode(bool enabled) { +void RenderMessageFilter::OnSetCacheMode(bool enabled) { // This function is disabled unless the user has enabled // benchmarking extensions. if (!CheckBenchmarkingEnabled()) @@ -1415,7 +1414,7 @@ void ResourceMessageFilter::OnSetCacheMode(bool enabled) { http_cache->set_mode(mode); } -void ResourceMessageFilter::OnClearCache(IPC::Message* reply_msg) { +void RenderMessageFilter::OnClearCache(IPC::Message* reply_msg) { // This function is disabled unless the user has enabled // benchmarking extensions. int rv = -1; @@ -1438,7 +1437,7 @@ void ResourceMessageFilter::OnClearCache(IPC::Message* reply_msg) { Send(reply_msg); } -bool ResourceMessageFilter::CheckPreparsedJsCachingEnabled() const { +bool RenderMessageFilter::CheckPreparsedJsCachingEnabled() const { static bool checked = false; static bool result = false; if (!checked) { @@ -1449,7 +1448,7 @@ bool ResourceMessageFilter::CheckPreparsedJsCachingEnabled() const { return result; } -void ResourceMessageFilter::OnCacheableMetadataAvailable( +void RenderMessageFilter::OnCacheableMetadataAvailable( const GURL& url, double expected_response_time, const std::vector<char>& data) { @@ -1468,7 +1467,7 @@ void ResourceMessageFilter::OnCacheableMetadataAvailable( // TODO(lzheng): This only enables spdy over ssl. Enable spdy for http // when needed. -void ResourceMessageFilter::OnEnableSpdy(bool enable) { +void RenderMessageFilter::OnEnableSpdy(bool enable) { if (enable) { net::HttpNetworkLayer::EnableSpdy("npn,force-alt-protocols"); } else { @@ -1476,10 +1475,10 @@ void ResourceMessageFilter::OnEnableSpdy(bool enable) { } } -void ResourceMessageFilter::OnKeygen(uint32 key_size_index, - const std::string& challenge_string, - const GURL& url, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnKeygen(uint32 key_size_index, + const std::string& challenge_string, + const GURL& url, + IPC::Message* reply_msg) { // Map displayed strings indicating level of keysecurity in the <keygen> // menu to the key size in bits. (See SSLKeyGeneratorChromium.cpp in WebCore.) int key_size_in_bits; @@ -1502,7 +1501,7 @@ void ResourceMessageFilter::OnKeygen(uint32 key_size_index, if (!WorkerPool::PostTask( FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OnKeygenOnWorkerThread, + this, &RenderMessageFilter::OnKeygenOnWorkerThread, key_size_in_bits, challenge_string, url, reply_msg), true)) { NOTREACHED() << "Failed to dispatch keygen task to worker pool"; @@ -1512,7 +1511,7 @@ void ResourceMessageFilter::OnKeygen(uint32 key_size_index, } } -void ResourceMessageFilter::OnKeygenOnWorkerThread( +void RenderMessageFilter::OnKeygenOnWorkerThread( int key_size_in_bits, const std::string& challenge_string, const GURL& url, @@ -1528,23 +1527,23 @@ void ResourceMessageFilter::OnKeygenOnWorkerThread( BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); + NewRunnableMethod(this, &RenderMessageFilter::Send, reply_msg)); } #if defined(USE_TCMALLOC) -void ResourceMessageFilter::OnRendererTcmalloc(base::ProcessId pid, - const std::string& output) { +void RenderMessageFilter::OnRendererTcmalloc(base::ProcessId pid, + const std::string& output) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableFunction(AboutTcmallocRendererCallback, pid, output)); } #endif -void ResourceMessageFilter::OnEstablishGpuChannel() { +void RenderMessageFilter::OnEstablishGpuChannel() { GpuProcessHost::Get()->EstablishGpuChannel(id(), this); } -void ResourceMessageFilter::OnSynchronizeGpu(IPC::Message* reply) { +void RenderMessageFilter::OnSynchronizeGpu(IPC::Message* reply) { // We handle this message (and the other GPU process messages) here // rather than handing the message to the GpuProcessHost for // dispatch so that we can use the DELAY_REPLY macro to synthesize @@ -1553,7 +1552,7 @@ void ResourceMessageFilter::OnSynchronizeGpu(IPC::Message* reply) { GpuProcessHost::Get()->Synchronize(reply, this); } -void ResourceMessageFilter::OnGetExtensionMessageBundle( +void RenderMessageFilter::OnGetExtensionMessageBundle( const std::string& extension_id, IPC::Message* reply_msg) { ChromeURLRequestContext* context = static_cast<ChromeURLRequestContext*>( request_context_->GetURLRequestContext()); @@ -1566,11 +1565,11 @@ void ResourceMessageFilter::OnGetExtensionMessageBundle( BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::OnGetExtensionMessageBundleOnFileThread, + this, &RenderMessageFilter::OnGetExtensionMessageBundleOnFileThread, extension_path, extension_id, default_locale, reply_msg)); } -void ResourceMessageFilter::OnGetExtensionMessageBundleOnFileThread( +void RenderMessageFilter::OnGetExtensionMessageBundleOnFileThread( const FilePath& extension_path, const std::string& extension_id, const std::string& default_locale, @@ -1599,13 +1598,13 @@ void ResourceMessageFilter::OnGetExtensionMessageBundleOnFileThread( BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, - NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); + NewRunnableMethod(this, &RenderMessageFilter::Send, reply_msg)); } -void ResourceMessageFilter::OnAsyncOpenFile(const IPC::Message& msg, - const FilePath& path, - int flags, - int message_id) { +void RenderMessageFilter::OnAsyncOpenFile(const IPC::Message& msg, + const FilePath& path, + int flags, + int message_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (!ChildProcessSecurityPolicy::GetInstance()->HasPermissionsForFile( @@ -1618,14 +1617,14 @@ void ResourceMessageFilter::OnAsyncOpenFile(const IPC::Message& msg, BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::AsyncOpenFileOnFileThread, + this, &RenderMessageFilter::AsyncOpenFileOnFileThread, path, flags, message_id, msg.routing_id())); } -void ResourceMessageFilter::AsyncOpenFileOnFileThread(const FilePath& path, - int flags, - int message_id, - int routing_id) { +void RenderMessageFilter::AsyncOpenFileOnFileThread(const FilePath& path, + int flags, + int message_id, + int routing_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); base::PlatformFileError error_code = base::PLATFORM_FILE_OK; base::PlatformFile file = base::CreatePlatformFile( @@ -1645,7 +1644,7 @@ void ResourceMessageFilter::AsyncOpenFileOnFileThread(const FilePath& path, routing_id, error_code, file_for_transit, message_id); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::Send, reply)); + this, &RenderMessageFilter::Send, reply)); } SetCookieCompletion::SetCookieCompletion(int render_process_id, @@ -1687,7 +1686,7 @@ GetCookiesCompletion::GetCookiesCompletion(int render_process_id, int render_view_id, const GURL& url, IPC::Message* reply_msg, - ResourceMessageFilter* filter, + RenderMessageFilter* filter, ChromeURLRequestContext* context, bool raw_cookies) : url_(url), @@ -1748,7 +1747,7 @@ void GetCookiesCompletion::set_cookie_store(CookieStore* cookie_store) { CookiesEnabledCompletion::CookiesEnabledCompletion( IPC::Message* reply_msg, - ResourceMessageFilter* filter) + RenderMessageFilter* filter) : reply_msg_(reply_msg), filter_(filter) { } diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/render_message_filter.h index 1981f49..69bc8f7 100644 --- a/chrome/browser/renderer_host/resource_message_filter.h +++ b/chrome/browser/renderer_host/render_message_filter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_RENDERER_HOST_RESOURCE_MESSAGE_FILTER_H_ -#define CHROME_BROWSER_RENDERER_HOST_RESOURCE_MESSAGE_FILTER_H_ +#ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ +#define CHROME_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ #pragma once #if defined(OS_WIN) @@ -74,17 +74,17 @@ struct ViewHostMsg_DidPrintPage_Params; // the browser. It also means that any hangs in starting a network request // will not interfere with browser UI. -class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, - public ResourceDispatcherHost::Receiver, - public ResolveProxyMsgHelper::Delegate { +class RenderMessageFilter : public IPC::ChannelProxy::MessageFilter, + public ResourceDispatcherHost::Receiver, + public ResolveProxyMsgHelper::Delegate { public: // Create the filter. - ResourceMessageFilter(ResourceDispatcherHost* resource_dispatcher_host, - int child_id, - PluginService* plugin_service, - printing::PrintJobManager* print_job_manager, - Profile* profile, - RenderWidgetHelper* render_widget_helper); + RenderMessageFilter(ResourceDispatcherHost* resource_dispatcher_host, + int child_id, + PluginService* plugin_service, + printing::PrintJobManager* print_job_manager, + Profile* profile, + RenderWidgetHelper* render_widget_helper); // IPC::ChannelProxy::MessageFilter methods: virtual void OnFilterAdded(IPC::Channel* channel); @@ -115,9 +115,9 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, private: friend class BrowserThread; - friend class DeleteTask<ResourceMessageFilter>; + friend class DeleteTask<RenderMessageFilter>; - virtual ~ResourceMessageFilter(); + virtual ~RenderMessageFilter(); void OnMsgCreateWindow(const ViewHostMsg_CreateWindow_Params& params, int* route_id, @@ -156,7 +156,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, #endif #if defined(OS_WIN) // This hack is Windows-specific. - // Cache fonts for the renderer. See ResourceMessageFilter::OnPreCacheFont + // Cache fonts for the renderer. See RenderMessageFilter::OnPreCacheFont // implementation for more details. void OnPreCacheFont(LOGFONT font); #endif @@ -454,7 +454,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter, scoped_refptr<WebKitContext> webkit_context_; - DISALLOW_COPY_AND_ASSIGN(ResourceMessageFilter); + DISALLOW_COPY_AND_ASSIGN(RenderMessageFilter); }; // These classes implement completion callbacks for getting and setting @@ -491,7 +491,7 @@ class GetCookiesCompletion : public net::CompletionCallback { GetCookiesCompletion(int render_process_id, int render_view_id, const GURL& url, IPC::Message* reply_msg, - ResourceMessageFilter* filter, + RenderMessageFilter* filter, ChromeURLRequestContext* context, bool raw_cookies); virtual ~GetCookiesCompletion(); @@ -515,7 +515,7 @@ class GetCookiesCompletion : public net::CompletionCallback { private: GURL url_; IPC::Message* reply_msg_; - scoped_refptr<ResourceMessageFilter> filter_; + scoped_refptr<RenderMessageFilter> filter_; scoped_refptr<ChromeURLRequestContext> context_; int render_process_id_; int render_view_id_; @@ -526,14 +526,14 @@ class GetCookiesCompletion : public net::CompletionCallback { class CookiesEnabledCompletion : public net::CompletionCallback { public: CookiesEnabledCompletion(IPC::Message* reply_msg, - ResourceMessageFilter* filter); + RenderMessageFilter* filter); virtual ~CookiesEnabledCompletion(); virtual void RunWithParams(const Tuple1<int>& params); private: IPC::Message* reply_msg_; - scoped_refptr<ResourceMessageFilter> filter_; + scoped_refptr<RenderMessageFilter> filter_; }; -#endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_MESSAGE_FILTER_H_ +#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_MESSAGE_FILTER_H_ diff --git a/chrome/browser/renderer_host/resource_message_filter_gtk.cc b/chrome/browser/renderer_host/resource_message_filter_gtk.cc index f10931e..30eaf78 100644 --- a/chrome/browser/renderer_host/resource_message_filter_gtk.cc +++ b/chrome/browser/renderer_host/resource_message_filter_gtk.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include <fcntl.h> #include <map> @@ -46,13 +46,13 @@ static base::LazyInstance<PrintingFileDescriptorMap> // http://crbug.com/9060 for more details. // Called on the IO thread. -void ResourceMessageFilter::SendDelayedReply(IPC::Message* reply_msg) { +void RenderMessageFilter::SendDelayedReply(IPC::Message* reply_msg) { Send(reply_msg); } // Called on the BACKGROUND_X11 thread. -void ResourceMessageFilter::DoOnGetScreenInfo(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::DoOnGetScreenInfo(gfx::NativeViewId view, + IPC::Message* reply_msg) { Display* display = x11_util::GetSecondaryDisplay(); int screen = x11_util::GetDefaultScreen(display); WebScreenInfo results = WebScreenInfoFactory::screenInfo(display, screen); @@ -61,12 +61,12 @@ void ResourceMessageFilter::DoOnGetScreenInfo(gfx::NativeViewId view, BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the BACKGROUND_X11 thread. -void ResourceMessageFilter::DoOnGetWindowRect(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::DoOnGetWindowRect(gfx::NativeViewId view, + IPC::Message* reply_msg) { // This is called to get the x, y offset (in screen coordinates) of the given // view and its width and height. gfx::Rect rect; @@ -87,7 +87,7 @@ void ResourceMessageFilter::DoOnGetWindowRect(gfx::NativeViewId view, BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Return the top-level parent of the given window. Called on the @@ -105,8 +105,8 @@ static XID GetTopLevelWindow(XID window) { } // Called on the BACKGROUND_X11 thread. -void ResourceMessageFilter::DoOnGetRootWindowRect(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::DoOnGetRootWindowRect(gfx::NativeViewId view, + IPC::Message* reply_msg) { // This is called to get the screen coordinates and size of the browser // window itself. gfx::Rect rect; @@ -130,11 +130,11 @@ void ResourceMessageFilter::DoOnGetRootWindowRect(gfx::NativeViewId view, BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardIsFormatAvailable( +void RenderMessageFilter::DoOnClipboardIsFormatAvailable( Clipboard::FormatType format, Clipboard::Buffer buffer, IPC::Message* reply_msg) { const bool result = GetClipboard()->IsFormatAvailable(format, buffer); @@ -144,12 +144,12 @@ void ResourceMessageFilter::DoOnClipboardIsFormatAvailable( BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardReadText(Clipboard::Buffer buffer, - IPC::Message* reply_msg) { +void RenderMessageFilter::DoOnClipboardReadText(Clipboard::Buffer buffer, + IPC::Message* reply_msg) { string16 result; GetClipboard()->ReadText(buffer, &result); @@ -158,11 +158,11 @@ void ResourceMessageFilter::DoOnClipboardReadText(Clipboard::Buffer buffer, BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardReadAsciiText( +void RenderMessageFilter::DoOnClipboardReadAsciiText( Clipboard::Buffer buffer, IPC::Message* reply_msg) { std::string result; GetClipboard()->ReadAsciiText(buffer, &result); @@ -172,12 +172,12 @@ void ResourceMessageFilter::DoOnClipboardReadAsciiText( BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardReadHTML(Clipboard::Buffer buffer, - IPC::Message* reply_msg) { +void RenderMessageFilter::DoOnClipboardReadHTML(Clipboard::Buffer buffer, + IPC::Message* reply_msg) { std::string src_url_str; string16 markup; GetClipboard()->ReadHTML(buffer, &markup, &src_url_str); @@ -188,38 +188,38 @@ void ResourceMessageFilter::DoOnClipboardReadHTML(Clipboard::Buffer buffer, BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardReadAvailableTypes( +void RenderMessageFilter::DoOnClipboardReadAvailableTypes( Clipboard::Buffer buffer, IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardReadData(Clipboard::Buffer buffer, - const string16& type, - IPC::Message* reply_msg) { +void RenderMessageFilter::DoOnClipboardReadData(Clipboard::Buffer buffer, + const string16& type, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the UI thread. -void ResourceMessageFilter::DoOnClipboardReadFilenames( +void RenderMessageFilter::DoOnClipboardReadFilenames( Clipboard::Buffer buffer, IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the FILE thread. -void ResourceMessageFilter::DoOnAllocateTempFileForPrinting( +void RenderMessageFilter::DoOnAllocateTempFileForPrinting( IPC::Message* reply_msg) { base::FileDescriptor temp_file_fd; int fd_in_browser; @@ -255,120 +255,119 @@ void ResourceMessageFilter::DoOnAllocateTempFileForPrinting( BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::SendDelayedReply, reply_msg)); + this, &RenderMessageFilter::SendDelayedReply, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnGetScreenInfo(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetScreenInfo(gfx::NativeViewId view, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::BACKGROUND_X11, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnGetScreenInfo, view, reply_msg)); + this, &RenderMessageFilter::DoOnGetScreenInfo, view, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetWindowRect(gfx::NativeViewId view, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::BACKGROUND_X11, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnGetWindowRect, view, reply_msg)); + this, &RenderMessageFilter::DoOnGetWindowRect, view, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetRootWindowRect(gfx::NativeViewId view, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::BACKGROUND_X11, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnGetRootWindowRect, view, - reply_msg)); + this, &RenderMessageFilter::DoOnGetRootWindowRect, view, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardIsFormatAvailable( +void RenderMessageFilter::OnClipboardIsFormatAvailable( Clipboard::FormatType format, Clipboard::Buffer buffer, IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardIsFormatAvailable, format, + this, &RenderMessageFilter::DoOnClipboardIsFormatAvailable, format, buffer, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardReadText(Clipboard::Buffer buffer, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnClipboardReadText(Clipboard::Buffer buffer, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardReadText, buffer, + this, &RenderMessageFilter::DoOnClipboardReadText, buffer, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardReadAsciiText(Clipboard::Buffer buffer, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnClipboardReadAsciiText(Clipboard::Buffer buffer, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardReadAsciiText, buffer, + this, &RenderMessageFilter::DoOnClipboardReadAsciiText, buffer, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardReadHTML(Clipboard::Buffer buffer, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnClipboardReadHTML(Clipboard::Buffer buffer, + IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardReadHTML, buffer, + this, &RenderMessageFilter::DoOnClipboardReadHTML, buffer, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardReadAvailableTypes( +void RenderMessageFilter::OnClipboardReadAvailableTypes( Clipboard::Buffer buffer, IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardReadAvailableTypes, buffer, + this, &RenderMessageFilter::DoOnClipboardReadAvailableTypes, buffer, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardReadData( +void RenderMessageFilter::OnClipboardReadData( Clipboard::Buffer buffer, const string16& type, IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardReadData, buffer, type, + this, &RenderMessageFilter::DoOnClipboardReadData, buffer, type, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnClipboardReadFilenames( +void RenderMessageFilter::OnClipboardReadFilenames( Clipboard::Buffer buffer, IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::UI, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnClipboardReadFilenames, buffer, + this, &RenderMessageFilter::DoOnClipboardReadFilenames, buffer, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnAllocateTempFileForPrinting( +void RenderMessageFilter::OnAllocateTempFileForPrinting( IPC::Message* reply_msg) { BrowserThread::PostTask( BrowserThread::FILE, FROM_HERE, NewRunnableMethod( - this, &ResourceMessageFilter::DoOnAllocateTempFileForPrinting, + this, &RenderMessageFilter::DoOnAllocateTempFileForPrinting, reply_msg)); } // Called on the IO thread. -void ResourceMessageFilter::OnTempFileForPrintingWritten(int fd_in_browser) { +void RenderMessageFilter::OnTempFileForPrintingWritten(int fd_in_browser) { FdMap* map = &g_printing_file_descriptor_map.Get().map; FdMap::iterator it = map->find(fd_in_browser); if (it == map->end()) { diff --git a/chrome/browser/renderer_host/resource_message_filter_mac.mm b/chrome/browser/renderer_host/resource_message_filter_mac.mm index b4334fb..dd80f2e 100644 --- a/chrome/browser/renderer_host/resource_message_filter_mac.mm +++ b/chrome/browser/renderer_host/resource_message_filter_mac.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #import <Cocoa/Cocoa.h> @@ -30,7 +30,7 @@ class WriteFindPboardTask : public Task { }; // Called on the IO thread. -void ResourceMessageFilter::OnClipboardFindPboardWriteString( +void RenderMessageFilter::OnClipboardFindPboardWriteString( const string16& text) { if (text.length() <= kMaxFindPboardStringLength) { NSString* nsText = base::SysUTF16ToNSString(text); diff --git a/chrome/browser/renderer_host/resource_message_filter_win.cc b/chrome/browser/renderer_host/resource_message_filter_win.cc index 4a8c46e..6bcd0c6 100644 --- a/chrome/browser/renderer_host/resource_message_filter_win.cc +++ b/chrome/browser/renderer_host/resource_message_filter_win.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/common/render_messages.h" #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/WebKit/WebKit/chromium/public/win/WebScreenInfoFactory.h" @@ -16,8 +16,8 @@ using WebKit::WebScreenInfoFactory; // TODO(shess): Provide a mapping from reply_msg->routing_id() to HWND // so that we can eliminate the NativeViewId parameter. -void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id, + IPC::Message* reply_msg) { HWND window = gfx::NativeViewFromId(window_id); RECT window_rect = {0}; GetWindowRect(window, &window_rect); @@ -27,8 +27,8 @@ void ResourceMessageFilter::OnGetWindowRect(gfx::NativeViewId window_id, Send(reply_msg); } -void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id, + IPC::Message* reply_msg) { HWND window = gfx::NativeViewFromId(window_id); RECT window_rect = {0}; HWND root_window = ::GetAncestor(window, GA_ROOT); @@ -39,8 +39,8 @@ void ResourceMessageFilter::OnGetRootWindowRect(gfx::NativeViewId window_id, Send(reply_msg); } -void ResourceMessageFilter::OnGetScreenInfo(gfx::NativeViewId view, - IPC::Message* reply_msg) { +void RenderMessageFilter::OnGetScreenInfo(gfx::NativeViewId view, + IPC::Message* reply_msg) { WebScreenInfo results = WebScreenInfoFactory::screenInfo(gfx::NativeViewFromId(view)); ViewHostMsg_GetScreenInfo::WriteReplyParams(reply_msg, results); diff --git a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc index 6a03764..27ca69e 100644 --- a/chrome/browser/renderer_host/safe_browsing_resource_handler.cc +++ b/chrome/browser/renderer_host/safe_browsing_resource_handler.cc @@ -6,8 +6,8 @@ #include "base/logging.h" #include "chrome/browser/renderer_host/global_request_id.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/resource_dispatcher_host.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/common/notification_service.h" #include "chrome/common/resource_response.h" #include "net/base/net_errors.h" @@ -39,8 +39,8 @@ SafeBrowsingResourceHandler::SafeBrowsingResourceHandler( rdh_(resource_dispatcher_host), resource_type_(resource_type) { registrar_.Add(this, NotificationType::RESOURCE_MESSAGE_FILTER_SHUTDOWN, - Source<ResourceMessageFilter>( - static_cast<ResourceMessageFilter*>(receiver))); + Source<RenderMessageFilter>( + static_cast<RenderMessageFilter*>(receiver))); } SafeBrowsingResourceHandler::~SafeBrowsingResourceHandler() { diff --git a/chrome/browser/speech/speech_input_dispatcher_host.h b/chrome/browser/speech/speech_input_dispatcher_host.h index 82a12940..51ae04c 100644 --- a/chrome/browser/speech/speech_input_dispatcher_host.h +++ b/chrome/browser/speech/speech_input_dispatcher_host.h @@ -12,7 +12,7 @@ namespace speech_input { // SpeechInputDispatcherHost is a delegate for Speech API messages used by -// ResourceMessageFilter. +// RenderMessageFilter. // It's the complement of SpeechInputDispatcher (owned by RenderView). class SpeechInputDispatcherHost : public BrowserMessageFilter, public SpeechInputManager::Delegate { diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc index e4cc078..27ce650 100644 --- a/chrome/browser/task_manager/task_manager_resource_providers.cc +++ b/chrome/browser/task_manager/task_manager_resource_providers.cc @@ -29,9 +29,9 @@ #include "chrome/browser/notifications/balloon_host.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/renderer_host/render_view_host.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/browser/tab_contents/background_contents.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_util.h" diff --git a/chrome/browser/worker_host/message_port_dispatcher.cc b/chrome/browser/worker_host/message_port_dispatcher.cc index 4d2782f..1be8369 100644 --- a/chrome/browser/worker_host/message_port_dispatcher.cc +++ b/chrome/browser/worker_host/message_port_dispatcher.cc @@ -6,7 +6,7 @@ #include "base/callback.h" #include "base/singleton.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/worker_host/worker_process_host.h" #include "chrome/common/notification_service.h" #include "chrome/common/worker_messages.h" @@ -258,7 +258,7 @@ void MessagePortDispatcher::Observe(NotificationType type, const NotificationDetails& details) { IPC::Message::Sender* sender = NULL; if (type.value == NotificationType::RESOURCE_MESSAGE_FILTER_SHUTDOWN) { - sender = Source<ResourceMessageFilter>(source).ptr(); + sender = Source<RenderMessageFilter>(source).ptr(); } else if (type.value == NotificationType::WORKER_PROCESS_HOST_SHUTDOWN) { sender = Source<WorkerProcessHost>(source).ptr(); } else { diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc index f26059d..d4821bd 100644 --- a/chrome/browser/worker_host/worker_process_host.cc +++ b/chrome/browser/worker_host/worker_process_host.cc @@ -23,10 +23,10 @@ #include "chrome/browser/renderer_host/blob_message_filter.h" #include "chrome/browser/renderer_host/database_message_filter.h" #include "chrome/browser/renderer_host/file_utilities_message_filter.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_view_host_delegate.h" #include "chrome/browser/renderer_host/render_view_host_notification_task.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/browser/worker_host/message_port_dispatcher.h" #include "chrome/browser/worker_host/worker_service.h" #include "chrome/common/chrome_switches.h" @@ -352,8 +352,8 @@ CallbackWithReturnValue<int>::Type* WorkerProcessHost::GetNextRouteIdCallback( return worker->next_route_id_callback_.get(); } - // Must be a ResourceMessageFilter. - return static_cast<ResourceMessageFilter*>(sender)->next_route_id_callback(); + // Must be a RenderMessageFilter. + return static_cast<RenderMessageFilter*>(sender)->next_route_id_callback(); } void WorkerProcessHost::RelayMessage( diff --git a/chrome/browser/worker_host/worker_service.cc b/chrome/browser/worker_host/worker_service.cc index 71d4abb..e623db1 100644 --- a/chrome/browser/worker_host/worker_service.cc +++ b/chrome/browser/worker_host/worker_service.cc @@ -12,8 +12,8 @@ #include "base/thread.h" #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/plugin_service.h" +#include "chrome/browser/renderer_host/render_message_filter.h" #include "chrome/browser/renderer_host/render_process_host.h" -#include "chrome/browser/renderer_host/resource_message_filter.h" #include "chrome/browser/worker_host/worker_process_host.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" @@ -445,7 +445,7 @@ void WorkerService::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { if (type.value == NotificationType::RESOURCE_MESSAGE_FILTER_SHUTDOWN) { - ResourceMessageFilter* sender = Source<ResourceMessageFilter>(source).ptr(); + RenderMessageFilter* sender = Source<RenderMessageFilter>(source).ptr(); SenderShutdown(sender); } else if (type.value == NotificationType::WORKER_PROCESS_HOST_SHUTDOWN) { WorkerProcessHost* sender = Source<WorkerProcessHost>(source).ptr(); diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 1359840b..e6ff6f8 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2142,6 +2142,8 @@ 'browser/renderer_host/pepper_file_message_filter.h', 'browser/renderer_host/redirect_to_file_resource_handler.cc', 'browser/renderer_host/redirect_to_file_resource_handler.h', + 'browser/renderer_host/render_message_filter.cc', + 'browser/renderer_host/render_message_filter.h', 'browser/renderer_host/render_process_host.cc', 'browser/renderer_host/render_process_host.h', 'browser/renderer_host/render_sandbox_host_linux.h', @@ -2174,8 +2176,6 @@ 'browser/renderer_host/resource_dispatcher_host_request_info.cc', 'browser/renderer_host/resource_dispatcher_host_request_info.h', 'browser/renderer_host/resource_handler.h', - 'browser/renderer_host/resource_message_filter.cc', - 'browser/renderer_host/resource_message_filter.h', 'browser/renderer_host/resource_message_filter_gtk.cc', 'browser/renderer_host/resource_message_filter_mac.mm', 'browser/renderer_host/resource_message_filter_win.cc', diff --git a/chrome/renderer/media/audio_renderer_impl.h b/chrome/renderer/media/audio_renderer_impl.h index 5c8d4cc..6463b27 100644 --- a/chrome/renderer/media/audio_renderer_impl.h +++ b/chrome/renderer/media/audio_renderer_impl.h @@ -11,10 +11,10 @@ // ^ ^ // | | // v IPC v -// ResourceMessageFilter <---------> AudioMessageFilter +// RenderMessageFilter <---------> AudioMessageFilter // // Implementation of interface with audio device is in AudioRendererHost and -// it provides services and entry points in ResourceMessageFilter, allowing +// it provides services and entry points in RenderMessageFilter, allowing // usage of IPC calls to interact with audio device. AudioMessageFilter acts // as a portal for IPC calls and does no more than delegation. // |