OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 24 matching lines...) Expand all Loading... |
35 #include "core/html/LinkResource.h" | 35 #include "core/html/LinkResource.h" |
36 #include "core/loader/cache/CachedRawResource.h" | 36 #include "core/loader/cache/CachedRawResource.h" |
37 #include "core/platform/Supplementable.h" | 37 #include "core/platform/Supplementable.h" |
38 #include "core/platform/Timer.h" | 38 #include "core/platform/Timer.h" |
39 #include "wtf/FastAllocBase.h" | 39 #include "wtf/FastAllocBase.h" |
40 #include "wtf/PassOwnPtr.h" | 40 #include "wtf/PassOwnPtr.h" |
41 #include "wtf/Vector.h" | 41 #include "wtf/Vector.h" |
42 | 42 |
43 namespace WebCore { | 43 namespace WebCore { |
44 | 44 |
| 45 class FetchRequest; |
45 class ScriptExecutionContext; | 46 class ScriptExecutionContext; |
46 class ResourceFetcher; | 47 class ResourceFetcher; |
47 class HTMLImportLoader; | 48 class HTMLImportLoader; |
| 49 class HTMLImportLoaderClient; |
48 | 50 |
49 class HTMLImportsController : public HTMLImportRoot, public Supplement<ScriptExe
cutionContext> { | 51 class HTMLImportsController : public HTMLImportRoot, public Supplement<ScriptExe
cutionContext> { |
50 WTF_MAKE_FAST_ALLOCATED; | 52 WTF_MAKE_FAST_ALLOCATED; |
51 public: | 53 public: |
52 static void provideTo(Document*); | 54 static void provideTo(Document*); |
53 | 55 |
54 explicit HTMLImportsController(Document*); | 56 explicit HTMLImportsController(Document*); |
55 virtual ~HTMLImportsController(); | 57 virtual ~HTMLImportsController(); |
56 | 58 |
57 // HTMLImport | 59 // HTMLImport |
58 virtual HTMLImportRoot* root() OVERRIDE; | 60 virtual HTMLImportRoot* root() OVERRIDE; |
59 virtual HTMLImport* parent() const OVERRIDE; | 61 virtual HTMLImport* parent() const OVERRIDE; |
60 virtual Document* document() const OVERRIDE; | 62 virtual Document* document() const OVERRIDE; |
61 virtual void wasDetachedFromDocument() OVERRIDE; | 63 virtual void wasDetachedFromDocument() OVERRIDE; |
62 virtual void didFinishParsing() OVERRIDE; | 64 virtual void didFinishParsing() OVERRIDE; |
63 virtual bool isProcessing() const OVERRIDE; | 65 virtual bool isProcessing() const OVERRIDE; |
64 // HTMLImportRoot | 66 // HTMLImportRoot |
65 virtual void importWasDisposed() OVERRIDE; | 67 virtual void importWasDisposed() OVERRIDE; |
66 virtual HTMLImportsController* toController() { return this; } | 68 virtual HTMLImportsController* toController() { return this; } |
67 | 69 |
68 PassRefPtr<HTMLImportLoader> createLoader(HTMLImport* parent, const KURL&, c
onst ResourcePtr<CachedRawResource>&); | 70 PassRefPtr<HTMLImportLoader> createLoader(HTMLImport* parent, FetchRequest); |
69 void showSecurityErrorMessage(const String&); | 71 void showSecurityErrorMessage(const String&); |
70 PassRefPtr<HTMLImportLoader> findLinkFor(const KURL&) const; | 72 PassRefPtr<HTMLImportLoader> findLinkFor(const KURL&) const; |
71 SecurityOrigin* securityOrigin() const; | 73 SecurityOrigin* securityOrigin() const; |
72 ResourceFetcher* fetcher() const; | 74 ResourceFetcher* fetcher() const; |
73 | 75 |
74 void scheduleUnblock(); | 76 void scheduleUnblock(); |
75 void unblockTimerFired(Timer<HTMLImportsController>*); | 77 void unblockTimerFired(Timer<HTMLImportsController>*); |
76 | 78 |
77 private: | 79 private: |
78 void clear(); | 80 void clear(); |
79 | 81 |
80 Document* m_master; | 82 Document* m_master; |
81 Timer<HTMLImportsController> m_unblockTimer; | 83 Timer<HTMLImportsController> m_unblockTimer; |
82 | 84 |
83 // List of import which has been loaded or being loaded. | 85 // List of import which has been loaded or being loaded. |
84 typedef Vector<RefPtr<HTMLImportLoader> > ImportList; | 86 typedef Vector<RefPtr<HTMLImportLoader> > ImportList; |
85 ImportList m_imports; | 87 ImportList m_imports; |
86 }; | 88 }; |
87 | 89 |
88 } // namespace WebCore | 90 } // namespace WebCore |
89 | 91 |
90 #endif // HTMLImportsController_h | 92 #endif // HTMLImportsController_h |
OLD | NEW |