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

Side by Side Diff: Source/web/WebPageSerializer.cpp

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPagePopupImpl.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 resourceURLs->append(url); 133 resourceURLs->append(url);
134 } 134 }
135 135
136 void retrieveResourcesForFrame(Frame* frame, 136 void retrieveResourcesForFrame(Frame* frame,
137 const WebKit::WebVector<WebKit::WebCString>& supp ortedSchemes, 137 const WebKit::WebVector<WebKit::WebCString>& supp ortedSchemes,
138 Vector<Frame*>* visitedFrames, 138 Vector<Frame*>* visitedFrames,
139 Vector<Frame*>* framesToVisit, 139 Vector<Frame*>* framesToVisit,
140 Vector<KURL>* frameURLs, 140 Vector<KURL>* frameURLs,
141 Vector<KURL>* resourceURLs) 141 Vector<KURL>* resourceURLs)
142 { 142 {
143 KURL frameURL = frame->loader()->documentLoader()->request().url(); 143 KURL frameURL = frame->loader().documentLoader()->request().url();
144 144
145 // If the frame's URL is invalid, ignore it, it is not retrievable. 145 // If the frame's URL is invalid, ignore it, it is not retrievable.
146 if (!frameURL.isValid()) 146 if (!frameURL.isValid())
147 return; 147 return;
148 148
149 // Ignore frames from unsupported schemes. 149 // Ignore frames from unsupported schemes.
150 bool isValidScheme = false; 150 bool isValidScheme = false;
151 for (size_t i = 0; i < supportedSchemes.size(); ++i) { 151 for (size_t i = 0; i < supportedSchemes.size(); ++i) {
152 if (frameURL.protocolIs(static_cast<CString>(supportedSchemes[i]).data() )) { 152 if (frameURL.protocolIs(static_cast<CString>(supportedSchemes[i]).data() )) {
153 isValidScheme = true; 153 isValidScheme = true;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 292
293 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get) 293 WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTar get)
294 { 294 {
295 if (baseTarget.isEmpty()) 295 if (baseTarget.isEmpty())
296 return String("<base href=\".\">"); 296 return String("<base href=\".\">");
297 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">"; 297 String baseString = "<base href=\".\" target=\"" + static_cast<const String& >(baseTarget) + "\">";
298 return baseString; 298 return baseString;
299 } 299 }
300 300
301 } // namespace WebKit 301 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebPagePopupImpl.cpp ('k') | Source/web/WebPluginContainerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698