| 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 COMPONENTS_CDM_BROWSER_CDM_MESSAGE_FILTER_ANDROID_H_ | 5 #ifndef COMPONENTS_CDM_BROWSER_CDM_MESSAGE_FILTER_ANDROID_H_ |
| 6 #define COMPONENTS_CDM_BROWSER_CDM_MESSAGE_FILTER_ANDROID_H_ | 6 #define COMPONENTS_CDM_BROWSER_CDM_MESSAGE_FILTER_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "content/public/browser/browser_message_filter.h" | 9 #include "content/public/browser/browser_message_filter.h" |
| 10 | 10 |
| 11 struct SupportedKeySystemRequest; | 11 struct SupportedKeySystemRequest; |
| 12 struct SupportedKeySystemResponse; | 12 struct SupportedKeySystemResponse; |
| 13 | 13 |
| 14 namespace cdm { | 14 namespace cdm { |
| 15 | 15 |
| 16 // Message filter for EME on android. It is responsible for getting the | 16 // Message filter for EME on android. It is responsible for getting the |
| 17 // SupportedKeySystems information and passing it back to renderer. | 17 // SupportedKeySystems information and passing it back to renderer. |
| 18 class CdmMessageFilterAndroid | 18 class CdmMessageFilterAndroid |
| 19 : public content::BrowserMessageFilter { | 19 : public content::BrowserMessageFilter { |
| 20 public: | 20 public: |
| 21 CdmMessageFilterAndroid(); | 21 CdmMessageFilterAndroid(); |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 virtual ~CdmMessageFilterAndroid(); | 24 virtual ~CdmMessageFilterAndroid(); |
| 25 | 25 |
| 26 // BrowserMessageFilter implementation. | 26 // BrowserMessageFilter implementation. |
| 27 virtual bool OnMessageReceived(const IPC::Message& message, | 27 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 28 bool* message_was_ok) OVERRIDE; | |
| 29 virtual void OverrideThreadForMessage( | 28 virtual void OverrideThreadForMessage( |
| 30 const IPC::Message& message, | 29 const IPC::Message& message, |
| 31 content::BrowserThread::ID* thread) OVERRIDE; | 30 content::BrowserThread::ID* thread) OVERRIDE; |
| 32 | 31 |
| 33 // Retrieve the supported key systems. | 32 // Retrieve the supported key systems. |
| 34 void OnGetSupportedKeySystems( | 33 void OnGetSupportedKeySystems( |
| 35 const SupportedKeySystemRequest& request, | 34 const SupportedKeySystemRequest& request, |
| 36 SupportedKeySystemResponse* response); | 35 SupportedKeySystemResponse* response); |
| 37 | 36 |
| 38 DISALLOW_COPY_AND_ASSIGN(CdmMessageFilterAndroid); | 37 DISALLOW_COPY_AND_ASSIGN(CdmMessageFilterAndroid); |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 } // namespace cdm | 40 } // namespace cdm |
| 42 | 41 |
| 43 #endif // COMPONENTS_CDM_BROWSER_CDM_MESSAGE_FILTER_ANDROID_H_ | 42 #endif // COMPONENTS_CDM_BROWSER_CDM_MESSAGE_FILTER_ANDROID_H_ |
| OLD | NEW |