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

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: Added a test 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
Index: Source/core/html/HTMLImportStateResolver.h
diff --git a/Source/core/css/CSSFontSelectorClient.h b/Source/core/html/HTMLImportStateResolver.h
similarity index 75%
copy from Source/core/css/CSSFontSelectorClient.h
copy to Source/core/html/HTMLImportStateResolver.h
index 28a6c87742256f5224d530dc9d9110cf48f0a86e..b0141e8316f9be84d51449bc7a5debbea4ef99b1 100644
--- a/Source/core/css/CSSFontSelectorClient.h
+++ b/Source/core/html/HTMLImportStateResolver.h
@@ -28,20 +28,32 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CSSFontSelectorClient_h
-#define CSSFontSelectorClient_h
+#ifndef HTMLImportStateResolver_h
+#define HTMLImportStateResolver_h
-namespace WebCore {
+#include "core/html/HTMLImport.h"
-class CSSFontSelector;
+namespace WebCore {
-class CSSFontSelectorClient {
+class HTMLImportStateResolver {
public:
- virtual ~CSSFontSelectorClient() { }
+ explicit HTMLImportStateResolver(HTMLImport* import)
+ : m_import(import)
+ { }
+
+ HTMLImport::State resolve() const;
- virtual void fontsNeedUpdate(CSSFontSelector*) = 0;
+private:
+ static bool isBlockingFollowers(HTMLImport*);
+
+ bool isBlockedFromCreatingDocument() const;
+ bool isBlockedFromRunningScript() const;
+ bool isActive() const;
+
+ HTMLImport* m_import;
};
-} // namespace WebCore
+}
+
+#endif // HTMLImportStateResolver_h
-#endif // CSSFontSelectorClient_h

Powered by Google App Engine
This is Rietveld 408576698