Chromium Code Reviews| Index: blimp/client/core/blimp_client_context_impl.h |
| diff --git a/blimp/client/core/blimp_client_context_impl.h b/blimp/client/core/blimp_client_context_impl.h |
| index 7c8d6e588929159df70e86cd3013473edda85b79..dad7ec36d2d75fd2a1a5862c45ebf7158147ff24 100644 |
| --- a/blimp/client/core/blimp_client_context_impl.h |
| +++ b/blimp/client/core/blimp_client_context_impl.h |
| @@ -12,6 +12,7 @@ |
| #include "base/memory/weak_ptr.h" |
| #include "base/single_thread_task_runner.h" |
| #include "base/threading/thread.h" |
| +#include "blimp/client/core/compositor/blob_image_serialization_processor.h" |
| #include "blimp/client/core/session/client_network_components.h" |
| #include "blimp/client/core/session/identity_source.h" |
| #include "blimp/client/core/session/network_event_observer.h" |
| @@ -22,6 +23,9 @@ |
| #include "url/gurl.h" |
| namespace blimp { |
| + |
| +class HeliumBlobReceiverDelegate; |
| + |
| namespace client { |
| class BlimpContentsManager; |
| @@ -31,9 +35,15 @@ class TabControlFeature; |
| // BlimpClientContextImpl is the implementation of the main context-class for |
| // the blimp client. |
| -class BlimpClientContextImpl : public BlimpClientContext, |
| - public NetworkEventObserver { |
| +class BlimpClientContextImpl |
| + : public BlimpClientContext, |
| + public BlobImageSerializationProcessor::ErrorDelegate, |
| + public NetworkEventObserver { |
| public: |
| + // Set ImageGenerator factory for Skia, can also be called by |
| + // blimp_startup.cc in blimp/client/app. |
| + static void SetImageGeneratorFromEncodedFactory(); |
| + |
| // The |io_thread_task_runner| must be the task runner to use for IO |
| // operations. |
| // The |file_thread_task_runner| must be the task runner to use for file |
| @@ -79,6 +89,12 @@ class BlimpClientContextImpl : public BlimpClientContext, |
| void RegisterFeatures(); |
| + // Setup blob channel. |
|
David Trainor- moved to gerrit
2016/08/31 05:40:57
I do this a lot too, but maybe just remove this co
xingliu
2016/09/01 02:08:10
Done.
|
| + void SetupBlobChannel(); |
| + |
| + // BlobImageSerializationProcessor::ErrorDelegate implementation. |
| + void OnImageDecodeError() override; |
| + |
| // Provides functionality from the embedder. |
| BlimpClientContextDelegate* delegate_ = nullptr; |
| @@ -105,6 +121,16 @@ class BlimpClientContextImpl : public BlimpClientContext, |
| std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; |
| + // Receives blob BlimpMessages and relays them to BlobChannelReceiver. |
| + // Owned by BlobChannelReceiver, therefore stored as a raw pointer here. |
| + HeliumBlobReceiverDelegate* blob_delegate_ = nullptr; |
| + |
| + // Retrieves and decodes image data from |blob_receiver_|. Must outlive |
| + // |blob_receiver_|. |
| + BlobImageSerializationProcessor blob_image_processor_; |
| + |
| + std::unique_ptr<BlobChannelReceiver> blob_receiver_; |
| + |
| base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); |