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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // callbacks if necessary. | 79 // callbacks if necessary. |
80 virtual void addPendingCallbacks() { } | 80 virtual void addPendingCallbacks() { } |
81 virtual void removePendingCallbacks() { } | 81 virtual void removePendingCallbacks() { } |
82 | 82 |
83 // Overridden by subclasses to handle sync vs async error-handling. | 83 // Overridden by subclasses to handle sync vs async error-handling. |
84 virtual void reportError(ErrorCallback*, FileError*) = 0; | 84 virtual void reportError(ErrorCallback*, FileError*) = 0; |
85 | 85 |
86 const String& name() const { return m_name; } | 86 const String& name() const { return m_name; } |
87 FileSystemType type() const { return m_type; } | 87 FileSystemType type() const { return m_type; } |
88 KURL rootURL() const { return m_filesystemRootURL; } | 88 KURL rootURL() const { return m_filesystemRootURL; } |
89 blink::WebFileSystem* fileSystem() const; | 89 WebFileSystem* fileSystem() const; |
90 SecurityOrigin* securityOrigin() const; | 90 SecurityOrigin* securityOrigin() const; |
91 | 91 |
92 // The clonable flag is used in the structured clone algorithm to test | 92 // The clonable flag is used in the structured clone algorithm to test |
93 // whether the FileSystem API object is permitted to be cloned. It defaults | 93 // whether the FileSystem API object is permitted to be cloned. It defaults |
94 // to false, and must be explicitly set by internal code permit cloning. | 94 // to false, and must be explicitly set by internal code permit cloning. |
95 void makeClonable() { m_clonable = true; } | 95 void makeClonable() { m_clonable = true; } |
96 bool clonable() const { return m_clonable; } | 96 bool clonable() const { return m_clonable; } |
97 | 97 |
98 static bool isValidType(FileSystemType); | 98 static bool isValidType(FileSystemType); |
99 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat
h); | 99 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat
h); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // KURL.h other than the unicode normalization (NFC). | 136 // KURL.h other than the unicode normalization (NFC). |
137 // See http://crbug.com/252551 for more details. | 137 // See http://crbug.com/252551 for more details. |
138 static String encodeFilePathAsURIComponent(const String& fullPath); | 138 static String encodeFilePathAsURIComponent(const String& fullPath); |
139 }; | 139 }; |
140 | 140 |
141 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) {
return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL
(); } | 141 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) {
return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL
(); } |
142 | 142 |
143 } // namespace blink | 143 } // namespace blink |
144 | 144 |
145 #endif // DOMFileSystemBase_h | 145 #endif // DOMFileSystemBase_h |
OLD | NEW |