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 21 matching lines...) Expand all Loading... |
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 #if INSIDE_BLINK | 41 #if INSIDE_BLINK |
42 #include "wtf/OwnPtr.h" | 42 #include <memory> |
43 #include "wtf/PassOwnPtr.h" | |
44 #endif | 43 #endif |
45 | 44 |
46 namespace blink { | 45 namespace blink { |
47 | 46 |
48 class AsyncFileSystemCallbacks; | 47 class AsyncFileSystemCallbacks; |
49 class WebFileWriter; | 48 class WebFileWriter; |
50 class WebString; | 49 class WebString; |
51 class WebURL; | 50 class WebURL; |
52 class WebFileSystemCallbacksPrivate; | 51 class WebFileSystemCallbacksPrivate; |
53 struct WebFileInfo; | 52 struct WebFileInfo; |
54 | 53 |
55 class WebFileSystemCallbacks { | 54 class WebFileSystemCallbacks { |
56 public: | 55 public: |
57 ~WebFileSystemCallbacks() { reset(); } | 56 ~WebFileSystemCallbacks() { reset(); } |
58 WebFileSystemCallbacks() { } | 57 WebFileSystemCallbacks() { } |
59 WebFileSystemCallbacks(const WebFileSystemCallbacks& c) { assign(c); } | 58 WebFileSystemCallbacks(const WebFileSystemCallbacks& c) { assign(c); } |
60 WebFileSystemCallbacks& operator=(const WebFileSystemCallbacks& c) | 59 WebFileSystemCallbacks& operator=(const WebFileSystemCallbacks& c) |
61 { | 60 { |
62 assign(c); | 61 assign(c); |
63 return *this; | 62 return *this; |
64 } | 63 } |
65 | 64 |
66 BLINK_PLATFORM_EXPORT void reset(); | 65 BLINK_PLATFORM_EXPORT void reset(); |
67 BLINK_PLATFORM_EXPORT void assign(const WebFileSystemCallbacks&); | 66 BLINK_PLATFORM_EXPORT void assign(const WebFileSystemCallbacks&); |
68 | 67 |
69 #if INSIDE_BLINK | 68 #if INSIDE_BLINK |
70 BLINK_PLATFORM_EXPORT WebFileSystemCallbacks(WTF::PassOwnPtr<AsyncFileSystem
Callbacks>&&); | 69 BLINK_PLATFORM_EXPORT WebFileSystemCallbacks(std::unique_ptr<AsyncFileSystem
Callbacks>&&); |
71 #endif | 70 #endif |
72 | 71 |
73 // Callback for WebFileSystem's various operations that don't require | 72 // Callback for WebFileSystem's various operations that don't require |
74 // return values. | 73 // return values. |
75 BLINK_PLATFORM_EXPORT void didSucceed(); | 74 BLINK_PLATFORM_EXPORT void didSucceed(); |
76 | 75 |
77 // Callback for WebFileSystem::readMetadata. Called with the file metadata | 76 // Callback for WebFileSystem::readMetadata. Called with the file metadata |
78 // for the requested path. | 77 // for the requested path. |
79 BLINK_PLATFORM_EXPORT void didReadMetadata(const WebFileInfo&); | 78 BLINK_PLATFORM_EXPORT void didReadMetadata(const WebFileInfo&); |
80 | 79 |
(...skipping 29 matching lines...) Expand all Loading... |
110 // is fullfilled. | 109 // is fullfilled. |
111 BLINK_PLATFORM_EXPORT bool shouldBlockUntilCompletion() const; | 110 BLINK_PLATFORM_EXPORT bool shouldBlockUntilCompletion() const; |
112 | 111 |
113 private: | 112 private: |
114 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; | 113 WebPrivatePtr<WebFileSystemCallbacksPrivate> m_private; |
115 }; | 114 }; |
116 | 115 |
117 } // namespace blink | 116 } // namespace blink |
118 | 117 |
119 #endif | 118 #endif |
OLD | NEW |