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 0dfb42e886f7364325da21efb5a685b5478300d9..0f6266a351aa2f81bb02956ba26b4bb8f58c5bd3 100644 |
--- a/content/browser/renderer_host/render_message_filter.cc |
+++ b/content/browser/renderer_host/render_message_filter.cc |
@@ -55,6 +55,7 @@ |
#include "net/url_request/url_request_context.h" |
#include "net/url_request/url_request_context_getter.h" |
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNotificationPresenter.h" |
+#include "ui/gfx/color_profile.h" |
#include "webkit/glue/webcookie.h" |
#include "webkit/glue/webkit_glue.h" |
#include "webkit/plugins/npapi/plugin_group.h" |
@@ -390,6 +391,8 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message, |
OnGetHardwareSampleRate) |
IPC_MESSAGE_HANDLER(ViewHostMsg_GetHardwareInputChannelLayout, |
OnGetHardwareInputChannelLayout) |
+ IPC_MESSAGE_HANDLER(ViewHostMsg_GetMonitorColorProfile, |
+ OnGetMonitorColorProfile) |
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvent, OnMediaLogEvent) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP_EX() |
@@ -401,6 +404,15 @@ void RenderMessageFilter::OnDestruct() const { |
BrowserThread::DeleteOnIOThread::Destruct(this); |
} |
+void RenderMessageFilter::OverrideThreadForMessage( |
+ const IPC::Message& message, BrowserThread::ID* thread) { |
+#if defined(OS_WIN) |
+ // Windows monitor profile must be read from a file. |
Noel Gordon
2012/06/21 16:58:33
Well the fact is really that "color profiles must
tpayne
2012/07/02 19:22:32
Now that this call is only for the monitor profile
|
+ if (message.type() == ViewHostMsg_GetMonitorColorProfile::ID) |
+ *thread = BrowserThread::FILE; |
+#endif |
+} |
+ |
bool RenderMessageFilter::OffTheRecord() const { |
return incognito_; |
} |
@@ -708,6 +720,13 @@ void RenderMessageFilter::OnGetHardwareInputChannelLayout( |
media::AudioManagerBase::kDefaultDeviceId); |
} |
+void RenderMessageFilter::OnGetMonitorColorProfile( |
+ gfx::NativeViewId parent_window, |
+ std::string type, |
+ std::vector<char>* profile) { |
+ gfx::ColorProfile::GetColorProfile(parent_window, profile); |
Noel Gordon
2012/06/21 16:58:33
|type| is silently dropped here.
// TODO(you) pas
tpayne
2012/06/29 00:25:16
The more I think about this, the more I'm certain
tpayne
2012/07/02 19:22:32
This is now done. I think this name should be good
|
+} |
+ |
void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message, |
const GURL& url, |
const content::Referrer& referrer, |