| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 private: | 197 private: |
| 198 bool didHitError(FileError* error) | 198 bool didHitError(FileError* error) |
| 199 { | 199 { |
| 200 reportResult(error->code()); | 200 reportResult(error->code()); |
| 201 return true; | 201 return true; |
| 202 } | 202 } |
| 203 | 203 |
| 204 bool didGetEntry(Entry*); | 204 bool didGetEntry(Entry*); |
| 205 bool didReadDirectoryEntries(const EntryHeapVector&); | 205 bool didReadDirectoryEntries(const EntryHeapVector&); |
| 206 | 206 |
| 207 void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuild
er::FileSystem::Entry> > entries = nullptr) | 207 void reportResult(FileError::ErrorCode errorCode, PassRefPtr<Array<TypeBuild
er::FileSystem::Entry>> entries = nullptr) |
| 208 { | 208 { |
| 209 m_requestCallback->sendSuccess(static_cast<int>(errorCode), entries); | 209 m_requestCallback->sendSuccess(static_cast<int>(errorCode), entries); |
| 210 } | 210 } |
| 211 | 211 |
| 212 DirectoryContentRequest(PassRefPtrWillBeRawPtr<RequestDirectoryContentCallba
ck> requestCallback, const String& url) | 212 DirectoryContentRequest(PassRefPtrWillBeRawPtr<RequestDirectoryContentCallba
ck> requestCallback, const String& url) |
| 213 : m_requestCallback(requestCallback) | 213 : m_requestCallback(requestCallback) |
| 214 , m_url(ParsedURLString, url) { } | 214 , m_url(ParsedURLString, url) { } |
| 215 | 215 |
| 216 void readDirectoryEntries(); | 216 void readDirectoryEntries(); |
| 217 | 217 |
| 218 RefPtrWillBePersistent<RequestDirectoryContentCallback> m_requestCallback; | 218 RefPtrWillBePersistent<RequestDirectoryContentCallback> m_requestCallback; |
| 219 KURL m_url; | 219 KURL m_url; |
| 220 RefPtr<Array<TypeBuilder::FileSystem::Entry> > m_entries; | 220 RefPtr<Array<TypeBuilder::FileSystem::Entry>> m_entries; |
| 221 Persistent<DirectoryReader> m_directoryReader; | 221 Persistent<DirectoryReader> m_directoryReader; |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 void DirectoryContentRequest::start(ExecutionContext* executionContext) | 224 void DirectoryContentRequest::start(ExecutionContext* executionContext) |
| 225 { | 225 { |
| 226 ASSERT(executionContext); | 226 ASSERT(executionContext); |
| 227 | 227 |
| 228 ErrorCallback* errorCallback = CallbackDispatcherFactory<ErrorCallback>::cre
ate(this, &DirectoryContentRequest::didHitError); | 228 ErrorCallback* errorCallback = CallbackDispatcherFactory<ErrorCallback>::cre
ate(this, &DirectoryContentRequest::didHitError); |
| 229 EntryCallback* successCallback = CallbackDispatcherFactory<EntryCallback>::c
reate(this, &DirectoryContentRequest::didGetEntry); | 229 EntryCallback* successCallback = CallbackDispatcherFactory<EntryCallback>::c
reate(this, &DirectoryContentRequest::didGetEntry); |
| 230 | 230 |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 return 0; | 728 return 0; |
| 729 } | 729 } |
| 730 | 730 |
| 731 void InspectorFileSystemAgent::trace(Visitor* visitor) | 731 void InspectorFileSystemAgent::trace(Visitor* visitor) |
| 732 { | 732 { |
| 733 visitor->trace(m_page); | 733 visitor->trace(m_page); |
| 734 InspectorBaseAgent::trace(visitor); | 734 InspectorBaseAgent::trace(visitor); |
| 735 } | 735 } |
| 736 | 736 |
| 737 } // namespace blink | 737 } // namespace blink |
| OLD | NEW |