OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 336 } |
337 | 337 |
338 bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message, | 338 bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message, |
339 bool* message_was_ok) { | 339 bool* message_was_ok) { |
340 bool handled = true; | 340 bool handled = true; |
341 IPC_BEGIN_MESSAGE_MAP_EX(RenderMessageFilter, message, *message_was_ok) | 341 IPC_BEGIN_MESSAGE_MAP_EX(RenderMessageFilter, message, *message_was_ok) |
342 #if defined(OS_WIN) && !defined(USE_AURA) | 342 #if defined(OS_WIN) && !defined(USE_AURA) |
343 // On Windows, we handle these on the IO thread to avoid a deadlock with | 343 // On Windows, we handle these on the IO thread to avoid a deadlock with |
344 // plugins. On non-Windows systems, we need to handle them on the UI | 344 // plugins. On non-Windows systems, we need to handle them on the UI |
345 // thread. | 345 // thread. |
| 346 IPC_MESSAGE_HANDLER(ViewHostMsg_GetScreenInfo, OnGetScreenInfo) |
346 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnGetWindowRect) | 347 IPC_MESSAGE_HANDLER(ViewHostMsg_GetWindowRect, OnGetWindowRect) |
347 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnGetRootWindowRect) | 348 IPC_MESSAGE_HANDLER(ViewHostMsg_GetRootWindowRect, OnGetRootWindowRect) |
348 #endif | 349 #endif |
349 IPC_MESSAGE_HANDLER(ViewHostMsg_GenerateRoutingID, OnGenerateRoutingID) | 350 IPC_MESSAGE_HANDLER(ViewHostMsg_GenerateRoutingID, OnGenerateRoutingID) |
350 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnMsgCreateWindow) | 351 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWindow, OnMsgCreateWindow) |
351 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget) | 352 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWidget, OnMsgCreateWidget) |
352 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateFullscreenWidget, | 353 IPC_MESSAGE_HANDLER(ViewHostMsg_CreateFullscreenWidget, |
353 OnMsgCreateFullscreenWidget) | 354 OnMsgCreateFullscreenWidget) |
354 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCookie, OnSetCookie) | 355 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCookie, OnSetCookie) |
355 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetCookies, OnGetCookies) | 356 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_GetCookies, OnGetCookies) |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
951 // for a resize or if no backing store) the RenderWidgetHost is blocking the | 952 // for a resize or if no backing store) the RenderWidgetHost is blocking the |
952 // UI thread for some time, waiting for an UpdateRect from the renderer. If we | 953 // UI thread for some time, waiting for an UpdateRect from the renderer. If we |
953 // are going to switch to accelerated compositing, the GPU process may need | 954 // are going to switch to accelerated compositing, the GPU process may need |
954 // round-trips to the UI thread before finishing the frame, causing deadlocks | 955 // round-trips to the UI thread before finishing the frame, causing deadlocks |
955 // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So | 956 // if we delay the UpdateRect until we receive the OnSwapBuffersComplete. So |
956 // the renderer sent us this message, so that we can unblock the UI thread. | 957 // the renderer sent us this message, so that we can unblock the UI thread. |
957 // We will simply re-use the UpdateRect unblock mechanism, just with a | 958 // We will simply re-use the UpdateRect unblock mechanism, just with a |
958 // different message. | 959 // different message. |
959 render_widget_helper_->DidReceiveBackingStoreMsg(msg); | 960 render_widget_helper_->DidReceiveBackingStoreMsg(msg); |
960 } | 961 } |
OLD | NEW |