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

Unified Diff: content/shell/browser/layout_test/blink_test_controller.cc

Issue 2955123002: Mojo-ify ShellViewHostMsg_LayoutDumpResponse. (Closed)
Patch Set: Addressed CR feedback from alexmos@. Created 3 years, 6 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
« no previous file with comments | « content/shell/browser/layout_test/blink_test_controller.h ('k') | content/shell/common/layout_test.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/layout_test/blink_test_controller.cc
diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc
index 5b61ab410eb450a67caab800fedea49f88823293..03ed2f2d83f2d19ff90896d60f88efa7633db529 100644
--- a/content/shell/browser/layout_test/blink_test_controller.cc
+++ b/content/shell/browser/layout_test/blink_test_controller.cc
@@ -526,19 +526,6 @@ bool BlinkTestController::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-bool BlinkTestController::OnMessageReceived(
- const IPC::Message& message,
- RenderFrameHost* render_frame_host) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(BlinkTestController, message,
- render_frame_host)
- IPC_MESSAGE_HANDLER(ShellViewHostMsg_LayoutDumpResponse,
- OnLayoutDumpResponse)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
- return handled;
-}
-
void BlinkTestController::PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
@@ -791,7 +778,9 @@ void BlinkTestController::OnInitiateLayoutDump() {
continue;
++number_of_messages;
- GetLayoutTestControlPtr(rfh)->LayoutDumpRequest();
+ GetLayoutTestControlPtr(rfh)->DumpFrameLayout(
+ base::Bind(&BlinkTestController::OnDumpFrameLayoutResponse,
+ base::Unretained(this), rfh->GetFrameTreeNodeId()));
}
pending_layout_dumps_ = number_of_messages;
@@ -817,11 +806,11 @@ void BlinkTestController::OnLayoutTestRuntimeFlagsChanged(
}
}
-void BlinkTestController::OnLayoutDumpResponse(RenderFrameHost* sender,
- const std::string& dump) {
+void BlinkTestController::OnDumpFrameLayoutResponse(int frame_tree_node_id,
+ const std::string& dump) {
// Store the result.
auto pair = frame_to_layout_dump_map_.insert(
- std::make_pair(sender->GetFrameTreeNodeId(), dump));
+ std::make_pair(frame_tree_node_id, dump));
bool insertion_took_place = pair.second;
DCHECK(insertion_took_place);
« no previous file with comments | « content/shell/browser/layout_test/blink_test_controller.h ('k') | content/shell/common/layout_test.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698