| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2171 | 2171 |
| 2172 PP_Var PepperPluginInstanceImpl::GetDefaultCharSet(PP_Instance instance) { | 2172 PP_Var PepperPluginInstanceImpl::GetDefaultCharSet(PP_Instance instance) { |
| 2173 return StringVar::StringToPPVar( | 2173 return StringVar::StringToPPVar( |
| 2174 render_view_->webkit_preferences().default_encoding); | 2174 render_view_->webkit_preferences().default_encoding); |
| 2175 } | 2175 } |
| 2176 | 2176 |
| 2177 // These PPB_ContentDecryptor_Private calls are responses to | 2177 // These PPB_ContentDecryptor_Private calls are responses to |
| 2178 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|. | 2178 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|. |
| 2179 // Therefore, |content_decryptor_delegate_| must have been initialized when | 2179 // Therefore, |content_decryptor_delegate_| must have been initialized when |
| 2180 // the following methods are called. | 2180 // the following methods are called. |
| 2181 void PepperPluginInstanceImpl::NeedKey(PP_Instance instance, | |
| 2182 PP_Var key_system_var, | |
| 2183 PP_Var session_id_var, | |
| 2184 PP_Var init_data_var) { | |
| 2185 content_decryptor_delegate_->NeedKey( | |
| 2186 key_system_var, session_id_var, init_data_var); | |
| 2187 } | |
| 2188 | |
| 2189 void PepperPluginInstanceImpl::KeyAdded(PP_Instance instance, | 2181 void PepperPluginInstanceImpl::KeyAdded(PP_Instance instance, |
| 2190 PP_Var key_system_var, | 2182 PP_Var key_system_var, |
| 2191 PP_Var session_id_var) { | 2183 PP_Var session_id_var) { |
| 2192 content_decryptor_delegate_->KeyAdded(key_system_var, session_id_var); | 2184 content_decryptor_delegate_->KeyAdded(key_system_var, session_id_var); |
| 2193 } | 2185 } |
| 2194 | 2186 |
| 2195 void PepperPluginInstanceImpl::KeyMessage(PP_Instance instance, | 2187 void PepperPluginInstanceImpl::KeyMessage(PP_Instance instance, |
| 2196 PP_Var key_system_var, | 2188 PP_Var key_system_var, |
| 2197 PP_Var session_id_var, | 2189 PP_Var session_id_var, |
| 2198 PP_Var message_var, | 2190 PP_Var message_var, |
| (...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2967 // Running out-of-process. Initiate an IPC call to notify the plugin | 2959 // Running out-of-process. Initiate an IPC call to notify the plugin |
| 2968 // process. | 2960 // process. |
| 2969 ppapi::proxy::HostDispatcher* dispatcher = | 2961 ppapi::proxy::HostDispatcher* dispatcher = |
| 2970 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 2962 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
| 2971 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 2963 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
| 2972 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 2964 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
| 2973 } | 2965 } |
| 2974 } | 2966 } |
| 2975 | 2967 |
| 2976 } // namespace content | 2968 } // namespace content |
| OLD | NEW |