OLD | NEW |
(Empty) | |
| 1 Index: WebKit/chromium/features.gypi |
| 2 =================================================================== |
| 3 --- WebKit/chromium/features.gypi (revision 109824) |
| 4 +++ WebKit/chromium/features.gypi (working copy) |
| 5 @@ -64,6 +64,7 @@ |
| 6 'ENABLE_JAVASCRIPT_DEBUGGER=1', |
| 7 'ENABLE_JAVASCRIPT_I18N_API=1', |
| 8 'ENABLE_LINK_PREFETCH=1', |
| 9 + 'ENABLE_MEDIA_GALLERY=1', |
| 10 'ENABLE_MEDIA_SOURCE=1', |
| 11 'ENABLE_MEDIA_STATISTICS=1', |
| 12 'ENABLE_MEDIA_STREAM=1', |
| 13 Index: WebKit/chromium/src/WebFrameImpl.cpp |
| 14 =================================================================== |
| 15 --- WebKit/chromium/src/WebFrameImpl.cpp (revision 109824) |
| 16 +++ WebKit/chromium/src/WebFrameImpl.cpp (working copy) |
| 17 @@ -174,9 +174,11 @@ |
| 18 #include "DirectoryEntry.h" |
| 19 #include "DOMFileSystem.h" |
| 20 #include "FileEntry.h" |
| 21 +#include "MediaGallery.h" |
| 22 #include "V8DirectoryEntry.h" |
| 23 #include "V8DOMFileSystem.h" |
| 24 #include "V8FileEntry.h" |
| 25 +#include "V8MediaGallery.h" |
| 26 #include "platform/WebFileSystem.h" |
| 27 #endif |
| 28 |
| 29 @@ -921,6 +923,12 @@ |
| 30 return toV8(DirectoryEntry::create(fileSystem, filePath)); |
| 31 return toV8(FileEntry::create(fileSystem, filePath)); |
| 32 } |
| 33 + |
| 34 +v8::Handle<v8::Value> WebFrameImpl::createMediaGallery(int id, const WebString&
name, int flags) |
| 35 +{ |
| 36 + return toV8(MediaGallery::create(id, name, static_cast<MediaGallery::Flags>
(flags))); |
| 37 +} |
| 38 + |
| 39 #endif |
| 40 |
| 41 void WebFrameImpl::reload(bool ignoreCache) |
| 42 Index: WebKit/chromium/src/WebFrameImpl.h |
| 43 =================================================================== |
| 44 --- WebKit/chromium/src/WebFrameImpl.h (revision 109824) |
| 45 +++ WebKit/chromium/src/WebFrameImpl.h (working copy) |
| 46 @@ -119,6 +119,7 @@ |
| 47 const WebString& fileSystemPa
th, |
| 48 const WebString& filePath, |
| 49 bool isDirectory); |
| 50 + virtual v8::Handle<v8::Value> createMediaGallery(int id, const WebString& n
ame, int flags); |
| 51 #endif |
| 52 virtual void reload(bool ignoreCache); |
| 53 virtual void loadRequest(const WebURLRequest&); |
| 54 Index: WebKit/chromium/public/WebFrame.h |
| 55 =================================================================== |
| 56 --- WebKit/chromium/public/WebFrame.h (revision 109824) |
| 57 +++ WebKit/chromium/public/WebFrame.h (working copy) |
| 58 @@ -288,6 +288,7 @@ |
| 59 const WebString& fileSystemRo
otURL, |
| 60 const WebString& filePath, |
| 61 bool isDirectory) = 0; |
| 62 + virtual v8::Handle<v8::Value> createMediaGallery(int id, const WebString& n
ame, int flags) = 0; |
| 63 #endif |
| 64 |
| 65 |
| 66 Index: WebCore/WebCore.gyp/WebCore.gyp |
| 67 =================================================================== |
| 68 --- WebCore/WebCore.gyp/WebCore.gyp (revision 109824) |
| 69 +++ WebCore/WebCore.gyp/WebCore.gyp (working copy) |
| 70 @@ -55,6 +55,7 @@ |
| 71 '../Modules/geolocation', |
| 72 '../Modules/intents', |
| 73 '../Modules/indexeddb', |
| 74 + '../Modules/mediagallery', |
| 75 '../Modules/mediastream', |
| 76 '../Modules/websockets', |
| 77 '../accessibility', |
| 78 Index: WebCore/WebCore.gypi |
| 79 =================================================================== |
| 80 --- WebCore/WebCore.gypi (revision 109824) |
| 81 +++ WebCore/WebCore.gypi (working copy) |
| 82 @@ -750,6 +750,7 @@ |
| 83 'Modules/intents/Intent.idl', |
| 84 'Modules/intents/IntentResultCallback.idl', |
| 85 'Modules/intents/NavigatorIntents.idl', |
| 86 + 'Modules/mediagallery/MediaGallery.idl', |
| 87 'Modules/mediastream/DOMWindowMediaStream.idl', |
| 88 'Modules/mediastream/LocalMediaStream.idl', |
| 89 'Modules/mediastream/MediaStream.idl', |
| 90 @@ -1374,6 +1375,8 @@ |
| 91 'Modules/intents/IntentResultCallback.h', |
| 92 'Modules/intents/NavigatorIntents.cpp', |
| 93 'Modules/intents/NavigatorIntents.h', |
| 94 + 'Modules/mediagallery/MediaGallery.h', |
| 95 + 'Modules/mediagallery/MediaGallery.cpp', |
| 96 'Modules/mediastream/LocalMediaStream.cpp', |
| 97 'Modules/mediastream/LocalMediaStream.h', |
| 98 'Modules/mediastream/MediaStream.cpp', |
| 99 Index: WebCore/Modules/mediagallery/MediaGallery.cpp |
| 100 =================================================================== |
| 101 --- WebCore/Modules/mediagallery/MediaGallery.cpp (revision 0) |
| 102 +++ WebCore/Modules/mediagallery/MediaGallery.cpp (revision 0) |
| 103 @@ -0,0 +1,77 @@ |
| 104 +/* |
| 105 + * Copyright (C) 2012 Google Inc. All rights reserved. |
| 106 + * |
| 107 + * Redistribution and use in source and binary forms, with or without |
| 108 + * modification, are permitted provided that the following conditions |
| 109 + * are met: |
| 110 + * |
| 111 + * 1. Redistributions of source code must retain the above copyright |
| 112 + * notice, this list of conditions and the following disclaimer. |
| 113 + * 2. Redistributions in binary form must reproduce the above copyright |
| 114 + * notice, this list of conditions and the following disclaimer in the |
| 115 + * documentation and/or other materials provided with the distribution. |
| 116 + * 3. Neither the name of Google, Inc. ("Google") nor the names of |
| 117 + * its contributors may be used to endorse or promote products derived |
| 118 + * from this software without specific prior written permission. |
| 119 + * |
| 120 + * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 121 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 122 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 123 + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 124 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 125 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 126 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 127 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 128 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 129 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 130 + */ |
| 131 + |
| 132 +#include "config.h" |
| 133 +#include "MediaGallery.h" |
| 134 + |
| 135 +#include "Blob.h" |
| 136 +#include "V8Blob.h" |
| 137 + |
| 138 +#if ENABLE(MEDIA_GALLERY) |
| 139 + |
| 140 +namespace WebCore { |
| 141 + |
| 142 +PassRefPtr<MediaGallery> MediaGallery::create(int id, const String& name, Flags
flags) |
| 143 +{ |
| 144 + return adoptRef(new MediaGallery(id, name, flags)); |
| 145 +} |
| 146 + |
| 147 +MediaGallery::MediaGallery(int id, const String& name, Flags flags) |
| 148 + : m_id(id) |
| 149 + , m_name(name) |
| 150 + , m_flags(flags) |
| 151 +{ |
| 152 +} |
| 153 + |
| 154 +const String& MediaGallery::name() const |
| 155 +{ |
| 156 + return m_name; |
| 157 +} |
| 158 + |
| 159 +bool MediaGallery::isVolatile() const |
| 160 +{ |
| 161 + return m_flags & VOLATILE; |
| 162 +} |
| 163 + |
| 164 +bool MediaGallery::supportsMultipleMediaEntrySortCriteria() const |
| 165 +{ |
| 166 + return m_flags & MULTI_SORT; |
| 167 +} |
| 168 + |
| 169 +bool MediaGallery::supportsGallerySearch() const |
| 170 +{ |
| 171 + return m_flags & GALLERY_SEARCH; |
| 172 +} |
| 173 + |
| 174 +Blob* MediaGallery::icon() const { |
| 175 + return NULL; |
| 176 +} |
| 177 + |
| 178 +} // namespace WebCore |
| 179 + |
| 180 +#endif // ENABLE(MEDIA_GALLERY) |
| 181 |
| 182 Property changes on: WebCore/Modules/mediagallery/MediaGallery.cpp |
| 183 ___________________________________________________________________ |
| 184 Added: svn:eol-style |
| 185 + LF |
| 186 |
| 187 Index: WebCore/Modules/mediagallery/MediaGallery.h |
| 188 =================================================================== |
| 189 --- WebCore/Modules/mediagallery/MediaGallery.h (revision 0) |
| 190 +++ WebCore/Modules/mediagallery/MediaGallery.h (revision 0) |
| 191 @@ -0,0 +1,77 @@ |
| 192 +/* |
| 193 + * Copyright (C) 2012 Google Inc. All rights reserved. |
| 194 + * |
| 195 + * Redistribution and use in source and binary forms, with or without |
| 196 + * modification, are permitted provided that the following conditions |
| 197 + * are met: |
| 198 + * |
| 199 + * 1. Redistributions of source code must retain the above copyright |
| 200 + * notice, this list of conditions and the following disclaimer. |
| 201 + * 2. Redistributions in binary form must reproduce the above copyright |
| 202 + * notice, this list of conditions and the following disclaimer in the |
| 203 + * documentation and/or other materials provided with the distribution. |
| 204 + * 3. Neither the name of Google, Inc. ("Google") nor the names of |
| 205 + * its contributors may be used to endorse or promote products derived |
| 206 + * from this software without specific prior written permission. |
| 207 + * |
| 208 + * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 209 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 210 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 211 + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 212 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 213 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 214 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 215 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 216 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 217 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 218 + */ |
| 219 + |
| 220 +#ifndef MediaGallery_h |
| 221 +#define MediaGallery_h |
| 222 + |
| 223 +#if ENABLE(MEDIA_GALLERY) |
| 224 + |
| 225 +#include <wtf/PassRefPtr.h> |
| 226 +#include <wtf/RefCounted.h> |
| 227 +#include <wtf/text/WTFString.h> |
| 228 + |
| 229 +namespace WebCore { |
| 230 + |
| 231 +class Blob; |
| 232 + |
| 233 +class MediaGallery : public RefCounted<MediaGallery> { |
| 234 +public: |
| 235 + enum Flags { |
| 236 + VOLATILE = 1, |
| 237 + MULTI_SORT = 2, |
| 238 + GALLERY_SEARCH = 4 |
| 239 + }; |
| 240 + |
| 241 + static const unsigned short SORT_COLLECTION_NATURAL = 0; |
| 242 + static const unsigned short SORT_COLLECTION_NAME = 1; |
| 243 + static const unsigned short SORT_COLLECTION_DATE = 2; |
| 244 + static const unsigned short SORT_COLLECTION_REVERSE_NAME = 3; |
| 245 + static const unsigned short SORT_COLLECTION_REVERSE_DATE = 4; |
| 246 + |
| 247 + static PassRefPtr<MediaGallery> create(int id, const String& name, Flags fl
ags); |
| 248 + |
| 249 + const String& name() const; |
| 250 + bool isVolatile() const; |
| 251 + bool supportsMultipleMediaEntrySortCriteria() const; |
| 252 + bool supportsGallerySearch() const; |
| 253 + |
| 254 + Blob* icon() const; |
| 255 + |
| 256 +private: |
| 257 + MediaGallery(int id, const String& name, Flags flags); |
| 258 + |
| 259 + int m_id; |
| 260 + String m_name; |
| 261 + unsigned int m_flags; |
| 262 +}; |
| 263 + |
| 264 +} // namespace WebCore |
| 265 + |
| 266 +#endif |
| 267 + |
| 268 +#endif // MediaGallery_h |
| 269 |
| 270 Property changes on: WebCore/Modules/mediagallery/MediaGallery.h |
| 271 ___________________________________________________________________ |
| 272 Added: svn:eol-style |
| 273 + LF |
| 274 |
| 275 Index: WebCore/Modules/mediagallery/MediaGallery.idl |
| 276 =================================================================== |
| 277 --- WebCore/Modules/mediagallery/MediaGallery.idl (revision 0) |
| 278 +++ WebCore/Modules/mediagallery/MediaGallery.idl (revision 0) |
| 279 @@ -0,0 +1,58 @@ |
| 280 +/* |
| 281 + * Copyright (C) 2012 Google Inc. All rights reserved. |
| 282 + * |
| 283 + * Redistribution and use in source and binary forms, with or without |
| 284 + * modification, are permitted provided that the following conditions |
| 285 + * are met: |
| 286 + * |
| 287 + * 1. Redistributions of source code must retain the above copyright |
| 288 + * notice, this list of conditions and the following disclaimer. |
| 289 + * 2. Redistributions in binary form must reproduce the above copyright |
| 290 + * notice, this list of conditions and the following disclaimer in the |
| 291 + * documentation and/or other materials provided with the distribution. |
| 292 + * |
| 293 + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 294 + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 295 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 296 + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 297 + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 298 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 299 + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 300 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 301 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 302 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 303 + */ |
| 304 + |
| 305 +module mediaGalleries { |
| 306 + interface [ |
| 307 + Conditional=MEDIA_GALLERY, |
| 308 + OmitConstructor |
| 309 + ] MediaGallery { |
| 310 + const unsigned short SORT_COLLECTION_NATURAL = 0; |
| 311 + const unsigned short SORT_COLLECTION_NAME = 1; |
| 312 + const unsigned short SORT_COLLECTION_DATE = 2; |
| 313 + const unsigned short SORT_COLLECTION_REVERSE_NAME = 3; |
| 314 + const unsigned short SORT_COLLECTION_REVERSE_DATE = 4; |
| 315 + |
| 316 + readonly attribute DOMString name; |
| 317 + readonly attribute boolean isVolatile; |
| 318 + readonly attribute boolean supportsMultipleMediaEntrySortCriteria; |
| 319 + readonly attribute boolean supportsGallerySearch; |
| 320 + |
| 321 +// Blob icon(); |
| 322 + |
| 323 +/* TODO(vandebo) Implement this stuff. |
| 324 + SortCriteria getSupportedMediaEntrySortOrders(); |
| 325 + object getSupportedMediaEntrySearchAndSortCriteria(); |
| 326 + |
| 327 + MediaCollectionIterator getMediaCollections(in [Optional] unsigned shor
t sortOrder); |
| 328 + void getMediaCollectionByKey(in DOMString key, |
| 329 + in MediaCollectionCallback callback); |
| 330 + void createMediaCollection(in DOMString name, |
| 331 + in MediaCollectionCallback callback); |
| 332 + |
| 333 + MediaEntryIterator getMediaEntries(in [Optional] SearchCriteriea filter
s, |
| 334 + in [Optional] SortCriteria orderBy); |
| 335 +*/ |
| 336 + }; |
| 337 +} |
| 338 |
| 339 Property changes on: WebCore/Modules/mediagallery/MediaGallery.idl |
| 340 ___________________________________________________________________ |
| 341 Added: svn:eol-style |
| 342 + LF |
| 343 |
OLD | NEW |