Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(803)

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 1796293003: Image decode color: Push color profile from browser to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows tests Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index d3e33aee5e29571df3b43fce1947650ee32c8ca2..fd6dd9179b3c311684a2d5d34f3f079591292274 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -93,14 +93,6 @@ const uint32_t kFilteredMessageClasses[] = {
ChildProcessMsgStart, RenderProcessMsgStart, ViewMsgStart,
};
-#if defined(OS_WIN)
-// On Windows, |g_color_profile| can run on an arbitrary background thread.
-// We avoid races by using LazyInstance's constructor lock to initialize the
-// object.
-base::LazyInstance<gfx::ColorProfile>::Leaky g_color_profile =
- LAZY_INSTANCE_INITIALIZER;
-#endif
-
void DownloadUrlOnUIThread(scoped_ptr<DownloadUrlParameters> parameters) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -206,8 +198,6 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
#elif defined(OS_WIN)
IPC_MESSAGE_HANDLER(RenderProcessHostMsg_PreCacheFontCharacters,
OnPreCacheFontCharacters)
- IPC_MESSAGE_HANDLER(RenderProcessHostMsg_GetMonitorColorProfile,
- OnGetMonitorColorProfile)
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvents, OnMediaLogEvents)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -229,11 +219,6 @@ void RenderMessageFilter::OverrideThreadForMessage(const IPC::Message& message,
base::TaskRunner* RenderMessageFilter::OverrideTaskRunnerForMessage(
const IPC::Message& message) {
-#if defined(OS_WIN)
- // Windows monitor profile must be read from a file.
- if (message.type() == RenderProcessHostMsg_GetMonitorColorProfile::ID)
- return BrowserThread::GetBlockingPool();
-#endif
// Always query audio device parameters on the audio thread.
if (message.type() == ViewHostMsg_GetAudioHardwareConfig::ID)
return audio_manager_->GetTaskRunner().get();
@@ -372,11 +357,6 @@ void RenderMessageFilter::OnPreCacheFontCharacters(
DeleteEnhMetaFile(metafile);
}
-void RenderMessageFilter::OnGetMonitorColorProfile(std::vector<char>* profile) {
- DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO));
- *profile = g_color_profile.Get().profile();
-}
-
#endif // OS_*
void RenderMessageFilter::DownloadUrl(int render_view_id,

Powered by Google App Engine
This is Rietveld 408576698