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

Side by Side Diff: chrome/utility/media_galleries/ipc_tunnel_data_reader.h

Issue 103283003: Media Galleries API Metadata: SafeMediaMetadataParser and IPCTunnelDataReader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: self review 2 Created 7 years 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 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 CHROME_UTILITY_MEDIA_GALLERIES_IPC_TUNNEL_DATA_READER_H_
6 #define CHROME_UTILITY_MEDIA_GALLERIES_IPC_TUNNEL_DATA_READER_H_
7
8 #include <map>
9
10 #include "chrome/utility/media_galleries/media_metadata_parser.h"
11
12 namespace metadata {
13
14 // Provides the metadata parser with bytes from the browser process via IPC.
15 class IPCTunnelDataReader : public metadata::DataReader {
16 public:
17 IPCTunnelDataReader();
18 virtual ~IPCTunnelDataReader();
19
20 virtual void ReadBytes(int64 offset, int64 length,
21 const ReadBytesCallback& callback) OVERRIDE;
22
23 // Called by ChromeContentUtilityClient when it recieves the requested bytes.
24 void ReceiveBytes(int64 request_id, const std::string& bytes);
25
26 private:
27 std::map<int64, ReadBytesCallback> pending_callbacks_;
28 int64 next_request_id_;
29 };
30
31 } // namespace metadata
32
33 #endif // CHROME_UTILITY_MEDIA_GALLERIES_IPC_TUNNEL_DATA_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698