diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 23:35:50 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-19 23:35:50 +0000 |
commit | 2ccf45c50fad0f2c3c20d95eef6d0040b565b291 (patch) | |
tree | 73eac41769a4678fcdb566e78d6e3bde7c10617c /chrome/renderer | |
parent | da930e1b7adfb28f6895d95004c25984af627080 (diff) | |
download | chromium_src-2ccf45c50fad0f2c3c20d95eef6d0040b565b291.zip chromium_src-2ccf45c50fad0f2c3c20d95eef6d0040b565b291.tar.gz chromium_src-2ccf45c50fad0f2c3c20d95eef6d0040b565b291.tar.bz2 |
Prefix all IPC messages used by src\chrome with Chrome. For e.g ChromeViewMsg_, ChromeViewHostMsg, etc.
This makes it easier to identify which messages are specific to content and chrome.
This is a preparation CL for bug http://code.google.com/p/chromium/issues/detail?id=87335 which
requires IPC's to not span across content and chrome. When IPC's cross these boundaries they need
to be handled as API calls.
BUG=87335
Review URL: http://codereview.chromium.org/7631063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/automation/dom_automation_controller.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/blocked_plugin.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/chrome_content_renderer_client.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/chrome_ppapi_interfaces.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/chrome_render_process_observer.cc | 40 | ||||
-rw-r--r-- | chrome/renderer/chrome_render_view_observer.cc | 33 | ||||
-rw-r--r-- | chrome/renderer/content_settings_observer.cc | 14 | ||||
-rw-r--r-- | chrome/renderer/content_settings_observer_browsertest.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/external_extension.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/external_host_bindings.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/net/renderer_net_predictor.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/prerender/prerender_helper.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/renderer_histogram_snapshots.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/searchbox.cc | 14 | ||||
-rw-r--r-- | chrome/renderer/translate_helper.cc | 10 | ||||
-rw-r--r-- | chrome/renderer/translate_helper_browsertest.cc | 28 | ||||
-rw-r--r-- | chrome/renderer/visitedlink_slave.cc | 7 |
18 files changed, 106 insertions, 93 deletions
diff --git a/chrome/renderer/automation/dom_automation_controller.cc b/chrome/renderer/automation/dom_automation_controller.cc index 35e7c9a..2daac0b 100644 --- a/chrome/renderer/automation/dom_automation_controller.cc +++ b/chrome/renderer/automation/dom_automation_controller.cc @@ -78,7 +78,9 @@ void DomAutomationController::Send(const CppArgumentList& args, } bool succeeded = sender_->Send( - new ViewHostMsg_DomOperationResponse(routing_id_, json, automation_id_)); + new ChromeViewHostMsg_DomOperationResponse(routing_id_, + json, + automation_id_)); result->Set(succeeded); automation_id_ = MSG_ROUTING_NONE; @@ -110,7 +112,9 @@ void DomAutomationController::SendJSON(const CppArgumentList& args, std::string json = args[0].ToString(); result->Set(sender_->Send( - new ViewHostMsg_DomOperationResponse(routing_id_, json, automation_id_))); + new ChromeViewHostMsg_DomOperationResponse(routing_id_, + json, + automation_id_))); automation_id_ = MSG_ROUTING_NONE; } diff --git a/chrome/renderer/blocked_plugin.cc b/chrome/renderer/blocked_plugin.cc index c72ca7c..5501aad 100644 --- a/chrome/renderer/blocked_plugin.cc +++ b/chrome/renderer/blocked_plugin.cc @@ -153,8 +153,9 @@ bool BlockedPlugin::OnMessageReceived(const IPC::Message& message) { &message, this, this, &BlockedPlugin::OnMenuItemSelected); } else { IPC_BEGIN_MESSAGE_MAP(BlockedPlugin, message) - IPC_MESSAGE_HANDLER(ViewMsg_LoadBlockedPlugins, OnLoadBlockedPlugins) - IPC_MESSAGE_HANDLER(ViewMsg_SetIsPrerendering, OnSetIsPrerendering) + IPC_MESSAGE_HANDLER(ChromeViewMsg_LoadBlockedPlugins, + OnLoadBlockedPlugins) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsPrerendering, OnSetIsPrerendering) IPC_END_MESSAGE_MAP() } diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index c18df0d..c197af9 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -331,7 +331,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( std::string resource; if (cmd->HasSwitch(switches::kEnableResourceContentSettings)) resource = group->identifier(); - render_view->Send(new ViewHostMsg_GetPluginContentSetting( + render_view->Send(new ChromeViewHostMsg_GetPluginContentSetting( frame->top()->document().url(), resource, &plugin_setting)); DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT); @@ -351,7 +351,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( if (group->IsVulnerable() || group->RequiresAuthorization()) { // These policies are dynamic and can changed at runtime, so they aren't // cached here. - render_view->Send(new ViewHostMsg_GetPluginPolicies( + render_view->Send(new ChromeViewHostMsg_GetPluginPolicies( &outdated_policy, &authorize_policy)); } @@ -359,7 +359,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( if (outdated_policy == CONTENT_SETTING_ASK || outdated_policy == CONTENT_SETTING_BLOCK) { if (outdated_policy == CONTENT_SETTING_ASK) { - render_view->Send(new ViewHostMsg_BlockedOutdatedPlugin( + render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( render_view->routing_id(), group->GetGroupName(), GURL(group->GetUpdateURL()))); } @@ -380,7 +380,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( (plugin_setting == CONTENT_SETTING_ALLOW || plugin_setting == CONTENT_SETTING_ASK) && host_setting == CONTENT_SETTING_DEFAULT) { - render_view->Send(new ViewHostMsg_BlockedOutdatedPlugin( + render_view->Send(new ChromeViewHostMsg_BlockedOutdatedPlugin( render_view->routing_id(), group->GetGroupName(), GURL())); return CreatePluginPlaceholder( render_view, frame, params, *group, IDR_BLOCKED_PLUGIN_HTML, diff --git a/chrome/renderer/chrome_ppapi_interfaces.cc b/chrome/renderer/chrome_ppapi_interfaces.cc index b3e83d5..22fec52 100644 --- a/chrome/renderer/chrome_ppapi_interfaces.cc +++ b/chrome/renderer/chrome_ppapi_interfaces.cc @@ -29,7 +29,7 @@ bool LaunchSelLdr(const char* alleged_url, int socket_count, std::vector<nacl::FileDescriptor> sockets; base::ProcessHandle nacl_process; if (!RenderThread::current()->Send( - new ViewHostMsg_LaunchNaCl( + new ChromeViewHostMsg_LaunchNaCl( ASCIIToWide(alleged_url), socket_count, &sockets, diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc index 507033c..87ecba4 100644 --- a/chrome/renderer/chrome_render_process_observer.cc +++ b/chrome/renderer/chrome_render_process_observer.cc @@ -104,7 +104,8 @@ class RendererResourceDelegate : public ResourceDispatcherDelegate { void InformHostOfCacheStats() { WebCache::UsageStats stats; WebCache::getUsageStats(&stats); - RenderThread::current()->Send(new ViewHostMsg_UpdatedCacheStats(stats)); + RenderThread::current()->Send(new ChromeViewHostMsg_UpdatedCacheStats( + stats)); } ScopedRunnableMethodFactory<RendererResourceDelegate> method_factory_; @@ -405,24 +406,27 @@ bool ChromeRenderProcessObserver::OnControlMessageReceived( const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message) - IPC_MESSAGE_HANDLER(ViewMsg_SetIsIncognitoProcess, OnSetIsIncognitoProcess) - IPC_MESSAGE_HANDLER(ViewMsg_SetDefaultContentSettings, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess, + OnSetIsIncognitoProcess) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetDefaultContentSettings, OnSetDefaultContentSettings) - IPC_MESSAGE_HANDLER(ViewMsg_SetContentSettingsForCurrentURL, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingsForCurrentURL, OnSetContentSettingsForCurrentURL) - IPC_MESSAGE_HANDLER(ViewMsg_SetCacheCapacities, OnSetCacheCapacities) - IPC_MESSAGE_HANDLER(ViewMsg_ClearCache, OnClearCache) - IPC_MESSAGE_HANDLER(ViewMsg_SetFieldTrialGroup, OnSetFieldTrialGroup) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetCacheCapacities, OnSetCacheCapacities) + IPC_MESSAGE_HANDLER(ChromeViewMsg_ClearCache, OnClearCache) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetFieldTrialGroup, OnSetFieldTrialGroup) #if defined(USE_TCMALLOC) - IPC_MESSAGE_HANDLER(ViewMsg_GetRendererTcmalloc, OnGetRendererTcmalloc) - IPC_MESSAGE_HANDLER(ViewMsg_SetTcmallocHeapProfiling, + IPC_MESSAGE_HANDLER(ChromeViewMsg_GetRendererTcmalloc, + OnGetRendererTcmalloc) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetTcmallocHeapProfiling, OnSetTcmallocHeapProfiling) - IPC_MESSAGE_HANDLER(ViewMsg_WriteTcmallocHeapProfile, + IPC_MESSAGE_HANDLER(ChromeViewMsg_WriteTcmallocHeapProfile, OnWriteTcmallocHeapProfile) #endif - IPC_MESSAGE_HANDLER(ViewMsg_GetV8HeapStats, OnGetV8HeapStats) - IPC_MESSAGE_HANDLER(ViewMsg_GetCacheResourceStats, OnGetCacheResourceStats) - IPC_MESSAGE_HANDLER(ViewMsg_PurgeMemory, OnPurgeMemory) + IPC_MESSAGE_HANDLER(ChromeViewMsg_GetV8HeapStats, OnGetV8HeapStats) + IPC_MESSAGE_HANDLER(ChromeViewMsg_GetCacheResourceStats, + OnGetCacheResourceStats) + IPC_MESSAGE_HANDLER(ChromeViewMsg_PurgeMemory, OnPurgeMemory) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -463,7 +467,7 @@ void ChromeRenderProcessObserver::OnClearCache() { void ChromeRenderProcessObserver::OnGetCacheResourceStats() { WebCache::ResourceTypeStats stats; WebCache::getResourceTypeStats(&stats); - Send(new ViewHostMsg_ResourceTypeStats(stats)); + Send(new ChromeViewHostMsg_ResourceTypeStats(stats)); } #if defined(USE_TCMALLOC) @@ -472,7 +476,7 @@ void ChromeRenderProcessObserver::OnGetRendererTcmalloc() { char buffer[1024 * 32]; MallocExtension::instance()->GetStats(buffer, sizeof(buffer)); result.append(buffer); - Send(new ViewHostMsg_RendererTcmalloc(result)); + Send(new ChromeViewHostMsg_RendererTcmalloc(result)); } void ChromeRenderProcessObserver::OnSetTcmallocHeapProfiling( @@ -501,7 +505,7 @@ void ChromeRenderProcessObserver::OnWriteTcmallocHeapProfile( // a string and pass it to the handler (which runs on the browser host). std::string result(profile); delete profile; - Send(new ViewHostMsg_WriteTcmallocHeapProfile_ACK(filename, result)); + Send(new ChromeViewHostMsg_WriteTcmallocHeapProfile_ACK(filename, result)); #endif } @@ -516,8 +520,8 @@ void ChromeRenderProcessObserver::OnSetFieldTrialGroup( void ChromeRenderProcessObserver::OnGetV8HeapStats() { v8::HeapStatistics heap_stats; v8::V8::GetHeapStatistics(&heap_stats); - Send(new ViewHostMsg_V8HeapStats(heap_stats.total_heap_size(), - heap_stats.used_heap_size())); + Send(new ChromeViewHostMsg_V8HeapStats(heap_stats.total_heap_size(), + heap_stats.used_heap_size())); } void ChromeRenderProcessObserver::OnPurgeMemory() { diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc index 711d418..537a411 100644 --- a/chrome/renderer/chrome_render_view_observer.cc +++ b/chrome/renderer/chrome_render_view_observer.cc @@ -218,19 +218,19 @@ ChromeRenderViewObserver::~ChromeRenderViewObserver() { bool ChromeRenderViewObserver::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(ChromeRenderViewObserver, message) - IPC_MESSAGE_HANDLER(ViewMsg_WebUIJavaScript, OnWebUIJavaScript) - IPC_MESSAGE_HANDLER(ViewMsg_CaptureSnapshot, OnCaptureSnapshot) - IPC_MESSAGE_HANDLER(ViewMsg_HandleMessageFromExternalHost, + IPC_MESSAGE_HANDLER(ChromeViewMsg_WebUIJavaScript, OnWebUIJavaScript) + IPC_MESSAGE_HANDLER(ChromeViewMsg_CaptureSnapshot, OnCaptureSnapshot) + IPC_MESSAGE_HANDLER(ChromeViewMsg_HandleMessageFromExternalHost, OnHandleMessageFromExternalHost) - IPC_MESSAGE_HANDLER(ViewMsg_JavaScriptStressTestControl, + IPC_MESSAGE_HANDLER(ChromeViewMsg_JavaScriptStressTestControl, OnJavaScriptStressTestControl) IPC_MESSAGE_HANDLER(IconMsg_DownloadFavicon, OnDownloadFavicon) IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) - IPC_MESSAGE_HANDLER(ViewMsg_SetAllowDisplayingInsecureContent, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetAllowDisplayingInsecureContent, OnSetAllowDisplayingInsecureContent) - IPC_MESSAGE_HANDLER(ViewMsg_SetAllowRunningInsecureContent, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetAllowRunningInsecureContent, OnSetAllowRunningInsecureContent) - IPC_MESSAGE_HANDLER(ViewMsg_SetClientSidePhishingDetection, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetClientSidePhishingDetection, OnSetClientSidePhishingDetection) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() @@ -238,7 +238,7 @@ bool ChromeRenderViewObserver::OnMessageReceived(const IPC::Message& message) { // Filter only. IPC_BEGIN_MESSAGE_MAP(ChromeRenderViewObserver, message) IPC_MESSAGE_HANDLER(ViewMsg_Navigate, OnNavigate) - IPC_MESSAGE_HANDLER(ViewMsg_SetIsPrerendering, OnSetIsPrerendering); + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsPrerendering, OnSetIsPrerendering); IPC_END_MESSAGE_MAP() return handled; @@ -271,7 +271,7 @@ void ChromeRenderViewObserver::OnCaptureSnapshot() { "Snapshot should be empty on error, non-empty otherwise."; // Send the snapshot to the browser process. - Send(new ViewHostMsg_Snapshot(routing_id(), snapshot)); + Send(new ChromeViewHostMsg_Snapshot(routing_id(), snapshot)); } void ChromeRenderViewObserver::OnHandleMessageFromExternalHost( @@ -391,7 +391,7 @@ bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame, bool default_value) { bool allowed = false; - Send(new ViewHostMsg_CanTriggerClipboardRead( + Send(new ChromeViewHostMsg_CanTriggerClipboardRead( routing_id(), frame->document().url(), &allowed)); return allowed; } @@ -399,7 +399,7 @@ bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame, bool ChromeRenderViewObserver::allowWriteToClipboard(WebFrame* frame, bool default_value) { bool allowed = false; - Send(new ViewHostMsg_CanTriggerClipboardWrite( + Send(new ChromeViewHostMsg_CanTriggerClipboardWrite( routing_id(), frame->document().url(), &allowed)); return allowed; } @@ -486,7 +486,7 @@ bool ChromeRenderViewObserver::allowDisplayingInsecureContent( if (allowed_per_settings || allow_displaying_insecure_content_) return true; - Send(new ViewHostMsg_DidBlockDisplayingInsecureContent(routing_id())); + Send(new ChromeViewHostMsg_DidBlockDisplayingInsecureContent(routing_id())); return false; } @@ -589,7 +589,7 @@ bool ChromeRenderViewObserver::allowRunningInsecureContent( if (allowed_per_settings || allow_running_insecure_content_) return true; - Send(new ViewHostMsg_DidBlockRunningInsecureContent(routing_id())); + Send(new ChromeViewHostMsg_DidBlockRunningInsecureContent(routing_id())); return false; } @@ -636,7 +636,7 @@ void ChromeRenderViewObserver::DidStopLoading() { WebFrame* main_frame = render_view()->webview()->mainFrame(); GURL osd_url = main_frame->document().openSearchDescriptionURL(); if (!osd_url.is_empty()) { - Send(new ViewHostMsg_PageHasOSDD( + Send(new ChromeViewHostMsg_PageHasOSDD( routing_id(), render_view()->page_id(), osd_url, search_provider::AUTODETECTED_PROVIDER)); } @@ -746,7 +746,8 @@ void ChromeRenderViewObserver::CapturePageInfo(int load_id, if (contents.size()) { // Send the text to the browser for indexing (the browser might decide not // to index, if the URL is HTTPS for instance) and language discovery. - Send(new ViewHostMsg_PageContents(routing_id(), url, load_id, contents)); + Send(new ChromeViewHostMsg_PageContents(routing_id(), url, load_id, + contents)); } // Generate the thumbnail here if the in-browser thumbnailing isn't @@ -815,7 +816,7 @@ void ChromeRenderViewObserver::CaptureThumbnail() { return; // send the thumbnail message to the browser process - Send(new ViewHostMsg_Thumbnail(routing_id(), url, score, thumbnail)); + Send(new ChromeViewHostMsg_Thumbnail(routing_id(), url, score, thumbnail)); } bool ChromeRenderViewObserver::CaptureFrameThumbnail(WebView* view, diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc index 59f58df..c89482e 100644 --- a/chrome/renderer/content_settings_observer.cc +++ b/chrome/renderer/content_settings_observer.cc @@ -91,7 +91,7 @@ void ContentSettingsObserver::DidBlockContentType( // time). if (!content_blocked_[settings_type] || !resource_identifier.empty()) { content_blocked_[settings_type] = true; - Send(new ViewHostMsg_ContentBlocked(routing_id(), settings_type, + Send(new ChromeViewHostMsg_ContentBlocked(routing_id(), settings_type, resource_identifier)); } } @@ -101,9 +101,9 @@ bool ContentSettingsObserver::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(ContentSettingsObserver, message) // Don't swallow LoadBlockedPlugins messages, as they're sent to every // blocked plugin. - IPC_MESSAGE_HANDLER_GENERIC(ViewMsg_LoadBlockedPlugins, + IPC_MESSAGE_HANDLER_GENERIC(ChromeViewMsg_LoadBlockedPlugins, OnLoadBlockedPlugins(); handled = false) - IPC_MESSAGE_HANDLER(ViewMsg_SetContentSettingsForLoadingURL, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetContentSettingsForLoadingURL, OnSetContentSettingsForLoadingURL) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() @@ -175,7 +175,7 @@ bool ContentSettingsObserver::AllowDatabase(WebFrame* frame, return false; // Uninitialized document. bool result = false; - Send(new ViewHostMsg_AllowDatabase( + Send(new ChromeViewHostMsg_AllowDatabase( routing_id(), GURL(frame->document().securityOrigin().toString()), GURL(frame->top()->document().securityOrigin().toString()), name, display_name, &result)); @@ -188,7 +188,7 @@ bool ContentSettingsObserver::AllowFileSystem(WebFrame* frame) { return false; // Uninitialized document. bool result = false; - Send(new ViewHostMsg_AllowFileSystem( + Send(new ChromeViewHostMsg_AllowFileSystem( routing_id(), GURL(frame->document().securityOrigin().toString()), GURL(frame->top()->document().securityOrigin().toString()), &result)); return result; @@ -216,7 +216,7 @@ bool ContentSettingsObserver::AllowIndexedDB(WebFrame* frame, return false; // Uninitialized document. bool result = false; - Send(new ViewHostMsg_AllowIndexedDB( + Send(new ChromeViewHostMsg_AllowIndexedDB( routing_id(), GURL(frame->document().securityOrigin().toString()), GURL(frame->top()->document().securityOrigin().toString()), name, &result)); @@ -254,7 +254,7 @@ bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) { if (permissions != cached_storage_permissions_.end()) return permissions->second; - Send(new ViewHostMsg_AllowDOMStorage( + Send(new ChromeViewHostMsg_AllowDOMStorage( routing_id(), GURL(frame->document().securityOrigin().toString()), GURL(frame->top()->document().securityOrigin().toString()), local ? DOM_STORAGE_LOCAL : DOM_STORAGE_SESSION, diff --git a/chrome/renderer/content_settings_observer_browsertest.cc b/chrome/renderer/content_settings_observer_browsertest.cc index 8fbea14..64977ae 100644 --- a/chrome/renderer/content_settings_observer_browsertest.cc +++ b/chrome/renderer/content_settings_observer_browsertest.cc @@ -37,8 +37,8 @@ MockContentSettingsObserver::MockContentSettingsObserver( bool MockContentSettingsObserver::Send(IPC::Message* message) { IPC_BEGIN_MESSAGE_MAP(MockContentSettingsObserver, *message) - IPC_MESSAGE_HANDLER(ViewHostMsg_ContentBlocked, OnContentBlocked) - IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_AllowDOMStorage, + IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, OnContentBlocked) + IPC_MESSAGE_HANDLER_DELAY_REPLY(ChromeViewHostMsg_AllowDOMStorage, OnAllowDOMStorage) IPC_MESSAGE_UNHANDLED(ADD_FAILURE()) IPC_END_MESSAGE_MAP() @@ -131,7 +131,7 @@ TEST_F(RenderViewTest, JSBlockSentAfterPageLoad) { const IPC::Message* msg = render_thread_.sink().GetMessageAt(i); if (msg->type() == ViewHostMsg_FrameNavigate::ID) navigation_index = i; - if (msg->type() == ViewHostMsg_ContentBlocked::ID) + if (msg->type() == ChromeViewHostMsg_ContentBlocked::ID) block_index = i; } EXPECT_NE(-1, navigation_index); @@ -155,7 +155,7 @@ TEST_F(RenderViewTest, PluginsTemporarilyAllowed) { observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS)); // Temporarily allow plugins. - view_->OnMessageReceived(ViewMsg_LoadBlockedPlugins(MSG_ROUTING_NONE)); + view_->OnMessageReceived(ChromeViewMsg_LoadBlockedPlugins(MSG_ROUTING_NONE)); EXPECT_EQ(CONTENT_SETTING_ALLOW, observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS)); diff --git a/chrome/renderer/external_extension.cc b/chrome/renderer/external_extension.cc index a3bc2d7..010e910 100644 --- a/chrome/renderer/external_extension.cc +++ b/chrome/renderer/external_extension.cc @@ -131,7 +131,7 @@ v8::Handle<v8::Value> ExternalExtensionWrapper::AddSearchProvider( render_view->webview()->mainFrame()->isProcessingUserGesture()) { GURL osd_url(name); if (!osd_url.is_empty()) { - render_view->Send(new ViewHostMsg_PageHasOSDD( + render_view->Send(new ChromeViewHostMsg_PageHasOSDD( render_view->routing_id(), render_view->page_id(), osd_url, provider_type)); } @@ -157,7 +157,7 @@ v8::Handle<v8::Value> ExternalExtensionWrapper::IsSearchProviderInstalled( search_provider::InstallState install = search_provider::DENIED; GURL inquiry_url = GURL(name); if (!inquiry_url.is_empty()) { - render_view->Send(new ViewHostMsg_GetSearchProviderInstallState( + render_view->Send(new ChromeViewHostMsg_GetSearchProviderInstallState( render_view->routing_id(), webframe->document().url(), inquiry_url, diff --git a/chrome/renderer/external_host_bindings.cc b/chrome/renderer/external_host_bindings.cc index 4b95ddd..cabd4c2 100644 --- a/chrome/renderer/external_host_bindings.cc +++ b/chrome/renderer/external_host_bindings.cc @@ -50,8 +50,9 @@ void ExternalHostBindings::postMessage( std::string origin = frame_->document().securityOrigin().toString().utf8(); - result->Set(sender()->Send(new ViewHostMsg_ForwardMessageToExternalHost( - routing_id(), message, origin, target))); + result->Set(sender()->Send( + new ChromeViewHostMsg_ForwardMessageToExternalHost( + routing_id(), message, origin, target))); } bool ExternalHostBindings::ForwardMessageFromExternalHost( diff --git a/chrome/renderer/net/renderer_net_predictor.cc b/chrome/renderer/net/renderer_net_predictor.cc index 65fcbe2..16cc665 100644 --- a/chrome/renderer/net/renderer_net_predictor.cc +++ b/chrome/renderer/net/renderer_net_predictor.cc @@ -142,7 +142,7 @@ void RendererNetPredictor::DnsPrefetchNames(size_t max_count) { DCHECK_GE(new_name_count_, names.size()); new_name_count_ -= names.size(); - RenderThread::current()->Send(new ViewHostMsg_DnsPrefetch(names)); + RenderThread::current()->Send(new ChromeViewHostMsg_DnsPrefetch(names)); } // is_numeric_ip() checks to see if all characters in name are either numeric, diff --git a/chrome/renderer/prerender/prerender_helper.cc b/chrome/renderer/prerender/prerender_helper.cc index 67092dc..4a15668 100644 --- a/chrome/renderer/prerender/prerender_helper.cc +++ b/chrome/renderer/prerender/prerender_helper.cc @@ -114,7 +114,7 @@ void PrerenderHelper::WillCreateMediaPlayer( if (is_prerendering_) { // Cancel prerendering in the case of HTML5 media, to avoid playing sounds // in the background. - Send(new ViewHostMsg_MaybeCancelPrerenderForHTML5Media( + Send(new ChromeViewHostMsg_MaybeCancelPrerenderForHTML5Media( render_view()->routing_id())); } } @@ -140,7 +140,7 @@ void PrerenderHelper::DidStartProvisionalLoad(WebKit::WebFrame* frame) { bool PrerenderHelper::OnMessageReceived( const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(PrerenderHelper, message) - IPC_MESSAGE_HANDLER(ViewMsg_SetIsPrerendering, OnSetIsPrerendering) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsPrerendering, OnSetIsPrerendering) IPC_END_MESSAGE_MAP() // Return false on ViewMsg_SetIsPrerendering so other observers can see the // message. diff --git a/chrome/renderer/print_web_view_helper.cc b/chrome/renderer/print_web_view_helper.cc index a0f58fd..485667f9 100644 --- a/chrome/renderer/print_web_view_helper.cc +++ b/chrome/renderer/print_web_view_helper.cc @@ -432,7 +432,7 @@ void PrintWebViewHelper::PrintPage(WebKit::WebFrame* frame) { // Allow Prerendering to cancel this print request if necessary. if (prerender::PrerenderHelper::IsPrerendering(render_view())) { - Send(new ViewHostMsg_CancelPrerenderForPrinting(routing_id())); + Send(new ChromeViewHostMsg_CancelPrerenderForPrinting(routing_id())); return; } diff --git a/chrome/renderer/renderer_histogram_snapshots.cc b/chrome/renderer/renderer_histogram_snapshots.cc index feb9d64..8cf4082 100644 --- a/chrome/renderer/renderer_histogram_snapshots.cc +++ b/chrome/renderer/renderer_histogram_snapshots.cc @@ -36,7 +36,8 @@ bool RendererHistogramSnapshots::OnControlMessageReceived( const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RendererHistogramSnapshots, message) - IPC_MESSAGE_HANDLER(ViewMsg_GetRendererHistograms, OnGetRendererHistograms) + IPC_MESSAGE_HANDLER(ChromeViewMsg_GetRendererHistograms, + OnGetRendererHistograms) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -55,7 +56,7 @@ void RendererHistogramSnapshots::UploadAllHistrograms(int sequence_number) { // Send the sequence number and list of pickled histograms over synchronous // IPC, so we can clear pickled_histograms_ afterwards. RenderThread::current()->Send( - new ViewHostMsg_RendererHistograms( + new ChromeViewHostMsg_RendererHistograms( sequence_number, pickled_histograms_)); pickled_histograms_.clear(); diff --git a/chrome/renderer/searchbox.cc b/chrome/renderer/searchbox.cc index 0b16ec5..9041c1f 100644 --- a/chrome/renderer/searchbox.cc +++ b/chrome/renderer/searchbox.cc @@ -25,7 +25,7 @@ SearchBox::~SearchBox() { void SearchBox::SetSuggestions(const std::vector<std::string>& suggestions, InstantCompleteBehavior behavior) { // Explicitly allow empty vector to be sent to the browser. - render_view()->Send(new ViewHostMsg_SetSuggestions( + render_view()->Send(new ChromeViewHostMsg_SetSuggestions( render_view()->routing_id(), render_view()->page_id(), suggestions, behavior)); } @@ -33,11 +33,11 @@ void SearchBox::SetSuggestions(const std::vector<std::string>& suggestions, bool SearchBox::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(SearchBox, message) - IPC_MESSAGE_HANDLER(ViewMsg_SearchBoxChange, OnChange) - IPC_MESSAGE_HANDLER(ViewMsg_SearchBoxSubmit, OnSubmit) - IPC_MESSAGE_HANDLER(ViewMsg_SearchBoxCancel, OnCancel) - IPC_MESSAGE_HANDLER(ViewMsg_SearchBoxResize, OnResize) - IPC_MESSAGE_HANDLER(ViewMsg_DetermineIfPageSupportsInstant, + IPC_MESSAGE_HANDLER(ChromeViewMsg_SearchBoxChange, OnChange) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SearchBoxSubmit, OnSubmit) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SearchBoxCancel, OnCancel) + IPC_MESSAGE_HANDLER(ChromeViewMsg_SearchBoxResize, OnResize) + IPC_MESSAGE_HANDLER(ChromeViewMsg_DetermineIfPageSupportsInstant, OnDetermineIfPageSupportsInstant) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() @@ -95,7 +95,7 @@ void SearchBox::OnDetermineIfPageSupportsInstant(const string16& value, selection_end_ = selection_end; bool result = extensions_v8::SearchBoxExtension::PageSupportsInstant( render_view()->webview()->mainFrame()); - render_view()->Send(new ViewHostMsg_InstantSupportDetermined( + render_view()->Send(new ChromeViewHostMsg_InstantSupportDetermined( render_view()->routing_id(), render_view()->page_id(), result)); } diff --git a/chrome/renderer/translate_helper.cc b/chrome/renderer/translate_helper.cc index e19c85a..6710a9d 100644 --- a/chrome/renderer/translate_helper.cc +++ b/chrome/renderer/translate_helper.cc @@ -70,7 +70,7 @@ void TranslateHelper::PageCaptured(const string16& contents) { base::TimeTicks::Now() - begin_time); } - Send(new ViewHostMsg_TranslateLanguageDetermined( + Send(new ChromeViewHostMsg_TranslateLanguageDetermined( routing_id(), language, IsPageTranslatable(&document))); } @@ -235,8 +235,8 @@ bool TranslateHelper::DontDelayTasks() { bool TranslateHelper::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(TranslateHelper, message) - IPC_MESSAGE_HANDLER(ViewMsg_TranslatePage, OnTranslatePage) - IPC_MESSAGE_HANDLER(ViewMsg_RevertTranslation, OnRevertTranslation) + IPC_MESSAGE_HANDLER(ChromeViewMsg_TranslatePage, OnTranslatePage) + IPC_MESSAGE_HANDLER(ChromeViewMsg_RevertTranslation, OnRevertTranslation) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -336,7 +336,7 @@ void TranslateHelper::CheckTranslateStatus() { autofill_->FrameTranslated(render_view()->webview()->mainFrame()); // Notify the browser we are done. - render_view()->Send(new ViewHostMsg_PageTranslated( + render_view()->Send(new ChromeViewHostMsg_PageTranslated( render_view()->routing_id(), render_view()->page_id(), actual_source_lang, target_lang_, TranslateErrors::NONE)); return; @@ -425,7 +425,7 @@ void TranslateHelper::NotifyBrowserTranslationFailed( TranslateErrors::Type error) { translation_pending_ = false; // Notify the browser there was an error. - render_view()->Send(new ViewHostMsg_PageTranslated( + render_view()->Send(new ChromeViewHostMsg_PageTranslated( render_view()->routing_id(), page_id_, source_lang_, target_lang_, error)); } diff --git a/chrome/renderer/translate_helper_browsertest.cc b/chrome/renderer/translate_helper_browsertest.cc index efc2dfb..e16e44d 100644 --- a/chrome/renderer/translate_helper_browsertest.cc +++ b/chrome/renderer/translate_helper_browsertest.cc @@ -53,12 +53,12 @@ class TranslateHelperTest : public RenderViewTest { std::string* target_lang, TranslateErrors::Type* error) { const IPC::Message* message = render_thread_.sink(). - GetUniqueMessageMatching(ViewHostMsg_PageTranslated::ID); + GetUniqueMessageMatching(ChromeViewHostMsg_PageTranslated::ID); if (!message) return false; Tuple4<int, std::string, std::string, TranslateErrors::Type> translate_param; - ViewHostMsg_PageTranslated::Read(message, &translate_param); + ChromeViewHostMsg_PageTranslated::Read(message, &translate_param); if (page_id) *page_id = translate_param.a; if (original_lang) @@ -304,10 +304,10 @@ TEST_F(RenderViewTest, TranslatablePage) { LoadHTML("<html><body>A random page with random content.</body></html>"); ProcessPendingMessages(); const IPC::Message* message = render_thread_.sink().GetUniqueMessageMatching( - ViewHostMsg_TranslateLanguageDetermined::ID); + ChromeViewHostMsg_TranslateLanguageDetermined::ID); ASSERT_NE(static_cast<IPC::Message*>(NULL), message); - ViewHostMsg_TranslateLanguageDetermined::Param params; - ViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); + ChromeViewHostMsg_TranslateLanguageDetermined::Param params; + ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); EXPECT_TRUE(params.b); // Translatable should be true. render_thread_.sink().ClearMessages(); @@ -316,9 +316,9 @@ TEST_F(RenderViewTest, TranslatablePage) { "<body>A random page with random content.</body></html>"); ProcessPendingMessages(); message = render_thread_.sink().GetUniqueMessageMatching( - ViewHostMsg_TranslateLanguageDetermined::ID); + ChromeViewHostMsg_TranslateLanguageDetermined::ID); ASSERT_NE(static_cast<IPC::Message*>(NULL), message); - ViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); + ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); EXPECT_FALSE(params.b); // Translatable should be false. render_thread_.sink().ClearMessages(); @@ -327,9 +327,9 @@ TEST_F(RenderViewTest, TranslatablePage) { "<body>A random page with random content.</body></html>"); ProcessPendingMessages(); message = render_thread_.sink().GetUniqueMessageMatching( - ViewHostMsg_TranslateLanguageDetermined::ID); + ChromeViewHostMsg_TranslateLanguageDetermined::ID); ASSERT_NE(static_cast<IPC::Message*>(NULL), message); - ViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); + ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); EXPECT_FALSE(params.b); // Translatable should be false. } @@ -344,10 +344,10 @@ TEST_F(RenderViewTest, LanguageMetaTag) { "</head><body>A random page with random content.</body></html>"); ProcessPendingMessages(); const IPC::Message* message = render_thread_.sink().GetUniqueMessageMatching( - ViewHostMsg_TranslateLanguageDetermined::ID); + ChromeViewHostMsg_TranslateLanguageDetermined::ID); ASSERT_NE(static_cast<IPC::Message*>(NULL), message); - ViewHostMsg_TranslateLanguageDetermined::Param params; - ViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); + ChromeViewHostMsg_TranslateLanguageDetermined::Param params; + ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); EXPECT_EQ("es", params.a); render_thread_.sink().ClearMessages(); @@ -357,8 +357,8 @@ TEST_F(RenderViewTest, LanguageMetaTag) { "</head><body>A random page with random content.</body></html>"); ProcessPendingMessages(); message = render_thread_.sink().GetUniqueMessageMatching( - ViewHostMsg_TranslateLanguageDetermined::ID); + ChromeViewHostMsg_TranslateLanguageDetermined::ID); ASSERT_NE(static_cast<IPC::Message*>(NULL), message); - ViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); + ChromeViewHostMsg_TranslateLanguageDetermined::Read(message, ¶ms); EXPECT_EQ("fr", params.a); } diff --git a/chrome/renderer/visitedlink_slave.cc b/chrome/renderer/visitedlink_slave.cc index 9f301d9..35a2100 100644 --- a/chrome/renderer/visitedlink_slave.cc +++ b/chrome/renderer/visitedlink_slave.cc @@ -21,9 +21,10 @@ VisitedLinkSlave::~VisitedLinkSlave() { bool VisitedLinkSlave::OnControlMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(VisitedLinkSlave, message) - IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_NewTable, OnUpdateVisitedLinks) - IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_Add, OnAddVisitedLinks) - IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_Reset, OnResetVisitedLinks) + IPC_MESSAGE_HANDLER(ChromeViewMsg_VisitedLink_NewTable, + OnUpdateVisitedLinks) + IPC_MESSAGE_HANDLER(ChromeViewMsg_VisitedLink_Add, OnAddVisitedLinks) + IPC_MESSAGE_HANDLER(ChromeViewMsg_VisitedLink_Reset, OnResetVisitedLinks) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; |