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

Side by Side Diff: xfa/fxfa/parser/cxfa_document_parser.cpp

Issue 2451493002: Refcount all the IFX_ stream classes all the time. (Closed)
Patch Set: Clean up cast expression Created 4 years 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 | « xfa/fxfa/parser/cxfa_document_parser.h ('k') | xfa/fxfa/parser/cxfa_node.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 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/parser/cxfa_document_parser.h" 7 #include "xfa/fxfa/parser/cxfa_document_parser.h"
8 8
9 #include "xfa/fxfa/fxfa.h" 9 #include "xfa/fxfa/fxfa.h"
10 #include "xfa/fxfa/parser/cxfa_document.h" 10 #include "xfa/fxfa/parser/cxfa_document.h"
11 11
12 CXFA_DocumentParser::CXFA_DocumentParser(CXFA_FFNotify* pNotify) 12 CXFA_DocumentParser::CXFA_DocumentParser(CXFA_FFNotify* pNotify)
13 : m_nodeParser(nullptr, true), m_pNotify(pNotify) {} 13 : m_nodeParser(nullptr, true), m_pNotify(pNotify) {}
14 14
15 CXFA_DocumentParser::~CXFA_DocumentParser() { 15 CXFA_DocumentParser::~CXFA_DocumentParser() {
16 } 16 }
17 17
18 int32_t CXFA_DocumentParser::StartParse(IFX_SeekableReadStream* pStream, 18 int32_t CXFA_DocumentParser::StartParse(
19 XFA_XDPPACKET ePacketID) { 19 const CFX_RetainPtr<IFX_SeekableReadStream>& pStream,
20 XFA_XDPPACKET ePacketID) {
20 m_pDocument.reset(); 21 m_pDocument.reset();
21 m_nodeParser.CloseParser(); 22 m_nodeParser.CloseParser();
22 23
23 int32_t nRetStatus = m_nodeParser.StartParse(pStream, ePacketID); 24 int32_t nRetStatus = m_nodeParser.StartParse(pStream, ePacketID);
24 if (nRetStatus == XFA_PARSESTATUS_Ready) { 25 if (nRetStatus == XFA_PARSESTATUS_Ready) {
25 m_pDocument.reset(new CXFA_Document(this)); 26 m_pDocument.reset(new CXFA_Document(this));
26 m_nodeParser.SetFactory(m_pDocument.get()); 27 m_nodeParser.SetFactory(m_pDocument.get());
27 } 28 }
28 return nRetStatus; 29 return nRetStatus;
29 } 30 }
(...skipping 11 matching lines...) Expand all
41 return m_nodeParser.GetXMLDoc(); 42 return m_nodeParser.GetXMLDoc();
42 } 43 }
43 44
44 CXFA_FFNotify* CXFA_DocumentParser::GetNotify() const { 45 CXFA_FFNotify* CXFA_DocumentParser::GetNotify() const {
45 return m_pNotify; 46 return m_pNotify;
46 } 47 }
47 48
48 CXFA_Document* CXFA_DocumentParser::GetDocument() const { 49 CXFA_Document* CXFA_DocumentParser::GetDocument() const {
49 return m_pDocument.get(); 50 return m_pDocument.get();
50 } 51 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/cxfa_document_parser.h ('k') | xfa/fxfa/parser/cxfa_node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698