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

Side by Side Diff: content/browser/streams/chrome_stream_registry.h

Issue 12212031: Add support for redirecting ResourceHandlers to a blob: URL (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 10 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
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_STREAMS_STREAM_REGISTRY_H_
6 #define CONTENT_BROWSER_STREAMS_STREAM_REGISTRY_H_
7
8 #include <map>
9
10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h"
12 #include "content/browser/streams/chrome_stream.h"
13 #include "googleurl/src/gurl.h"
14
15 namespace content {
16
17 // Maintains a mapping of blob: URLs to active streams.
18 class ChromeStreamRegistry : public ChromeStreamObserver {
19 public:
20 ChromeStreamRegistry();
21 virtual ~ChromeStreamRegistry();
22
23 // Register a stream, and set its URL
24 void RegisterStream(scoped_refptr<ChromeStream> stream);
25
26 // Get the stream associated with |url|. Returns NULL if there is no such
27 // stream.
28 scoped_refptr<ChromeStream> GetStream(const GURL& url);
29
30 private:
31 // ChromeStreamObserver methods.
32 virtual void OnDataAvailable(ChromeStream* stream) OVERRIDE;
33 virtual void OnStreamComplete(ChromeStream* stream) OVERRIDE;
34 virtual void OnBufferAvailable(ChromeStream* stream) OVERRIDE;
35
36 std::map<GURL, scoped_refptr<ChromeStream> > streams_;
37
38 DISALLOW_COPY_AND_ASSIGN(ChromeStreamRegistry);
39 };
40
41 } // namespace content
42
43 #endif // CONTENT_BROWSER_STREAMS_STREAM_REGISTRY_H_
44
45
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698