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 24 matching lines...) Expand all Loading... |
35 #include "platform/FileMetadata.h" | 35 #include "platform/FileMetadata.h" |
36 #include "public/platform/WebFileInfo.h" | 36 #include "public/platform/WebFileInfo.h" |
37 #include "public/platform/WebFileSystem.h" | 37 #include "public/platform/WebFileSystem.h" |
38 #include "public/platform/WebFileSystemEntry.h" | 38 #include "public/platform/WebFileSystemEntry.h" |
39 #include "public/platform/WebFileWriter.h" | 39 #include "public/platform/WebFileWriter.h" |
40 #include "public/platform/WebString.h" | 40 #include "public/platform/WebString.h" |
41 #include "wtf/PassOwnPtr.h" | 41 #include "wtf/PassOwnPtr.h" |
42 #include "wtf/PassRefPtr.h" | 42 #include "wtf/PassRefPtr.h" |
43 #include "wtf/RefCounted.h" | 43 #include "wtf/RefCounted.h" |
44 | 44 |
45 using namespace WebCore; | 45 using namespace blink; |
46 | 46 |
47 namespace blink { | 47 namespace blink { |
48 | 48 |
49 class WebFileSystemCallbacksPrivate : public RefCounted<WebFileSystemCallbacksPr
ivate> { | 49 class WebFileSystemCallbacksPrivate : public RefCounted<WebFileSystemCallbacksPr
ivate> { |
50 public: | 50 public: |
51 static PassRefPtr<WebFileSystemCallbacksPrivate> create(const PassOwnPtr<Asy
ncFileSystemCallbacks>& callbacks) | 51 static PassRefPtr<WebFileSystemCallbacksPrivate> create(const PassOwnPtr<Asy
ncFileSystemCallbacks>& callbacks) |
52 { | 52 { |
53 return adoptRef(new WebFileSystemCallbacksPrivate(callbacks)); | 53 return adoptRef(new WebFileSystemCallbacksPrivate(callbacks)); |
54 } | 54 } |
55 | 55 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void WebFileSystemCallbacks::didOpenFileSystem(const WebString& name, const WebU
RL& rootURL) | 124 void WebFileSystemCallbacks::didOpenFileSystem(const WebString& name, const WebU
RL& rootURL) |
125 { | 125 { |
126 ASSERT(!m_private.isNull()); | 126 ASSERT(!m_private.isNull()); |
127 m_private->callbacks()->didOpenFileSystem(name, rootURL); | 127 m_private->callbacks()->didOpenFileSystem(name, rootURL); |
128 m_private.reset(); | 128 m_private.reset(); |
129 } | 129 } |
130 | 130 |
131 void WebFileSystemCallbacks::didResolveURL(const WebString& name, const WebURL&
rootURL, WebFileSystemType type, const WebString& filePath, bool isDirectory) | 131 void WebFileSystemCallbacks::didResolveURL(const WebString& name, const WebURL&
rootURL, WebFileSystemType type, const WebString& filePath, bool isDirectory) |
132 { | 132 { |
133 ASSERT(!m_private.isNull()); | 133 ASSERT(!m_private.isNull()); |
134 m_private->callbacks()->didResolveURL(name, rootURL, static_cast<WebCore::Fi
leSystemType>(type), filePath, isDirectory); | 134 m_private->callbacks()->didResolveURL(name, rootURL, static_cast<blink::File
SystemType>(type), filePath, isDirectory); |
135 m_private.reset(); | 135 m_private.reset(); |
136 } | 136 } |
137 | 137 |
138 void WebFileSystemCallbacks::didCreateFileWriter(WebFileWriter* webFileWriter, l
ong long length) | 138 void WebFileSystemCallbacks::didCreateFileWriter(WebFileWriter* webFileWriter, l
ong long length) |
139 { | 139 { |
140 ASSERT(!m_private.isNull()); | 140 ASSERT(!m_private.isNull()); |
141 m_private->callbacks()->didCreateFileWriter(adoptPtr(webFileWriter), length)
; | 141 m_private->callbacks()->didCreateFileWriter(adoptPtr(webFileWriter), length)
; |
142 m_private.reset(); | 142 m_private.reset(); |
143 } | 143 } |
144 | 144 |
145 void WebFileSystemCallbacks::didFail(WebFileError error) | 145 void WebFileSystemCallbacks::didFail(WebFileError error) |
146 { | 146 { |
147 ASSERT(!m_private.isNull()); | 147 ASSERT(!m_private.isNull()); |
148 m_private->callbacks()->didFail(error); | 148 m_private->callbacks()->didFail(error); |
149 m_private.reset(); | 149 m_private.reset(); |
150 } | 150 } |
151 | 151 |
152 bool WebFileSystemCallbacks::shouldBlockUntilCompletion() const | 152 bool WebFileSystemCallbacks::shouldBlockUntilCompletion() const |
153 { | 153 { |
154 ASSERT(!m_private.isNull()); | 154 ASSERT(!m_private.isNull()); |
155 return m_private->callbacks()->shouldBlockUntilCompletion(); | 155 return m_private->callbacks()->shouldBlockUntilCompletion(); |
156 } | 156 } |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
OLD | NEW |