Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: Source/web/WebDOMFileSystem.cpp

Issue 188503002: Oilpan: add transition types to FileSystem APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 58
59 WebDOMFileSystem WebDOMFileSystem::create( 59 WebDOMFileSystem WebDOMFileSystem::create(
60 WebFrame* frame, 60 WebFrame* frame,
61 WebFileSystemType type, 61 WebFileSystemType type,
62 const WebString& name, 62 const WebString& name,
63 const WebURL& rootURL, 63 const WebURL& rootURL,
64 SerializableType serializableType) 64 SerializableType serializableType)
65 { 65 {
66 ASSERT(frame && toWebFrameImpl(frame)->frame()); 66 ASSERT(frame && toWebFrameImpl(frame)->frame());
67 RefPtr<DOMFileSystem> domFileSystem = DOMFileSystem::create(toWebFrameImpl(f rame)->frame()->document(), name, static_cast<WebCore::FileSystemType>(type), ro otURL); 67 RefPtrWillBeRawPtr<DOMFileSystem> domFileSystem = DOMFileSystem::create(toWe bFrameImpl(frame)->frame()->document(), name, static_cast<WebCore::FileSystemTyp e>(type), rootURL);
68 if (serializableType == SerializableTypeSerializable) 68 if (serializableType == SerializableTypeSerializable)
69 domFileSystem->makeClonable(); 69 domFileSystem->makeClonable();
70 return WebDOMFileSystem(domFileSystem); 70 return WebDOMFileSystem(domFileSystem);
71 } 71 }
72 72
73 void WebDOMFileSystem::reset() 73 void WebDOMFileSystem::reset()
74 { 74 {
75 m_private.reset(); 75 m_private.reset();
76 } 76 }
77 77
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 EntryType entryType) 122 EntryType entryType)
123 { 123 {
124 if (!m_private.get()) 124 if (!m_private.get())
125 return v8::Handle<v8::Value>(); 125 return v8::Handle<v8::Value>();
126 if (entryType == EntryTypeDirectory) 126 if (entryType == EntryTypeDirectory)
127 return toV8(DirectoryEntry::create(m_private.get(), path), v8::Handle<v8 ::Object>(), toIsolate(m_private->executionContext())); 127 return toV8(DirectoryEntry::create(m_private.get(), path), v8::Handle<v8 ::Object>(), toIsolate(m_private->executionContext()));
128 ASSERT(entryType == EntryTypeFile); 128 ASSERT(entryType == EntryTypeFile);
129 return toV8(FileEntry::create(m_private.get(), path), v8::Handle<v8::Object> (), toIsolate(m_private->executionContext())); 129 return toV8(FileEntry::create(m_private.get(), path), v8::Handle<v8::Object> (), toIsolate(m_private->executionContext()));
130 } 130 }
131 131
132 WebDOMFileSystem::WebDOMFileSystem(const WTF::PassRefPtr<DOMFileSystem>& domFile System) 132 WebDOMFileSystem::WebDOMFileSystem(const PassRefPtrWillBeRawPtr<DOMFileSystem>& domFileSystem)
133 : m_private(domFileSystem) 133 : m_private(domFileSystem)
134 { 134 {
135 } 135 }
136 136
137 WebDOMFileSystem& WebDOMFileSystem::operator=(const WTF::PassRefPtr<WebCore::DOM FileSystem>& domFileSystem) 137 WebDOMFileSystem& WebDOMFileSystem::operator=(const PassRefPtrWillBeRawPtr<WebCo re::DOMFileSystem>& domFileSystem)
138 { 138 {
139 m_private = domFileSystem; 139 m_private = domFileSystem;
140 return *this; 140 return *this;
141 } 141 }
142 142
143 WebDOMFileSystem::operator WTF::PassRefPtr<WebCore::DOMFileSystem>() const
144 {
145 return m_private.get();
146 }
147
148 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/filesystem/WorkerGlobalScopeFileSystem.cpp ('k') | public/web/WebDOMFileSystem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698