| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #ifndef XMLDocumentParserScope_h | 26 #ifndef XMLDocumentParserScope_h |
| 27 #define XMLDocumentParserScope_h | 27 #define XMLDocumentParserScope_h |
| 28 | 28 |
| 29 #include "wtf/Noncopyable.h" | 29 #include "wtf/Noncopyable.h" |
| 30 #include <libxml/xmlerror.h> | 30 #include <libxml/xmlerror.h> |
| 31 | 31 |
| 32 namespace WebCore { | 32 namespace WebCore { |
| 33 | 33 |
| 34 class ResourceFetcher; | 34 class ResourceFetcher; |
| 35 | 35 |
| 36 class XMLDocumentParserScope { | 36 class XMLDocumentParserScope { |
| 37 WTF_MAKE_NONCOPYABLE(XMLDocumentParserScope); | 37 WTF_MAKE_NONCOPYABLE(XMLDocumentParserScope); |
| 38 public: | 38 public: |
| 39 explicit XMLDocumentParserScope(ResourceFetcher*); | 39 explicit XMLDocumentParserScope(ResourceFetcher*); |
| 40 ~XMLDocumentParserScope(); | 40 XMLDocumentParserScope(ResourceFetcher*, xmlGenericErrorFunc, xmlStructuredE
rrorFunc = 0, void* errorContext = 0); |
| 41 ~XMLDocumentParserScope(); |
| 41 | 42 |
| 42 static ResourceFetcher* currentFetcher; | 43 static ResourceFetcher* currentFetcher; |
| 43 | 44 |
| 44 XMLDocumentParserScope(ResourceFetcher*, xmlGenericErrorFunc, xmlStructu
redErrorFunc = 0, void* errorContext = 0); | 45 private: |
| 46 ResourceFetcher* m_oldFetcher; |
| 45 | 47 |
| 46 private: | 48 xmlGenericErrorFunc m_oldGenericErrorFunc; |
| 47 ResourceFetcher* m_oldFetcher; | 49 xmlStructuredErrorFunc m_oldStructuredErrorFunc; |
| 48 | 50 void* m_oldErrorContext; |
| 49 xmlGenericErrorFunc m_oldGenericErrorFunc; | 51 }; |
| 50 xmlStructuredErrorFunc m_oldStructuredErrorFunc; | |
| 51 void* m_oldErrorContext; | |
| 52 }; | |
| 53 | 52 |
| 54 } // namespace WebCore | 53 } // namespace WebCore |
| 55 | 54 |
| 56 #endif // XMLDocumentParserScope_h | 55 #endif // XMLDocumentParserScope_h |
| OLD | NEW |