| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return WebFileSystem::TypeTemporary; | 111 return WebFileSystem::TypeTemporary; |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 WebURL WebDOMFileSystem::rootURL() const | 115 WebURL WebDOMFileSystem::rootURL() const |
| 116 { | 116 { |
| 117 ASSERT(m_private.get()); | 117 ASSERT(m_private.get()); |
| 118 return m_private->rootURL(); | 118 return m_private->rootURL(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 // FIXME: should be removed after fixing chrome side code. | |
| 122 v8::Handle<v8::Value> WebDOMFileSystem::toV8Value() | |
| 123 { | |
| 124 if (!m_private.get()) | |
| 125 return v8::Handle<v8::Value>(); | |
| 126 return toV8Value(v8::Handle<v8::Object>(), toIsolate(m_private->executionCon
text())); | |
| 127 } | |
| 128 | |
| 129 v8::Handle<v8::Value> WebDOMFileSystem::toV8Value(v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 121 v8::Handle<v8::Value> WebDOMFileSystem::toV8Value(v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) |
| 130 { | 122 { |
| 131 if (!m_private.get()) | 123 if (!m_private.get()) |
| 132 return v8::Handle<v8::Value>(); | 124 return v8::Handle<v8::Value>(); |
| 133 return toV8(m_private.get(), creationContext, isolate); | 125 return toV8(m_private.get(), creationContext, isolate); |
| 134 } | 126 } |
| 135 | 127 |
| 136 // FIXME: should be removed after fixing chrome side code. | |
| 137 v8::Handle<v8::Value> WebDOMFileSystem::createV8Entry( | |
| 138 const WebString& path, | |
| 139 EntryType entryType) | |
| 140 { | |
| 141 if (!m_private.get()) | |
| 142 return v8::Handle<v8::Value>(); | |
| 143 return createV8Entry(path, entryType, v8::Handle<v8::Object>(), toIsolate(m_
private->executionContext())); | |
| 144 } | |
| 145 | |
| 146 v8::Handle<v8::Value> WebDOMFileSystem::createV8Entry( | 128 v8::Handle<v8::Value> WebDOMFileSystem::createV8Entry( |
| 147 const WebString& path, | 129 const WebString& path, |
| 148 EntryType entryType, | 130 EntryType entryType, |
| 149 v8::Handle<v8::Object> creationContext, | 131 v8::Handle<v8::Object> creationContext, |
| 150 v8::Isolate* isolate) | 132 v8::Isolate* isolate) |
| 151 { | 133 { |
| 152 if (!m_private.get()) | 134 if (!m_private.get()) |
| 153 return v8::Handle<v8::Value>(); | 135 return v8::Handle<v8::Value>(); |
| 154 if (entryType == EntryTypeDirectory) | 136 if (entryType == EntryTypeDirectory) |
| 155 return toV8(DirectoryEntry::create(m_private.get(), path), creationConte
xt, isolate); | 137 return toV8(DirectoryEntry::create(m_private.get(), path), creationConte
xt, isolate); |
| 156 ASSERT(entryType == EntryTypeFile); | 138 ASSERT(entryType == EntryTypeFile); |
| 157 return toV8(FileEntry::create(m_private.get(), path), creationContext, isola
te); | 139 return toV8(FileEntry::create(m_private.get(), path), creationContext, isola
te); |
| 158 } | 140 } |
| 159 | 141 |
| 160 WebDOMFileSystem::WebDOMFileSystem(const PassRefPtrWillBeRawPtr<DOMFileSystem>&
domFileSystem) | 142 WebDOMFileSystem::WebDOMFileSystem(const PassRefPtrWillBeRawPtr<DOMFileSystem>&
domFileSystem) |
| 161 : m_private(domFileSystem) | 143 : m_private(domFileSystem) |
| 162 { | 144 { |
| 163 } | 145 } |
| 164 | 146 |
| 165 WebDOMFileSystem& WebDOMFileSystem::operator=(const PassRefPtrWillBeRawPtr<WebCo
re::DOMFileSystem>& domFileSystem) | 147 WebDOMFileSystem& WebDOMFileSystem::operator=(const PassRefPtrWillBeRawPtr<WebCo
re::DOMFileSystem>& domFileSystem) |
| 166 { | 148 { |
| 167 m_private = domFileSystem; | 149 m_private = domFileSystem; |
| 168 return *this; | 150 return *this; |
| 169 } | 151 } |
| 170 | 152 |
| 171 } // namespace blink | 153 } // namespace blink |
| OLD | NEW |