| 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 } | 111 } |
| 112 | 112 |
| 113 v8::Local<v8::Value> WebDOMFileSystem::toV8Value( | 113 v8::Local<v8::Value> WebDOMFileSystem::toV8Value( |
| 114 v8::Local<v8::Object> creationContext, | 114 v8::Local<v8::Object> creationContext, |
| 115 v8::Isolate* isolate) { | 115 v8::Isolate* isolate) { |
| 116 // We no longer use |creationContext| because it's often misused and points | 116 // We no longer use |creationContext| because it's often misused and points |
| 117 // to a context faked by user script. | 117 // to a context faked by user script. |
| 118 DCHECK(creationContext->CreationContext() == isolate->GetCurrentContext()); | 118 DCHECK(creationContext->CreationContext() == isolate->GetCurrentContext()); |
| 119 if (!m_private.get()) | 119 if (!m_private.get()) |
| 120 return v8::Local<v8::Value>(); | 120 return v8::Local<v8::Value>(); |
| 121 return toV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); | 121 return ToV8(m_private.get(), isolate->GetCurrentContext()->Global(), isolate); |
| 122 } | 122 } |
| 123 | 123 |
| 124 v8::Local<v8::Value> WebDOMFileSystem::createV8Entry( | 124 v8::Local<v8::Value> WebDOMFileSystem::createV8Entry( |
| 125 const WebString& path, | 125 const WebString& path, |
| 126 EntryType entryType, | 126 EntryType entryType, |
| 127 v8::Local<v8::Object> creationContext, | 127 v8::Local<v8::Object> creationContext, |
| 128 v8::Isolate* isolate) { | 128 v8::Isolate* isolate) { |
| 129 // We no longer use |creationContext| because it's often misused and points | 129 // We no longer use |creationContext| because it's often misused and points |
| 130 // to a context faked by user script. | 130 // to a context faked by user script. |
| 131 DCHECK(creationContext->CreationContext() == isolate->GetCurrentContext()); | 131 DCHECK(creationContext->CreationContext() == isolate->GetCurrentContext()); |
| 132 if (!m_private.get()) | 132 if (!m_private.get()) |
| 133 return v8::Local<v8::Value>(); | 133 return v8::Local<v8::Value>(); |
| 134 if (entryType == EntryTypeDirectory) | 134 if (entryType == EntryTypeDirectory) |
| 135 return toV8(DirectoryEntry::create(m_private.get(), path), | 135 return ToV8(DirectoryEntry::create(m_private.get(), path), |
| 136 isolate->GetCurrentContext()->Global(), isolate); | 136 isolate->GetCurrentContext()->Global(), isolate); |
| 137 DCHECK_EQ(entryType, EntryTypeFile); | 137 DCHECK_EQ(entryType, EntryTypeFile); |
| 138 return toV8(FileEntry::create(m_private.get(), path), | 138 return ToV8(FileEntry::create(m_private.get(), path), |
| 139 isolate->GetCurrentContext()->Global(), isolate); | 139 isolate->GetCurrentContext()->Global(), isolate); |
| 140 } | 140 } |
| 141 | 141 |
| 142 WebDOMFileSystem::WebDOMFileSystem(DOMFileSystem* domFileSystem) | 142 WebDOMFileSystem::WebDOMFileSystem(DOMFileSystem* domFileSystem) |
| 143 : m_private(domFileSystem) {} | 143 : m_private(domFileSystem) {} |
| 144 | 144 |
| 145 WebDOMFileSystem& WebDOMFileSystem::operator=(DOMFileSystem* domFileSystem) { | 145 WebDOMFileSystem& WebDOMFileSystem::operator=(DOMFileSystem* domFileSystem) { |
| 146 m_private = domFileSystem; | 146 m_private = domFileSystem; |
| 147 return *this; | 147 return *this; |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace blink | 150 } // namespace blink |
| OLD | NEW |