| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 { | 79 { |
| 80 if (m_errorCode) | 80 if (m_errorCode) |
| 81 FileError::throwDOMException(exceptionState, m_errorCode); | 81 FileError::throwDOMException(exceptionState, m_errorCode); |
| 82 | 82 |
| 83 return m_result; | 83 return m_result; |
| 84 } | 84 } |
| 85 | 85 |
| 86 SuccessCallback* successCallback() { return SuccessCallbackImpl::create(this
); } | 86 SuccessCallback* successCallback() { return SuccessCallbackImpl::create(this
); } |
| 87 ErrorCallback* errorCallback() { return ErrorCallbackImpl::create(this); } | 87 ErrorCallback* errorCallback() { return ErrorCallbackImpl::create(this); } |
| 88 | 88 |
| 89 void trace(Visitor* visitor) | 89 DEFINE_INLINE_TRACE() |
| 90 { | 90 { |
| 91 visitor->trace(m_result); | 91 visitor->trace(m_result); |
| 92 } | 92 } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 SyncCallbackHelper() | 95 SyncCallbackHelper() |
| 96 : m_errorCode(FileError::OK) | 96 : m_errorCode(FileError::OK) |
| 97 , m_completed(false) | 97 , m_completed(false) |
| 98 { | 98 { |
| 99 } | 99 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 FileError::ErrorCode m_errorCode; | 160 FileError::ErrorCode m_errorCode; |
| 161 bool m_completed; | 161 bool m_completed; |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 struct EmptyType : public GarbageCollected<EmptyType> { | 164 struct EmptyType : public GarbageCollected<EmptyType> { |
| 165 static EmptyType* create(EmptyType*) | 165 static EmptyType* create(EmptyType*) |
| 166 { | 166 { |
| 167 return 0; | 167 return 0; |
| 168 } | 168 } |
| 169 | 169 |
| 170 void trace(Visitor*) { } | 170 DEFINE_INLINE_TRACE() { } |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe
lper; | 173 typedef SyncCallbackHelper<EntryCallback, Entry*, EntrySync> EntrySyncCallbackHe
lper; |
| 174 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa
llbackHelper; | 174 typedef SyncCallbackHelper<MetadataCallback, Metadata*, Metadata> MetadataSyncCa
llbackHelper; |
| 175 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback
Helper; | 175 typedef SyncCallbackHelper<VoidCallback, EmptyType*, EmptyType> VoidSyncCallback
Helper; |
| 176 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync
> FileSystemSyncCallbackHelper; | 176 typedef SyncCallbackHelper<FileSystemCallback, DOMFileSystem*, DOMFileSystemSync
> FileSystemSyncCallbackHelper; |
| 177 | 177 |
| 178 } // namespace blink | 178 } // namespace blink |
| 179 | 179 |
| 180 #endif // SyncCallbackHelper_h | 180 #endif // SyncCallbackHelper_h |
| OLD | NEW |