| OLD | NEW | 
|   1 // Copyright 2014 The Chromium Authors. All rights reserved. |   1 // Copyright 2014 The Chromium 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 #ifndef DocumentXSLT_h |   5 #ifndef DocumentXSLT_h | 
|   6 #define DocumentXSLT_h |   6 #define DocumentXSLT_h | 
|   7  |   7  | 
|   8 #include "core/dom/Document.h" |   8 #include "core/dom/Document.h" | 
|   9 #include "platform/heap/Handle.h" |   9 #include "platform/heap/Handle.h" | 
|  10 #include "wtf/RefPtr.h" |  10 #include "wtf/RefPtr.h" | 
|  11  |  11  | 
|  12 namespace blink { |  12 namespace blink { | 
|  13  |  13  | 
|  14 class Document; |  14 class Document; | 
|  15 class ProcessingInstruction; |  15 class ProcessingInstruction; | 
|  16  |  16  | 
|  17 class DocumentXSLT final : public NoBaseWillBeGarbageCollected<DocumentXSLT>, pu
    blic WillBeHeapSupplement<Document> { |  17 class DocumentXSLT final : public GarbageCollected<DocumentXSLT>, public HeapSup
    plement<Document> { | 
|  18     WTF_MAKE_NONCOPYABLE(DocumentXSLT); |  18     WTF_MAKE_NONCOPYABLE(DocumentXSLT); | 
|  19     WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DocumentXSLT); |  19     USING_GARBAGE_COLLECTED_MIXIN(DocumentXSLT); | 
|  20     USING_FAST_MALLOC_WILL_BE_REMOVED(DocumentXSLT); |  | 
|  21 public: |  20 public: | 
|  22     Document* transformSourceDocument() |  21     Document* transformSourceDocument() | 
|  23     { |  22     { | 
|  24         return m_transformSourceDocument.get(); |  23         return m_transformSourceDocument.get(); | 
|  25     } |  24     } | 
|  26  |  25  | 
|  27     void setTransformSourceDocument(Document* document) |  26     void setTransformSourceDocument(Document* document) | 
|  28     { |  27     { | 
|  29         ASSERT(document); |  28         ASSERT(document); | 
|  30         m_transformSourceDocument = document; |  29         m_transformSourceDocument = document; | 
|  31     } |  30     } | 
|  32  |  31  | 
|  33     static DocumentXSLT& from(WillBeHeapSupplementable<Document>&); |  32     static DocumentXSLT& from(HeapSupplementable<Document>&); | 
|  34     static const char* supplementName(); |  33     static const char* supplementName(); | 
|  35  |  34  | 
|  36     // The following static methods don't use any instance of DocumentXSLT. |  35     // The following static methods don't use any instance of DocumentXSLT. | 
|  37     // They are just using DocumentXSLT namespace. |  36     // They are just using DocumentXSLT namespace. | 
|  38     static void applyXSLTransform(Document&, ProcessingInstruction*); |  37     static void applyXSLTransform(Document&, ProcessingInstruction*); | 
|  39     static ProcessingInstruction* findXSLStyleSheet(Document&); |  38     static ProcessingInstruction* findXSLStyleSheet(Document&); | 
|  40     static bool processingInstructionInsertedIntoDocument(Document&, ProcessingI
    nstruction*); |  39     static bool processingInstructionInsertedIntoDocument(Document&, ProcessingI
    nstruction*); | 
|  41     static bool processingInstructionRemovedFromDocument(Document&, ProcessingIn
    struction*); |  40     static bool processingInstructionRemovedFromDocument(Document&, ProcessingIn
    struction*); | 
|  42     static bool sheetLoaded(Document&, ProcessingInstruction*); |  41     static bool sheetLoaded(Document&, ProcessingInstruction*); | 
|  43     static bool hasTransformSourceDocument(Document&); |  42     static bool hasTransformSourceDocument(Document&); | 
|  44  |  43  | 
|  45     DECLARE_VIRTUAL_TRACE(); |  44     DECLARE_VIRTUAL_TRACE(); | 
|  46  |  45  | 
|  47 private: |  46 private: | 
|  48     DocumentXSLT(); |  47     DocumentXSLT(); | 
|  49  |  48  | 
|  50     RefPtrWillBeMember<Document> m_transformSourceDocument; |  49     Member<Document> m_transformSourceDocument; | 
|  51 }; |  50 }; | 
|  52  |  51  | 
|  53 } // namespace blink |  52 } // namespace blink | 
|  54  |  53  | 
|  55 #endif |  54 #endif | 
| OLD | NEW |