Chromium Code Reviews| 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..b14a6a8b1e3b0b9424dacb802a5e6d165dc7cec4 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_DELAY_REPLY(ViewHostMsg_GetMonitorColorProfile, |
|
jam
2012/06/20 16:21:21
no need to use IPC_MESSAGE_HANDLER_DELAY_REPLY, th
tpayne
2012/06/20 16:39:03
Done.
|
| + 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. |
| + if (message.type() == ViewHostMsg_GetMonitorColorProfile::ID) |
| + *thread = BrowserThread::FILE; |
| +#endif |
| +} |
| + |
| bool RenderMessageFilter::OffTheRecord() const { |
| return incognito_; |
| } |
| @@ -708,6 +720,16 @@ void RenderMessageFilter::OnGetHardwareInputChannelLayout( |
| media::AudioManagerBase::kDefaultDeviceId); |
| } |
| +void RenderMessageFilter::OnGetMonitorColorProfile( |
| + gfx::NativeViewId parent_window, |
| + std::string type, |
| + IPC::Message* reply_msg) { |
| + std::vector<char> profile; |
| + gfx::ColorProfile::GetColorProfile(parent_window, &profile); |
| + ViewHostMsg_GetMonitorColorProfile::WriteReplyParams(reply_msg, profile); |
| + Send(reply_msg); |
| +} |
| + |
| void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message, |
| const GURL& url, |
| const content::Referrer& referrer, |