OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 20 matching lines...) Expand all Loading... |
31 #ifndef WebFileSystemCallbacks_h | 31 #ifndef WebFileSystemCallbacks_h |
32 #define WebFileSystemCallbacks_h | 32 #define WebFileSystemCallbacks_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 #include "WebFileError.h" | 35 #include "WebFileError.h" |
36 #include "WebFileSystemEntry.h" | 36 #include "WebFileSystemEntry.h" |
37 #include "WebFileSystemType.h" | 37 #include "WebFileSystemType.h" |
38 #include "WebPrivatePtr.h" | 38 #include "WebPrivatePtr.h" |
39 #include "WebVector.h" | 39 #include "WebVector.h" |
40 | 40 |
41 namespace blink { | |
42 class AsyncFileSystemCallbacks; | |
43 } | |
44 namespace WTF { template <typename T> class PassOwnPtr; } | 41 namespace WTF { template <typename T> class PassOwnPtr; } |
45 | 42 |
46 namespace blink { | 43 namespace blink { |
47 | 44 |
48 struct WebFileInfo; | 45 class AsyncFileSystemCallbacks; |
49 class WebFileWriter; | 46 class WebFileWriter; |
50 class WebString; | 47 class WebString; |
51 class WebURL; | 48 class WebURL; |
52 class WebFileSystemCallbacksPrivate; | 49 class WebFileSystemCallbacksPrivate; |
| 50 struct WebFileInfo; |
53 | 51 |
54 class WebFileSystemCallbacks { | 52 class WebFileSystemCallbacks { |
55 public: | 53 public: |
56 ~WebFileSystemCallbacks() { reset(); } | 54 ~WebFileSystemCallbacks() { reset(); } |
57 WebFileSystemCallbacks() { } | 55 WebFileSystemCallbacks() { } |
58 WebFileSystemCallbacks(const WebFileSystemCallbacks& c) { assign(c); } | 56 WebFileSystemCallbacks(const WebFileSystemCallbacks& c) { assign(c); } |
59 WebFileSystemCallbacks& operator=(const WebFileSystemCallbacks& c) | 57 WebFileSystemCallbacks& operator=(const WebFileSystemCallbacks& c) |
60 { | 58 { |
61 assign(c); | 59 assign(c); |
62 return *this; | 60 return *this; |
63 } | 61 } |
64 | 62 |
65 BLINK_PLATFORM_EXPORT void reset(); | 63 BLINK_PLATFORM_EXPORT void reset(); |
66 BLINK_PLATFORM_EXPORT void assign(const WebFileSystemCallbacks&); | 64 BLINK_PLATFORM_EXPORT void assign(const WebFileSystemCallbacks&); |
67 | 65 |
68 #if INSIDE_BLINK | 66 #if INSIDE_BLINK |
69 BLINK_PLATFORM_EXPORT WebFileSystemCallbacks(const WTF::PassOwnPtr<blink::As
yncFileSystemCallbacks>&); | 67 BLINK_PLATFORM_EXPORT WebFileSystemCallbacks(const WTF::PassOwnPtr<AsyncFile
SystemCallbacks>&); |
70 #endif | 68 #endif |
71 | 69 |
72 // Callback for WebFileSystem's various operations that don't require | 70 // Callback for WebFileSystem's various operations that don't require |
73 // return values. | 71 // return values. |
74 BLINK_PLATFORM_EXPORT void didSucceed(); | 72 BLINK_PLATFORM_EXPORT void didSucceed(); |
75 | 73 |
76 // Callback for WebFileSystem::readMetadata. Called with the file metadata | 74 // Callback for WebFileSystem::readMetadata. Called with the file metadata |
77 // for the requested path. | 75 // for the requested path. |
78 BLINK_PLATFORM_EXPORT void didReadMetadata(const WebFileInfo&); | 76 BLINK_PLATFORM_EXPORT void didReadMetadata(const WebFileInfo&); |
79 | 77 |
(...skipping 29 matching lines...) Expand all Loading... |
109 // is fullfilled. | 107 // is fullfilled. |
110 BLINK_PLATFORM_EXPORT bool shouldBlockUntilCompletion() const; | 108 BLINK_PLATFORM_EXPORT bool shouldBlockUntilCompletion() const; |
111 | 109 |
112 private: | 110 private: |
113 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; | 111 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; |
114 }; | 112 }; |
115 | 113 |
116 } // namespace blink | 114 } // namespace blink |
117 | 115 |
118 #endif | 116 #endif |
OLD | NEW |