2010-11-09 Eric Uhrhane <ericu@chromium.org>

        Reviewed by David Levin.

        Add idl and mock classes for FileWriterSync.
        https://bugs.webkit.org/show_bug.cgi?id=48693

        No new tests, as there's no functionality.

        Build file additions.
        * CMakeLists.txt:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/scripts/CodeGeneratorV8.pm:

        * fileapi/FileWriterSync.cpp: Added.
        * fileapi/FileWriterSync.h: Added.
        * fileapi/FileWriterSync.idl: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a9e5de5f
......@@ -1680,6 +1680,7 @@ if (ENABLE_FILE_SYSTEM)
fileapi/FileEntrySync.cpp
fileapi/FileSystemCallbacks.cpp
fileapi/FileWriter.cpp
fileapi/FileWriterSync.cpp
fileapi/LocalFileSystem.cpp
platform/AsyncFileSystem.cpp
)
......@@ -1703,6 +1704,7 @@ if (ENABLE_FILE_SYSTEM)
fileapi/FileSystemCallback.idl
fileapi/FileWriterCallback.idl
fileapi/FileWriter.idl
fileapi/FileWriterSync.idl
fileapi/Flags.idl
fileapi/Metadata.idl
fileapi/MetadataCallback.idl
......
2010-11-09 Eric Uhrhane <ericu@chromium.org>
Reviewed by David Levin.
Add idl and mock classes for FileWriterSync.
https://bugs.webkit.org/show_bug.cgi?id=48693
No new tests, as there's no functionality.
Build file additions.
* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorV8.pm:
* fileapi/FileWriterSync.cpp: Added.
* fileapi/FileWriterSync.h: Added.
* fileapi/FileWriterSync.idl: Added.
2010-11-09 Mario Sanchez Prada <msanchez@igalia.com>
Reviewed by Chris Fleizach.
......@@ -123,6 +123,7 @@
#include "JSFileSystemCallback.cpp"
#include "JSFileWriter.cpp"
#include "JSFileWriterCallback.cpp"
#include "JSFileWriterSync.cpp"
#include "JSFlags.cpp"
#include "JSGeolocation.cpp"
#include "JSGeoposition.cpp"
......
......@@ -168,6 +168,7 @@ DOM_CLASSES = \
FileReaderSync \
FileWriter \
FileWriterCallback \
FileWriterSync \
FileSystemCallback \
Flags \
Geolocation \
......
......@@ -1444,6 +1444,8 @@ webcore_sources += \
WebCore/fileapi/FileWriterCallback.h \
WebCore/fileapi/FileWriter.cpp \
WebCore/fileapi/FileWriter.h \
WebCore/fileapi/FileWriterSync.cpp \
WebCore/fileapi/FileWriterSync.h \
WebCore/fileapi/Flags.h \
WebCore/fileapi/LocalFileSystem.cpp \
WebCore/fileapi/LocalFileSystem.h \
......@@ -3957,6 +3959,8 @@ webcore_built_sources += \
DerivedSources/WebCore/JSFileWriter.h \
DerivedSources/WebCore/JSFileWriterCallback.cpp \
DerivedSources/WebCore/JSFileWriterCallback.h \
DerivedSources/WebCore/JSFileWriterSync.cpp \
DerivedSources/WebCore/JSFileWriterSync.h \
DerivedSources/WebCore/JSFlags.cpp \
DerivedSources/WebCore/JSFlags.h \
DerivedSources/WebCore/JSMetadata.cpp \
......
......@@ -113,6 +113,7 @@
'fileapi/FileSystemCallback.idl',
'fileapi/FileWriter.idl',
'fileapi/FileWriterCallback.idl',
'fileapi/FileWriterSync.idl',
'fileapi/Flags.idl',
'fileapi/Metadata.idl',
'fileapi/MetadataCallback.idl',
......@@ -1527,6 +1528,8 @@
'fileapi/FileWriter.cpp',
'fileapi/FileWriter.h',
'fileapi/FileWriterCallback.h',
'fileapi/FileWriterSync.cpp',
'fileapi/FileWriterSync.h',
'fileapi/Flags.h',
'fileapi/LocalFileSystem.h',
'fileapi/Metadata.h',
......
......@@ -3054,6 +3054,7 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
fileapi/FileWriter.h \
fileapi/FileWriterCallback.h \
fileapi/FileWriterClient.h \
fileapi/FileWriterSync.h \
fileapi/Flags.h \
fileapi/LocalFileSystem.h \
fileapi/Metadata.h \
......@@ -3083,6 +3084,7 @@ contains(DEFINES, ENABLE_FILE_SYSTEM=1) {
fileapi/FileEntrySync.cpp \
fileapi/FileSystemCallbacks.cpp \
fileapi/FileWriter.cpp \
fileapi/FileWriterSync.cpp \
fileapi/LocalFileSystem.cpp \
platform/AsyncFileSystem.cpp
}
......
......@@ -5315,6 +5315,62 @@
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileWriterCallback.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileWriterSync.cpp"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Internal|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFileWriterSync.h"
>
</File>
<File
RelativePath="$(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources\JSFlags.cpp"
>
......@@ -49035,6 +49091,14 @@
RelativePath="..\fileapi\FileWriterCallback.h"
>
</File>
<File
RelativePath="..\fileapi\FileWriterSync.cpp"
>
</File>
<File
RelativePath="..\fileapi\FileWriterSync.h"
>
</File>
<File
RelativePath="..\fileapi\Flags.h"
>
......@@ -962,6 +962,8 @@
4614A1FE0B23A8D600446E1C /* copyCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 4614A1FD0B23A8D600446E1C /* copyCursor.png */; };
464EA2730B8A350B00A8E6E3 /* crossHairCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */; };
464EA2740B8A350B00A8E6E3 /* notAllowedCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */; };
46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */; };
46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */ = {isa = PBXBuildFile; fileRef = 46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */; };
4689F1AF1267BAE100E8D380 /* FileMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 4689F1AE1267BAE100E8D380 /* FileMetadata.h */; };
46BD16E30B279473001F0839 /* noneCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46BD16E20B279473001F0839 /* noneCursor.png */; };
46D4F2490AF97E810035385A /* cellCursor.png in Resources */ = {isa = PBXBuildFile; fileRef = 46D4F2460AF97E810035385A /* cellCursor.png */; };
......@@ -7055,6 +7057,8 @@
4614A1FD0B23A8D600446E1C /* copyCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = copyCursor.png; sourceTree = "<group>"; };
464EA2710B8A350B00A8E6E3 /* crossHairCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = crossHairCursor.png; sourceTree = "<group>"; };
464EA2720B8A350B00A8E6E3 /* notAllowedCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = notAllowedCursor.png; sourceTree = "<group>"; };
46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileWriterSync.cpp; path = fileapi/FileWriterSync.cpp; sourceTree = "<group>"; };
46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileWriterSync.h; path = fileapi/FileWriterSync.h; sourceTree = "<group>"; };
4689F1AE1267BAE100E8D380 /* FileMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileMetadata.h; path = platform/FileMetadata.h; sourceTree = "<group>"; };
46BD16E20B279473001F0839 /* noneCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = noneCursor.png; sourceTree = "<group>"; };
46D4F2460AF97E810035385A /* cellCursor.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cellCursor.png; sourceTree = "<group>"; };
......@@ -15118,6 +15122,8 @@
976D6C71122B8A3D001FD1F7 /* FileWriter.cpp */,
976D6C72122B8A3D001FD1F7 /* FileWriter.h */,
893C47A61238908B002B3D86 /* FileWriterCallback.h */,
46700ECE127B96CB00F5D5D6 /* FileWriterSync.cpp */,
46700ECF127B96CB00F5D5D6 /* FileWriterSync.h */,
8987854D122CA064003AABDA /* Flags.h */,
8987854E122CA064003AABDA /* LocalFileSystem.cpp */,
8987854F122CA064003AABDA /* LocalFileSystem.h */,
......@@ -21338,6 +21344,7 @@
93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -23907,6 +23914,7 @@
93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */,
D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -2687,6 +2687,7 @@ sub IsActiveDomType
return 1 if $type eq "IDBRequest";
return 1 if $type eq "FileReader";
return 1 if $type eq "FileWriter";
return 1 if $type eq "FileWriterSync";
return 0;
}
......
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#if ENABLE(FILE_SYSTEM)
#include "FileWriterSync.h"
namespace WebCore {
void FileWriterSync::write(Blob*, ExceptionCode&)
{
ASSERT_NOT_REACHED(); // FIXME: Not implemented yet.
}
void FileWriterSync::seek(long long, ExceptionCode&)
{
ASSERT_NOT_REACHED(); // FIXME: Not implemented yet.
}
void FileWriterSync::truncate(long long, ExceptionCode&)
{
ASSERT_NOT_REACHED(); // FIXME: Not implemented yet.
}
bool FileWriterSync::canSuspend() const
{
// FIXME: It is not currently possible to suspend a FileWriterSync, so pages with FileWriter can not go into page cache.
return false;
}
bool FileWriterSync::hasPendingActivity() const
{
return ActiveDOMObject::hasPendingActivity();
}
void FileWriterSync::stop()
{
}
FileWriterSync::FileWriterSync(ScriptExecutionContext* context)
: ActiveDOMObject(context, this)
, m_position(0)
, m_length(0)
{
}
FileWriterSync::~FileWriterSync()
{
}
} // namespace WebCore
#endif // ENABLE(FILE_SYSTEM)
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FileWriterSync_h
#define FileWriterSync_h
#if ENABLE(FILE_SYSTEM)
#include "ActiveDOMObject.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class Blob;
typedef int ExceptionCode;
// FIXME: This is an empty shell waiting for implementation.
class FileWriterSync : public RefCounted<FileWriterSync>, public ActiveDOMObject {
public:
static PassRefPtr<FileWriterSync> create(ScriptExecutionContext* context)
{
return adoptRef(new FileWriterSync(context));
}
void write(Blob* data, ExceptionCode&);
void seek(long long position, ExceptionCode&);
void truncate(long long length, ExceptionCode&);
long long position() const { return m_position; }
long long length() const { return m_length; }
// ActiveDOMObject
virtual bool canSuspend() const;
virtual bool hasPendingActivity() const;
virtual void stop();
using RefCounted<FileWriterSync>::ref;
using RefCounted<FileWriterSync>::deref;
private:
FileWriterSync(ScriptExecutionContext*);
virtual ~FileWriterSync();
friend class RefCounted<FileWriterSync>;
long long m_position;
long long m_length;
};
} // namespace WebCore
#endif // ENABLE(FILE_SYSTEM)
#endif // FileWriter_h
/*
* Copyright (C) 2010 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module html {
interface [
Conditional=FILE_SYSTEM,
CallWith=ScriptExecutionContext
] FileWriterSync {
// synchronous write/modify methods
void write(in Blob data) raises (FileException);
void seek(in long long position) raises (FileException);
void truncate(in long long size) raises (FileException);
readonly attribute long long position;
readonly attribute long long length;
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment