OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_message_filter.h" | 5 #include "content/browser/renderer_host/render_message_filter.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 base::PlatformFile file = base::CreatePlatformFile( | 842 base::PlatformFile file = base::CreatePlatformFile( |
843 path, flags, NULL, &error_code); | 843 path, flags, NULL, &error_code); |
844 IPC::PlatformFileForTransit file_for_transit = | 844 IPC::PlatformFileForTransit file_for_transit = |
845 file != base::kInvalidPlatformFileValue ? | 845 file != base::kInvalidPlatformFileValue ? |
846 IPC::GetFileHandleForProcess(file, peer_handle(), true) : | 846 IPC::GetFileHandleForProcess(file, peer_handle(), true) : |
847 IPC::InvalidPlatformFileForTransit(); | 847 IPC::InvalidPlatformFileForTransit(); |
848 | 848 |
849 IPC::Message* reply = new ViewMsg_AsyncOpenFile_ACK( | 849 IPC::Message* reply = new ViewMsg_AsyncOpenFile_ACK( |
850 routing_id, error_code, file_for_transit, message_id); | 850 routing_id, error_code, file_for_transit, message_id); |
851 BrowserThread::PostTask( | 851 BrowserThread::PostTask( |
852 BrowserThread::IO, FROM_HERE, base::IgnoreReturn<bool>(base::Bind( | 852 BrowserThread::IO, FROM_HERE, |
853 &RenderMessageFilter::Send, this, reply))); | 853 base::Bind(base::IgnoreResult(&RenderMessageFilter::Send), this, reply)); |
854 } | 854 } |
855 | 855 |
856 void RenderMessageFilter::OnMediaLogEvent(const media::MediaLogEvent& event) { | 856 void RenderMessageFilter::OnMediaLogEvent(const media::MediaLogEvent& event) { |
857 resource_context_.media_observer()->OnMediaEvent(render_process_id_, event); | 857 resource_context_.media_observer()->OnMediaEvent(render_process_id_, event); |
858 } | 858 } |
859 | 859 |
860 void RenderMessageFilter::CheckPolicyForCookies( | 860 void RenderMessageFilter::CheckPolicyForCookies( |
861 const GURL& url, | 861 const GURL& url, |
862 const GURL& first_party_for_cookies, | 862 const GURL& first_party_for_cookies, |
863 IPC::Message* reply_msg, | 863 IPC::Message* reply_msg, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 // for a resize or if no backing store) the RenderWidgetHost is blocking the | 906 // for a resize or if no backing store) the RenderWidgetHost is blocking the |
907 // UI thread for some time, waiting for an UpdateRect from the renderer. If we | 907 // UI thread for some time, waiting for an UpdateRect from the renderer. If we |
908 // are going to switch to accelerated compositing, the GPU process may need | 908 // are going to switch to accelerated compositing, the GPU process may need |
909 // round-trips to the UI thread before finishing the frame, causing deadlocks | 909 // round-trips to the UI thread before finishing the frame, causing deadlocks |
910 // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So | 910 // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So |
911 // the renderer sent us this message, so that we can unblock the UI thread. | 911 // the renderer sent us this message, so that we can unblock the UI thread. |
912 // We will simply re-use the UpdateRect unblock mechanism, just with a | 912 // We will simply re-use the UpdateRect unblock mechanism, just with a |
913 // different message. | 913 // different message. |
914 render_widget_helper_->DidReceiveUpdateMsg(msg); | 914 render_widget_helper_->DidReceiveUpdateMsg(msg); |
915 } | 915 } |
OLD | NEW |