| Index: chrome/utility/media_galleries/ipc_tunnel_data_reader.h
|
| diff --git a/chrome/utility/media_galleries/ipc_tunnel_data_reader.h b/chrome/utility/media_galleries/ipc_tunnel_data_reader.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7077e0114e40db225974f3c21ca32936d9068c12
|
| --- /dev/null
|
| +++ b/chrome/utility/media_galleries/ipc_tunnel_data_reader.h
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_UTILITY_MEDIA_GALLERIES_IPC_TUNNEL_DATA_READER_H_
|
| +#define CHROME_UTILITY_MEDIA_GALLERIES_IPC_TUNNEL_DATA_READER_H_
|
| +
|
| +#include <map>
|
| +
|
| +#include "chrome/utility/media_galleries/media_metadata_parser.h"
|
| +
|
| +namespace metadata {
|
| +
|
| +// Provides the metadata parser with bytes from the browser process via IPC.
|
| +class IPCTunnelDataReader : public metadata::DataReader {
|
| + public:
|
| + IPCTunnelDataReader();
|
| + virtual ~IPCTunnelDataReader();
|
| +
|
| + virtual void ReadBytes(int64 offset, int64 length,
|
| + const ReadBytesCallback& callback) OVERRIDE;
|
| +
|
| + // Called by ChromeContentUtilityClient when it recieves the requested bytes.
|
| + void ReceiveBytes(int64 request_id, const std::string& bytes);
|
| +
|
| + private:
|
| + std::map<int64, ReadBytesCallback> pending_callbacks_;
|
| + int64 next_request_id_;
|
| +};
|
| +
|
| +} // namespace metadata
|
| +
|
| +#endif // CHROME_UTILITY_MEDIA_GALLERIES_IPC_TUNNEL_DATA_READER_H_
|
|
|