| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMECAST_RENDERER_CAST_RENDER_PROCESS_OBSERVER_H_ | 5 #ifndef CHROMECAST_RENDERER_CAST_RENDER_PROCESS_OBSERVER_H_ |
| 6 #define CHROMECAST_RENDERER_CAST_RENDER_PROCESS_OBSERVER_H_ | 6 #define CHROMECAST_RENDERER_CAST_RENDER_PROCESS_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/public/renderer/render_process_observer.h" | 12 #include "content/public/renderer/render_process_observer.h" |
| 13 | 13 |
| 14 namespace IPC { | |
| 15 class MessageFilter; | |
| 16 } | |
| 17 | |
| 18 namespace chromecast { | 14 namespace chromecast { |
| 19 class CapabilitiesMessageFilter; | 15 class CapabilitiesMessageFilter; |
| 20 namespace media { | 16 namespace media { |
| 21 class CmaMessageFilterProxy; | 17 class CmaMessageFilterProxy; |
| 22 } | 18 } |
| 23 | 19 |
| 24 namespace shell { | 20 namespace shell { |
| 25 | 21 |
| 26 class CastRenderProcessObserver : public content::RenderProcessObserver { | 22 class CastRenderProcessObserver : public content::RenderProcessObserver { |
| 27 public: | 23 public: |
| 28 CastRenderProcessObserver( | 24 CastRenderProcessObserver(); |
| 29 const std::vector<scoped_refptr<IPC::MessageFilter>>& | |
| 30 platform_message_filters); | |
| 31 ~CastRenderProcessObserver() override; | 25 ~CastRenderProcessObserver() override; |
| 32 | 26 |
| 33 private: | 27 private: |
| 34 // content::RenderProcessObserver implementation: | 28 // content::RenderProcessObserver implementation: |
| 35 void OnRenderProcessShutdown() override; | 29 void OnRenderProcessShutdown() override; |
| 36 | 30 |
| 37 void CreateCustomFilters(); | 31 void CreateCustomFilters(); |
| 38 | 32 |
| 39 #if !defined(OS_ANDROID) | 33 #if !defined(OS_ANDROID) |
| 40 scoped_refptr<media::CmaMessageFilterProxy> cma_message_filter_proxy_; | 34 scoped_refptr<media::CmaMessageFilterProxy> cma_message_filter_proxy_; |
| 41 #endif // !defined(OS_ANDROID) | 35 #endif // !defined(OS_ANDROID) |
| 42 scoped_refptr<CapabilitiesMessageFilter> capabilities_message_filter_; | 36 scoped_refptr<CapabilitiesMessageFilter> capabilities_message_filter_; |
| 43 std::vector<scoped_refptr<IPC::MessageFilter>> platform_message_filters_; | |
| 44 | 37 |
| 45 DISALLOW_COPY_AND_ASSIGN(CastRenderProcessObserver); | 38 DISALLOW_COPY_AND_ASSIGN(CastRenderProcessObserver); |
| 46 }; | 39 }; |
| 47 | 40 |
| 48 } // namespace shell | 41 } // namespace shell |
| 49 } // namespace chromecast | 42 } // namespace chromecast |
| 50 | 43 |
| 51 #endif // CHROMECAST_RENDERER_CAST_RENDER_PROCESS_OBSERVER_H_ | 44 #endif // CHROMECAST_RENDERER_CAST_RENDER_PROCESS_OBSERVER_H_ |
| OLD | NEW |