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

Unified Diff: content/renderer/savable_resources.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. 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/renderer/savable_resources.h ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/savable_resources.cc
diff --git a/content/renderer/savable_resources.cc b/content/renderer/savable_resources.cc
index ce7c9cd8a3e3da9a792a88bce909f4e78af624e9..24bcdb79b65642e4f7404694ac4a38c9a60339a3 100644
--- a/content/renderer/savable_resources.cc
+++ b/content/renderer/savable_resources.cc
@@ -37,10 +37,10 @@ namespace {
// Returns |true| if |web_frame| contains (or should be assumed to contain)
// a html document.
-bool DoesFrameContainHtmlDocument(const WebFrame& web_frame,
+bool DoesFrameContainHtmlDocument(WebFrame* web_frame,
const WebElement& element) {
- if (web_frame.IsWebLocalFrame()) {
- WebDocument doc = web_frame.GetDocument();
+ if (web_frame->IsWebLocalFrame()) {
+ WebDocument doc = web_frame->ToWebLocalFrame()->GetDocument();
return doc.IsHTMLDocument() || doc.IsXHTMLDocument();
}
@@ -68,7 +68,7 @@ void GetSavableResourceLinkForElement(
// See whether to report this element as a subframe.
WebFrame* web_frame = WebFrame::FromFrameOwnerElement(element);
- if (web_frame && DoesFrameContainHtmlDocument(*web_frame, element)) {
+ if (web_frame && DoesFrameContainHtmlDocument(web_frame, element)) {
SavableSubframe subframe;
subframe.original_url = element_url;
subframe.routing_id = RenderFrame::GetRoutingIdForWebFrame(web_frame);
@@ -96,7 +96,7 @@ void GetSavableResourceLinkForElement(
} // namespace
-bool GetSavableResourceLinksForFrame(WebFrame* current_frame,
+bool GetSavableResourceLinksForFrame(WebLocalFrame* current_frame,
SavableResourcesResult* result) {
// Get current frame's URL.
GURL current_frame_url = current_frame->GetDocument().Url();
« no previous file with comments | « content/renderer/savable_resources.h ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698