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

Unified Diff: Source/modules/filesystem/LocalFileSystem.cpp

Issue 324483002: Move LocalFileSystem to hang off LocalFrame instead of Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/filesystem/LocalFileSystem.cpp
diff --git a/Source/modules/filesystem/LocalFileSystem.cpp b/Source/modules/filesystem/LocalFileSystem.cpp
index deb05efb48881dafef35e7dc20ba3b5979ba5589..096510d2cd9b412c6a1e6fc5ab2ebedaf766be28 100644
--- a/Source/modules/filesystem/LocalFileSystem.cpp
+++ b/Source/modules/filesystem/LocalFileSystem.cpp
@@ -36,10 +36,9 @@
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
#include "core/fileapi/FileError.h"
-#include "core/inspector/InspectorController.h"
+#include "core/frame/LocalFrame.h"
#include "core/workers/WorkerGlobalScope.h"
#include "modules/filesystem/FileSystemClient.h"
-#include "modules/filesystem/InspectorFileSystemAgent.h"
#include "platform/AsyncFileSystemCallbacks.h"
#include "platform/PermissionCallbacks.h"
#include "public/platform/Platform.h"
@@ -74,9 +73,9 @@ private:
OwnPtr<AsyncFileSystemCallbacks> m_callbacks;
};
-PassOwnPtrWillBeRawPtr<LocalFileSystem> LocalFileSystem::create(PassOwnPtr<FileSystemClient> client)
+PassOwnPtr<LocalFileSystem> LocalFileSystem::create(PassOwnPtr<FileSystemClient> client)
{
- return adoptPtrWillBeNoop(new LocalFileSystem(client));
+ return adoptPtr(new LocalFileSystem(client));
}
LocalFileSystem::~LocalFileSystem()
@@ -174,16 +173,15 @@ const char* LocalFileSystem::supplementName()
LocalFileSystem* LocalFileSystem::from(ExecutionContext& context)
{
if (context.isDocument()) {
- return static_cast<LocalFileSystem*>(WillBeHeapSupplement<Page>::from(toDocument(context).page(), supplementName()));
+ return static_cast<LocalFileSystem*>(Supplement<LocalFrame>::from(toDocument(context).frame(), supplementName()));
}
ASSERT(context.isWorkerGlobalScope());
- return static_cast<LocalFileSystem*>(WillBeHeapSupplement<WorkerClients>::from(toWorkerGlobalScope(context).clients(), supplementName()));
+ return static_cast<LocalFileSystem*>(Supplement<WorkerClients>::from(toWorkerGlobalScope(context).clients(), supplementName()));
}
-void provideLocalFileSystemTo(Page& page, PassOwnPtr<FileSystemClient> client)
+void provideLocalFileSystemTo(LocalFrame& frame, PassOwnPtr<FileSystemClient> client)
{
- page.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::create(client));
- page.inspectorController().registerModuleAgent(InspectorFileSystemAgent::create(&page));
+ frame.provideSupplement(LocalFileSystem::supplementName(), LocalFileSystem::create(client));
}
void provideLocalFileSystemToWorker(WorkerClients* clients, PassOwnPtr<FileSystemClient> client)

Powered by Google App Engine
This is Rietveld 408576698