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

Side by Side Diff: Source/core/html/imports/HTMLImportsController.h

Issue 303643005: Straighten up HTML Imports load vs. share loader logic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 void recalcTimerFired(Timer<HTMLImportsController>*); 79 void recalcTimerFired(Timer<HTMLImportsController>*);
80 80
81 HTMLImportLoader* createLoader(); 81 HTMLImportLoader* createLoader();
82 82
83 size_t loaderCount() const { return m_loaders.size(); } 83 size_t loaderCount() const { return m_loaders.size(); }
84 HTMLImportLoader* loaderAt(size_t i) const { return m_loaders[i].get(); } 84 HTMLImportLoader* loaderAt(size_t i) const { return m_loaders[i].get(); }
85 HTMLImportLoader* loaderFor(const Document&) const; 85 HTMLImportLoader* loaderFor(const Document&) const;
86 86
87 void scheduleRecalcState(); 87 void scheduleRecalcState();
88 HTMLImportChild* findLinkFor(const KURL&, HTMLImport* excluding = 0) const; 88 HTMLImportChild* findLinkFor(const KURL&) const;
89 89
90 private: 90 private:
91 HTMLImportChild* createChild(const KURL&, HTMLImport* parent, HTMLImportChil dClient*); 91 HTMLImportChild* createChild(const KURL&, HTMLImportLoader*, HTMLImport* par ent, HTMLImportChildClient*);
92 void clear(); 92 void clear();
93 93
94 Document* m_master; 94 Document* m_master;
95 Timer<HTMLImportsController> m_recalcTimer; 95 Timer<HTMLImportsController> m_recalcTimer;
96 96
97 // List of import which has been loaded or being loaded. 97 // List of import which has been loaded or being loaded.
98 typedef Vector<OwnPtr<HTMLImportChild> > ImportList; 98 typedef Vector<OwnPtr<HTMLImportChild> > ImportList;
99 ImportList m_imports; 99 ImportList m_imports;
100 100
101 typedef Vector<RefPtr<HTMLImportLoader> > LoaderList; 101 typedef Vector<RefPtr<HTMLImportLoader> > LoaderList;
102 LoaderList m_loaders; 102 LoaderList m_loaders;
103 }; 103 };
104 104
105 DEFINE_TYPE_CASTS(HTMLImportsController, HTMLImport, import, import->isRoot(), i mport.isRoot()); 105 DEFINE_TYPE_CASTS(HTMLImportsController, HTMLImport, import, import->isRoot(), i mport.isRoot());
106 106
107 } // namespace WebCore 107 } // namespace WebCore
108 108
109 #endif // HTMLImportsController_h 109 #endif // HTMLImportsController_h
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.cpp ('k') | Source/core/html/imports/HTMLImportsController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698