| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_ | 5 #ifndef BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_ |
| 6 #define BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_ | 6 #define BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/public/renderer/content_renderer_client.h" | 10 #include "content/public/renderer/content_renderer_client.h" |
| 11 | 11 |
| 12 namespace web_cache { | 12 namespace web_cache { |
| 13 class WebCacheRenderProcessObserver; | 13 class WebCacheRenderProcessObserver; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace blimp { | 16 namespace blimp { |
| 17 class BlimpImageSerializationProcessor; | 17 class BlimpImageSerializationProcessor; |
| 18 | 18 |
| 19 namespace engine { | 19 namespace engine { |
| 20 | 20 |
| 21 class BlimpContentRendererClient : public content::ContentRendererClient { | 21 class BlimpContentRendererClient : public content::ContentRendererClient { |
| 22 public: | 22 public: |
| 23 BlimpContentRendererClient(scoped_ptr<BlimpImageSerializationProcessor> | 23 BlimpContentRendererClient(); |
| 24 image_serialization_processor); | |
| 25 ~BlimpContentRendererClient() override; | 24 ~BlimpContentRendererClient() override; |
| 26 | 25 |
| 27 // content::ContentRendererClient implementation. | 26 // content::ContentRendererClient implementation. |
| 28 void RenderThreadStarted() override; | 27 void RenderThreadStarted() override; |
| 29 cc::ImageSerializationProcessor* GetImageSerializationProcessor() override; | 28 cc::ImageSerializationProcessor* GetImageSerializationProcessor() override; |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 // This observer manages the process-global web cache. | 31 // This observer manages the process-global web cache. |
| 33 scoped_ptr<web_cache::WebCacheRenderProcessObserver> web_cache_observer_; | 32 scoped_ptr<web_cache::WebCacheRenderProcessObserver> web_cache_observer_; |
| 34 | 33 |
| 35 // Provides the functionality to serialize images in SkPicture. | 34 // Provides the functionality to serialize images in SkPicture. |
| 36 scoped_ptr<BlimpImageSerializationProcessor> image_serialization_processor_; | 35 scoped_ptr<cc::ImageSerializationProcessor> image_serialization_processor_; |
| 37 | 36 |
| 38 DISALLOW_COPY_AND_ASSIGN(BlimpContentRendererClient); | 37 DISALLOW_COPY_AND_ASSIGN(BlimpContentRendererClient); |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 } // namespace engine | 40 } // namespace engine |
| 42 } // namespace blimp | 41 } // namespace blimp |
| 43 | 42 |
| 44 #endif // BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_ | 43 #endif // BLIMP_ENGINE_APP_BLIMP_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |