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

Side by Side Diff: Source/modules/filesystem/DOMFileSystem.cpp

Issue 15127005: Make filesystem objects ScriptWrappable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Really fix revert of DOMWindowFileSystem. Created 7 years, 7 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 rootURL.append(filesystemId); 81 rootURL.append(filesystemId);
82 rootURL.append("/"); 82 rootURL.append("/");
83 83
84 return DOMFileSystem::create(context, filesystemName.toString(), FileSystemT ypeIsolated, KURL(ParsedURLString, rootURL.toString()), AsyncFileSystem::create( )); 84 return DOMFileSystem::create(context, filesystemName.toString(), FileSystemT ypeIsolated, KURL(ParsedURLString, rootURL.toString()), AsyncFileSystem::create( ));
85 } 85 }
86 86
87 DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name , FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFil eSystem) 87 DOMFileSystem::DOMFileSystem(ScriptExecutionContext* context, const String& name , FileSystemType type, const KURL& rootURL, PassOwnPtr<AsyncFileSystem> asyncFil eSystem)
88 : DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem) 88 : DOMFileSystemBase(context, name, type, rootURL, asyncFileSystem)
89 , ActiveDOMObject(context) 89 , ActiveDOMObject(context)
90 { 90 {
91 ScriptWrappable::init(this);
91 } 92 }
92 93
93 PassRefPtr<DirectoryEntry> DOMFileSystem::root() 94 PassRefPtr<DirectoryEntry> DOMFileSystem::root()
94 { 95 {
95 return DirectoryEntry::create(this, DOMFilePath::root); 96 return DirectoryEntry::create(this, DOMFilePath::root);
96 } 97 }
97 98
98 void DOMFileSystem::stop() 99 void DOMFileSystem::stop()
99 { 100 {
100 m_asyncFileSystem->stop(); 101 m_asyncFileSystem->stop();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 } // namespace 201 } // namespace
201 202
202 void DOMFileSystem::createFile(const FileEntry* fileEntry, PassRefPtr<FileCallba ck> successCallback, PassRefPtr<ErrorCallback> errorCallback) 203 void DOMFileSystem::createFile(const FileEntry* fileEntry, PassRefPtr<FileCallba ck> successCallback, PassRefPtr<ErrorCallback> errorCallback)
203 { 204 {
204 KURL fileSystemURL = createFileSystemURL(fileEntry); 205 KURL fileSystemURL = createFileSystemURL(fileEntry);
205 m_asyncFileSystem->createSnapshotFileAndReadMetadata(fileSystemURL, Snapshot FileCallback::create(this, fileEntry->name(), fileSystemURL, successCallback, er rorCallback)); 206 m_asyncFileSystem->createSnapshotFileAndReadMetadata(fileSystemURL, Snapshot FileCallback::create(this, fileEntry->name(), fileSystemURL, successCallback, er rorCallback));
206 } 207 }
207 208
208 } // namespace WebCore 209 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/DOMFileSystem.h ('k') | Source/modules/filesystem/DOMFileSystemSync.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698