| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 WebDOMFileSystem WebDOMFileSystem::create( | 67 WebDOMFileSystem WebDOMFileSystem::create( |
| 68 WebLocalFrame* frame, | 68 WebLocalFrame* frame, |
| 69 WebFileSystemType type, | 69 WebFileSystemType type, |
| 70 const WebString& name, | 70 const WebString& name, |
| 71 const WebURL& rootURL, | 71 const WebURL& rootURL, |
| 72 SerializableType serializableType) | 72 SerializableType serializableType) |
| 73 { | 73 { |
| 74 ASSERT(frame && toWebLocalFrameImpl(frame)->frame()); | 74 ASSERT(frame && toWebLocalFrameImpl(frame)->frame()); |
| 75 RefPtrWillBeRawPtr<DOMFileSystem> domFileSystem = DOMFileSystem::create(toWe
bLocalFrameImpl(frame)->frame()->document(), name, static_cast<WebCore::FileSyst
emType>(type), rootURL); | 75 DOMFileSystem* domFileSystem = DOMFileSystem::create(toWebLocalFrameImpl(fra
me)->frame()->document(), name, static_cast<WebCore::FileSystemType>(type), root
URL); |
| 76 if (serializableType == SerializableTypeSerializable) | 76 if (serializableType == SerializableTypeSerializable) |
| 77 domFileSystem->makeClonable(); | 77 domFileSystem->makeClonable(); |
| 78 return WebDOMFileSystem(domFileSystem); | 78 return WebDOMFileSystem(domFileSystem); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void WebDOMFileSystem::reset() | 81 void WebDOMFileSystem::reset() |
| 82 { | 82 { |
| 83 m_private.reset(); | 83 m_private.reset(); |
| 84 } | 84 } |
| 85 | 85 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 v8::Isolate* isolate) | 132 v8::Isolate* isolate) |
| 133 { | 133 { |
| 134 if (!m_private.get()) | 134 if (!m_private.get()) |
| 135 return v8::Handle<v8::Value>(); | 135 return v8::Handle<v8::Value>(); |
| 136 if (entryType == EntryTypeDirectory) | 136 if (entryType == EntryTypeDirectory) |
| 137 return toV8(DirectoryEntry::create(m_private.get(), path), creationConte
xt, isolate); | 137 return toV8(DirectoryEntry::create(m_private.get(), path), creationConte
xt, isolate); |
| 138 ASSERT(entryType == EntryTypeFile); | 138 ASSERT(entryType == EntryTypeFile); |
| 139 return toV8(FileEntry::create(m_private.get(), path), creationContext, isola
te); | 139 return toV8(FileEntry::create(m_private.get(), path), creationContext, isola
te); |
| 140 } | 140 } |
| 141 | 141 |
| 142 WebDOMFileSystem::WebDOMFileSystem(const PassRefPtrWillBeRawPtr<DOMFileSystem>&
domFileSystem) | 142 WebDOMFileSystem::WebDOMFileSystem(DOMFileSystem* domFileSystem) |
| 143 : m_private(domFileSystem) | 143 : m_private(domFileSystem) |
| 144 { | 144 { |
| 145 } | 145 } |
| 146 | 146 |
| 147 WebDOMFileSystem& WebDOMFileSystem::operator=(const PassRefPtrWillBeRawPtr<WebCo
re::DOMFileSystem>& domFileSystem) | 147 WebDOMFileSystem& WebDOMFileSystem::operator=(WebCore::DOMFileSystem* domFileSys
tem) |
| 148 { | 148 { |
| 149 m_private = domFileSystem; | 149 m_private = domFileSystem; |
| 150 return *this; | 150 return *this; |
| 151 } | 151 } |
| 152 | 152 |
| 153 } // namespace blink | 153 } // namespace blink |
| OLD | NEW |