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