| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 v8::Isolate* isolate) | 150 v8::Isolate* isolate) |
| 151 { | 151 { |
| 152 if (!m_private.get()) | 152 if (!m_private.get()) |
| 153 return v8::Handle<v8::Value>(); | 153 return v8::Handle<v8::Value>(); |
| 154 if (entryType == EntryTypeDirectory) | 154 if (entryType == EntryTypeDirectory) |
| 155 return toV8(DirectoryEntry::create(m_private.get(), path), creationConte
xt, isolate); | 155 return toV8(DirectoryEntry::create(m_private.get(), path), creationConte
xt, isolate); |
| 156 ASSERT(entryType == EntryTypeFile); | 156 ASSERT(entryType == EntryTypeFile); |
| 157 return toV8(FileEntry::create(m_private.get(), path), creationContext, isola
te); | 157 return toV8(FileEntry::create(m_private.get(), path), creationContext, isola
te); |
| 158 } | 158 } |
| 159 | 159 |
| 160 WebDOMFileSystem::WebDOMFileSystem(const PassRefPtrWillBeRawPtr<DOMFileSystem>&
domFileSystem) | 160 WebDOMFileSystem::WebDOMFileSystem(DOMFileSystem* domFileSystem) |
| 161 : m_private(domFileSystem) | 161 : m_private(domFileSystem) |
| 162 { | 162 { |
| 163 } | 163 } |
| 164 | 164 |
| 165 WebDOMFileSystem& WebDOMFileSystem::operator=(const PassRefPtrWillBeRawPtr<WebCo
re::DOMFileSystem>& domFileSystem) | 165 WebDOMFileSystem& WebDOMFileSystem::operator=(const WebCore::DOMFileSystem*& dom
FileSystem) |
| 166 { | 166 { |
| 167 m_private = domFileSystem; | 167 // FIXME: Oilpan: WebPrivatePtr<> should be able to handle 'const' pointer a
ssignments. |
| 168 m_private = const_cast<WebCore::DOMFileSystem*>(domFileSystem); |
| 168 return *this; | 169 return *this; |
| 169 } | 170 } |
| 170 | 171 |
| 171 } // namespace blink | 172 } // namespace blink |
| OLD | NEW |