pepper_output_protection_message_filter.h revision 0f1bc08d4cfcc34181b0b5cbf065c40f687bf740
1// Copyright 2013 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 CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_MESSAGE_FILTER_H_ 6#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_MESSAGE_FILTER_H_ 7 8#include "ppapi/c/pp_instance.h" 9#include "ppapi/host/resource_message_filter.h" 10 11#if defined(OS_CHROMEOS) 12#include "chromeos/display/output_configurator.h" 13#endif 14 15namespace content { 16class BrowserPpapiHost; 17} // namespace content 18 19namespace ppapi { 20namespace host { 21struct HostMessageContext; 22} // namespace host 23} // namespace ppapi 24 25namespace chrome { 26 27class PepperOutputProtectionMessageFilter 28 : public ppapi::host::ResourceMessageFilter { 29 public: 30 PepperOutputProtectionMessageFilter(content::BrowserPpapiHost* host, 31 PP_Instance instance); 32 33 private: 34#if defined(OS_CHROMEOS) 35 class Delegate; 36#endif 37 38 // ppapi::host::ResourceMessageFilter overrides. 39 virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( 40 const IPC::Message& msg) OVERRIDE; 41 virtual int32_t OnResourceMessageReceived( 42 const IPC::Message& msg, 43 ppapi::host::HostMessageContext* context) OVERRIDE; 44 45 virtual ~PepperOutputProtectionMessageFilter(); 46 47 int32_t OnQueryStatus(ppapi::host::HostMessageContext* context); 48 int32_t OnEnableProtection(ppapi::host::HostMessageContext* context, 49 uint32_t desired_method_mask); 50 51#if defined(OS_CHROMEOS) 52 // Delegator. Should be deleted in UI thread. 53 Delegate* delegate_; 54#endif 55 56 DISALLOW_COPY_AND_ASSIGN(PepperOutputProtectionMessageFilter); 57}; 58 59} // namespace chrome 60 61#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_OUTPUT_PROTECTION_MESSAGE_FILTER_H_ 62