Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: third_party/WebKit/Source/platform/blob/BlobRegistry.h

Issue 2892953006: WIP POC blob transport over mojo
Patch Set: pass mojo blobs over ipc Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
30 30
31 #ifndef BlobRegistry_h 31 #ifndef BlobRegistry_h
32 #define BlobRegistry_h 32 #define BlobRegistry_h
33 33
34 #include <memory> 34 #include <memory>
35 #include "platform/PlatformExport.h" 35 #include "platform/PlatformExport.h"
36 #include "platform/wtf/Allocator.h" 36 #include "platform/wtf/Allocator.h"
37 #include "platform/wtf/Forward.h" 37 #include "platform/wtf/Forward.h"
38 #include "platform/wtf/PassRefPtr.h" 38 #include "platform/wtf/PassRefPtr.h"
39 39
40 namespace base {
41 class SingleThreadTaskRunner;
42 }
43
40 namespace blink { 44 namespace blink {
41 45
42 class BlobData; 46 class BlobData;
43 class BlobDataHandle; 47 class BlobDataHandle;
44 class KURL; 48 class KURL;
45 class RawData; 49 class RawData;
46 class SecurityOrigin; 50 class SecurityOrigin;
47 51
48 // A bridging class for calling blink::WebBlobRegistry methods. 52 // A bridging class for calling blink::WebBlobRegistry methods.
49 class PLATFORM_EXPORT BlobRegistry { 53 class PLATFORM_EXPORT BlobRegistry {
50 STATIC_ONLY(BlobRegistry); 54 STATIC_ONLY(BlobRegistry);
51 55
52 public: 56 public:
57 static base::SingleThreadTaskRunner* GetIORunner();
58
53 // Methods for controlling Blobs. 59 // Methods for controlling Blobs.
54 static void RegisterBlobData(const String& uuid, std::unique_ptr<BlobData>); 60 static void RegisterBlobData(const String& uuid, std::unique_ptr<BlobData>);
55 static void AddBlobDataRef(const String& uuid); 61 static void AddBlobDataRef(const String& uuid);
56 static void RemoveBlobDataRef(const String& uuid); 62 static void RemoveBlobDataRef(const String& uuid);
57 static void RegisterPublicBlobURL(SecurityOrigin*, 63 static void RegisterPublicBlobURL(SecurityOrigin*,
58 const KURL&, 64 const KURL&,
59 PassRefPtr<BlobDataHandle>); 65 PassRefPtr<BlobDataHandle>);
60 static void RevokePublicBlobURL(const KURL&); 66 static void RevokePublicBlobURL(const KURL&);
61 67
62 // Methods for controlling Streams. 68 // Methods for controlling Streams.
63 static void RegisterStreamURL(const KURL&, const String&); 69 static void RegisterStreamURL(const KURL&, const String&);
64 static void RegisterStreamURL(SecurityOrigin*, 70 static void RegisterStreamURL(SecurityOrigin*,
65 const KURL&, 71 const KURL&,
66 const KURL& src_url); 72 const KURL& src_url);
67 static void AddDataToStream(const KURL&, PassRefPtr<RawData>); 73 static void AddDataToStream(const KURL&, PassRefPtr<RawData>);
68 static void FlushStream(const KURL&); 74 static void FlushStream(const KURL&);
69 static void FinalizeStream(const KURL&); 75 static void FinalizeStream(const KURL&);
70 static void AbortStream(const KURL&); 76 static void AbortStream(const KURL&);
71 static void UnregisterStreamURL(const KURL&); 77 static void UnregisterStreamURL(const KURL&);
72 }; 78 };
73 79
74 } // namespace blink 80 } // namespace blink
75 81
76 #endif // BlobRegistry_h 82 #endif // BlobRegistry_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/blob/BlobData.cpp ('k') | third_party/WebKit/Source/platform/blob/BlobRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698