Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 BLIMP_CLIENT_CORE_COMPOSITOR_BLOB_MANAGER_H_ | |
| 6 #define BLIMP_CLIENT_CORE_COMPOSITOR_BLOB_MANAGER_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "blimp/client/core/compositor/blob_image_serialization_processor.h" | |
| 12 #include "blimp/client/core/compositor/decoding_image_generator.h" | |
| 13 #include "blimp/net/blimp_message_processor.h" | |
| 14 | |
| 15 namespace blimp { | |
| 16 | |
| 17 class BlobChannelReceiver; | |
| 18 | |
| 19 namespace client { | |
| 20 | |
| 21 // BlobManager processes incoming BlobChannel message from the engine and holds | |
| 22 // cache of Blob payloads. | |
| 23 class BlobManager : public BlimpMessageProcessor { | |
|
David Trainor- moved to gerrit
2016/09/02 00:56:47
You're right... BlobChannelFeature makes sense for
xingliu
2016/09/02 02:13:40
Done.
| |
| 24 public: | |
| 25 explicit BlobManager( | |
| 26 BlobImageSerializationProcessor::ErrorDelegate* delegate); | |
| 27 ~BlobManager() override; | |
| 28 | |
| 29 protected: | |
| 30 // The receiver that does the actual blob processing, protected for test. | |
| 31 std::unique_ptr<BlobChannelReceiver> blob_receiver_; | |
| 32 | |
| 33 private: | |
| 34 // BlimpMessageProcessor implementation. | |
| 35 void ProcessMessage(std::unique_ptr<BlimpMessage> message, | |
| 36 const net::CompletionCallback& callback) override; | |
| 37 | |
| 38 // Receives blob BlimpMessages and relays them to BlobChannelReceiver. | |
| 39 // Owned by BlobChannelReceiver, therefore stored as a raw pointer here. | |
| 40 BlimpMessageProcessor* incoming_msg_processor_ = nullptr; | |
| 41 | |
| 42 // Retrieves and decodes image data from |blob_receiver_|. Must outlive | |
| 43 // |blob_receiver_|. | |
| 44 BlobImageSerializationProcessor blob_image_processor_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(BlobManager); | |
| 47 }; | |
| 48 | |
| 49 } // namespace client | |
| 50 } // namespace blimp | |
| 51 | |
| 52 #endif // BLIMP_CLIENT_CORE_COMPOSITOR_BLOB_MANAGER_H_ | |
| OLD | NEW |