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

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

Issue 23671002: Refactoring: Add toWebFrameImpl() interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Corrected as per review commments. Created 7 years, 3 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
« no previous file with comments | « Source/web/WebPageSerializer.cpp ('k') | Source/web/WebRange.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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 const WebString& localDirectoryName ) 439 const WebString& localDirectoryName )
440 : m_client(client) 440 : m_client(client)
441 , m_recursiveSerialization(recursiveSerialization) 441 , m_recursiveSerialization(recursiveSerialization)
442 , m_framesCollected(false) 442 , m_framesCollected(false)
443 , m_localDirectoryName(localDirectoryName) 443 , m_localDirectoryName(localDirectoryName)
444 , m_htmlEntities(false) 444 , m_htmlEntities(false)
445 , m_xmlEntities(true) 445 , m_xmlEntities(true)
446 { 446 {
447 // Must specify available webframe. 447 // Must specify available webframe.
448 ASSERT(frame); 448 ASSERT(frame);
449 m_specifiedWebFrameImpl = static_cast<WebFrameImpl*>(frame); 449 m_specifiedWebFrameImpl = toWebFrameImpl(frame);
450 // Make sure we have non 0 client. 450 // Make sure we have non 0 client.
451 ASSERT(client); 451 ASSERT(client);
452 // Build local resources map. 452 // Build local resources map.
453 ASSERT(links.size() == localPaths.size()); 453 ASSERT(links.size() == localPaths.size());
454 for (size_t i = 0; i < links.size(); i++) { 454 for (size_t i = 0; i < links.size(); i++) {
455 KURL url = links[i]; 455 KURL url = links[i];
456 ASSERT(!m_localLinks.contains(url.string())); 456 ASSERT(!m_localLinks.contains(url.string()));
457 m_localLinks.set(url.string(), localPaths[i]); 457 m_localLinks.set(url.string(), localPaths[i]);
458 } 458 }
459 459
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 521
522 encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &p aram, ForceFlush); 522 encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &p aram, ForceFlush);
523 } 523 }
524 524
525 ASSERT(m_dataBuffer.isEmpty()); 525 ASSERT(m_dataBuffer.isEmpty());
526 m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSeriali zerClient::AllFramesAreFinished); 526 m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSeriali zerClient::AllFramesAreFinished);
527 return didSerialization; 527 return didSerialization;
528 } 528 }
529 529
530 } // namespace WebKit 530 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebPageSerializer.cpp ('k') | Source/web/WebRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698