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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 974483002: [WebView] Remove onFailure from VisualStateCallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 272aeb201995ae28ed0858dccb99fcb673914a50..05470bb438dc48a907267854d7def993ebbde470 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -360,6 +360,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
IPC_MESSAGE_HANDLER(FrameHostMsg_ContextMenu, OnContextMenu)
IPC_MESSAGE_HANDLER(FrameHostMsg_JavaScriptExecuteResponse,
OnJavaScriptExecuteResponse)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateSwapInfo,
+ OnVisualStateSwapInfo)
IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse,
OnVisualStateResponse)
IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
@@ -1134,10 +1136,15 @@ void RenderFrameHostImpl::OnJavaScriptExecuteResponse(
}
}
+void RenderFrameHostImpl::OnVisualStateSwapInfo(int source_frame_number,
+ bool swap_success) {
+ last_swap_info_ = std::make_pair(source_frame_number, swap_success);
+}
+
void RenderFrameHostImpl::OnVisualStateResponse(uint64 id) {
auto it = visual_state_callbacks_.find(id);
if (it != visual_state_callbacks_.end()) {
- it->second.Run(true);
+ it->second.Run(last_swap_info_.second);
visual_state_callbacks_.erase(it);
} else {
NOTREACHED() << "Received script response for unknown request";

Powered by Google App Engine
This is Rietveld 408576698