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

Unified Diff: Source/core/html/HTMLImportStateResolver.h

Issue 141143006: [import] Cleanup: get rid of ad-hoc state machine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated to ToT Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLImportChild.cpp ('k') | Source/core/html/HTMLImportStateResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImportStateResolver.h
diff --git a/Source/platform/fonts/FontCacheClient.h b/Source/core/html/HTMLImportStateResolver.h
similarity index 75%
copy from Source/platform/fonts/FontCacheClient.h
copy to Source/core/html/HTMLImportStateResolver.h
index 4e43b8c72cf93e9d6f51f68098d434a9d97444ce..b0141e8316f9be84d51449bc7a5debbea4ef99b1 100644
--- a/Source/platform/fonts/FontCacheClient.h
+++ b/Source/core/html/HTMLImportStateResolver.h
@@ -28,21 +28,32 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef FontCacheClient_h
-#define FontCacheClient_h
+#ifndef HTMLImportStateResolver_h
+#define HTMLImportStateResolver_h
-#include "platform/PlatformExport.h"
-#include "wtf/RefCounted.h"
+#include "core/html/HTMLImport.h"
namespace WebCore {
-class PLATFORM_EXPORT FontCacheClient : public RefCounted<FontCacheClient> {
+class HTMLImportStateResolver {
public:
- virtual ~FontCacheClient() { }
+ explicit HTMLImportStateResolver(HTMLImport* import)
+ : m_import(import)
+ { }
- virtual void fontCacheInvalidated() = 0;
+ HTMLImport::State resolve() const;
+
+private:
+ static bool isBlockingFollowers(HTMLImport*);
+
+ bool isBlockedFromCreatingDocument() const;
+ bool isBlockedFromRunningScript() const;
+ bool isActive() const;
+
+ HTMLImport* m_import;
};
-} // namespace WebCore
+}
+
+#endif // HTMLImportStateResolver_h
-#endif // FontCacheClient_h
« no previous file with comments | « Source/core/html/HTMLImportChild.cpp ('k') | Source/core/html/HTMLImportStateResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698