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

Unified Diff: android_webview/common/aw_content_client.cc

Issue 11861008: Expose the capturePicture feature in RenderView for Android WebView legacy API support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed sync IPC issues. Created 7 years, 10 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: android_webview/common/aw_content_client.cc
diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc
index a7b467d8298984ad730d243856b335c50aa8b9bd..053215d6e7a98354a56931fb79f8978703fe82cd 100644
--- a/android_webview/common/aw_content_client.cc
+++ b/android_webview/common/aw_content_client.cc
@@ -5,6 +5,7 @@
#include "android_webview/common/aw_content_client.h"
#include "base/basictypes.h"
+#include "ipc/ipc_message.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "webkit/user_agent/user_agent_util.h"
@@ -35,4 +36,12 @@ base::StringPiece AwContentClient::GetDataResource(
resource_id, scale_factor);
}
+bool AwContentClient::CanSendWhileSwappedOut(const IPC::Message* message) {
+ // For legacy API support we perform a few browser -> renderer synchronous IPC
+ // messages that block the browser. However, the synchronous IPC replies might
+ // be dropped by the renderer during a swap out, deadlocking the browser.
+ // Because of this we should never drop any synchronous IPC replies.
+ return message->type() == IPC_REPLY_ID;
+}
+
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698