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

Unified Diff: sky/engine/core/html/imports/HTMLImportLoader.h

Issue 678683004: HTMLImportLoader should talk directly to mojo::NetworkService (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: address reviewer comments Created 6 years, 2 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 | « no previous file | sky/engine/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/imports/HTMLImportLoader.h
diff --git a/sky/engine/core/html/imports/HTMLImportLoader.h b/sky/engine/core/html/imports/HTMLImportLoader.h
index da743baae77f12fa7bd42d370851ba62d9a1c27b..44dbec5f9315d56d83d3fd3edb9e477cca0934dd 100644
--- a/sky/engine/core/html/imports/HTMLImportLoader.h
+++ b/sky/engine/core/html/imports/HTMLImportLoader.h
@@ -31,8 +31,8 @@
#ifndef HTMLImportLoader_h
#define HTMLImportLoader_h
-#include "core/fetch/RawResource.h"
-#include "core/fetch/ResourceOwner.h"
+#include "platform/fetcher/DataPipeDrainer.h"
+#include "platform/fetcher/MojoFetcher.h"
#include "platform/heap/Handle.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassOwnPtr.h"
@@ -53,7 +53,9 @@ class HTMLImportsController;
// HTMLImportLoader is owned by HTMLImportsController.
//
//
-class HTMLImportLoader FINAL : public NoBaseWillBeGarbageCollectedFinalized<HTMLImportLoader>, public ResourceOwner<RawResource> {
+class HTMLImportLoader FINAL : public NoBaseWillBeGarbageCollectedFinalized<HTMLImportLoader>,
+ public MojoFetcher::Client,
+ public DataPipeDrainer::Client {
public:
enum State {
StateLoading,
@@ -86,7 +88,7 @@ public:
#if !ENABLE(OILPAN)
void importDestroyed();
#endif
- void startLoading(const ResourcePtr<RawResource>&);
+ void startLoading(const KURL&);
// Tells the loader that the parser is done with this import.
// Called by Document::finishedParsing, after DOMContentLoaded was dispatched.
@@ -103,12 +105,14 @@ public:
private:
HTMLImportLoader(HTMLImportsController*);
- // RawResourceClient
- virtual void responseReceived(Resource*, const ResourceResponse&) OVERRIDE;
- virtual void dataReceived(Resource*, const char* data, int length) OVERRIDE;
- virtual void notifyFinished(Resource*) OVERRIDE;
+ // MojoFetcher::Client
+ void OnReceivedResponse(mojo::URLResponsePtr) override;
- State startWritingAndParsing(const ResourceResponse&);
+ // DataPipeDrainer::Client
+ void OnDataAvailable(const void* data, size_t num_bytes) override;
+ void OnDataComplete() override;
+
+ State startWritingAndParsing(mojo::URLResponsePtr);
State finishWriting();
State finishParsing();
State finishLoading();
@@ -125,6 +129,9 @@ private:
RefPtrWillBeMember<Document> m_document;
RefPtrWillBeMember<DocumentWriter> m_writer;
RefPtrWillBeMember<CustomElementSyncMicrotaskQueue> m_microtaskQueue;
+
+ OwnPtr<MojoFetcher> m_fetcher;
+ OwnPtr<DataPipeDrainer> m_drainer;
};
} // namespace blink
« no previous file with comments | « no previous file | sky/engine/core/html/imports/HTMLImportLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698