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

Side by Side Diff: blimp/client/core/compositor/blob_manager.h

Issue 2300493002: Move glue code of blob channel to blimp_client_context_impl. (Closed)
Patch Set: More polish on comments. Created 4 years, 3 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 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698