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

Unified Diff: content/shell/test_runner/layout_dump.cc

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: . Created 3 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/shell/test_runner/layout_dump.cc
diff --git a/content/shell/test_runner/layout_dump.cc b/content/shell/test_runner/layout_dump.cc
index 9c6837c8aeda5c0350038906e26e4c0aa040e08a..e543762d07deb6dcce6f057c35862924ba16bb09 100644
--- a/content/shell/test_runner/layout_dump.cc
+++ b/content/shell/test_runner/layout_dump.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/strings/stringprintf.h"
+#include "content/renderer/render_frame_impl.h"
#include "third_party/WebKit/public/platform/WebSize.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -23,26 +24,27 @@ using blink::WebSize;
namespace {
-std::string DumpFrameHeaderIfNeeded(WebFrame* frame) {
+std::string DumpFrameHeaderIfNeeded(WebLocalFrame* frame) {
std::string result;
// Add header for all but the main frame. Skip empty frames.
if (frame->parent() && !frame->document().documentElement().isNull()) {
result.append("\n--------\nFrame: '");
- result.append(frame->uniqueName().utf8());
+ result.append(content::RenderFrameImpl::FromWebFrame(frame)->unique_name());
result.append("'\n--------\n");
}
return result;
}
-std::string DumpFrameScrollPosition(WebFrame* frame) {
+std::string DumpFrameScrollPosition(WebLocalFrame* frame) {
std::string result;
WebSize offset = frame->getScrollOffset();
if (offset.width > 0 || offset.height > 0) {
if (frame->parent()) {
- result =
- std::string("frame '") + frame->uniqueName().utf8().data() + "' ";
+ result = std::string("frame '") +
+ content::RenderFrameImpl::FromWebFrame(frame)->unique_name() +
+ "' ";
}
base::StringAppendF(&result, "scrolled to %d,%d\n", offset.width,
offset.height);

Powered by Google App Engine
This is Rietveld 408576698