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 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2256 PP_Var PepperPluginInstanceImpl::GetDefaultCharSet(PP_Instance instance) { | 2256 PP_Var PepperPluginInstanceImpl::GetDefaultCharSet(PP_Instance instance) { |
2257 return StringVar::StringToPPVar( | 2257 return StringVar::StringToPPVar( |
2258 render_view_->webkit_preferences().default_encoding); | 2258 render_view_->webkit_preferences().default_encoding); |
2259 } | 2259 } |
2260 | 2260 |
2261 // These PPB_ContentDecryptor_Private calls are responses to | 2261 // These PPB_ContentDecryptor_Private calls are responses to |
2262 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|. | 2262 // PPP_ContentDecryptor_Private calls made on |content_decryptor_delegate_|. |
2263 // Therefore, |content_decryptor_delegate_| must have been initialized when | 2263 // Therefore, |content_decryptor_delegate_| must have been initialized when |
2264 // the following methods are called. | 2264 // the following methods are called. |
2265 void PepperPluginInstanceImpl::SessionCreated(PP_Instance instance, | 2265 void PepperPluginInstanceImpl::SessionCreated(PP_Instance instance, |
2266 uint32_t reference_id, | 2266 uint32_t session_id, |
2267 PP_Var session_id_var) { | 2267 PP_Var web_session_id_var) { |
2268 content_decryptor_delegate_->OnSessionCreated(reference_id, session_id_var); | 2268 content_decryptor_delegate_->OnSessionCreated(session_id, web_session_id_var); |
2269 } | 2269 } |
2270 | 2270 |
2271 void PepperPluginInstanceImpl::SessionMessage(PP_Instance instance, | 2271 void PepperPluginInstanceImpl::SessionMessage(PP_Instance instance, |
2272 uint32_t reference_id, | 2272 uint32_t session_id, |
2273 PP_Var message_var, | 2273 PP_Var message_var, |
2274 PP_Var destination_url) { | 2274 PP_Var destination_url) { |
2275 content_decryptor_delegate_->OnSessionMessage( | 2275 content_decryptor_delegate_->OnSessionMessage( |
2276 reference_id, message_var, destination_url); | 2276 session_id, message_var, destination_url); |
2277 } | 2277 } |
2278 | 2278 |
2279 void PepperPluginInstanceImpl::SessionReady(PP_Instance instance, | 2279 void PepperPluginInstanceImpl::SessionReady(PP_Instance instance, |
2280 uint32_t reference_id) { | 2280 uint32_t session_id) { |
2281 content_decryptor_delegate_->OnSessionReady(reference_id); | 2281 content_decryptor_delegate_->OnSessionReady(session_id); |
2282 } | 2282 } |
2283 | 2283 |
2284 void PepperPluginInstanceImpl::SessionClosed(PP_Instance instance, | 2284 void PepperPluginInstanceImpl::SessionClosed(PP_Instance instance, |
2285 uint32_t reference_id) { | 2285 uint32_t session_id) { |
2286 content_decryptor_delegate_->OnSessionClosed(reference_id); | 2286 content_decryptor_delegate_->OnSessionClosed(session_id); |
2287 } | 2287 } |
2288 | 2288 |
2289 void PepperPluginInstanceImpl::SessionError(PP_Instance instance, | 2289 void PepperPluginInstanceImpl::SessionError(PP_Instance instance, |
2290 uint32_t reference_id, | 2290 uint32_t session_id, |
2291 int32_t media_error, | 2291 int32_t media_error, |
2292 int32_t system_code) { | 2292 int32_t system_code) { |
2293 content_decryptor_delegate_->OnSessionError( | 2293 content_decryptor_delegate_->OnSessionError( |
2294 reference_id, media_error, system_code); | 2294 session_id, media_error, system_code); |
2295 } | 2295 } |
2296 | 2296 |
2297 void PepperPluginInstanceImpl::DeliverBlock( | 2297 void PepperPluginInstanceImpl::DeliverBlock( |
2298 PP_Instance instance, | 2298 PP_Instance instance, |
2299 PP_Resource decrypted_block, | 2299 PP_Resource decrypted_block, |
2300 const PP_DecryptedBlockInfo* block_info) { | 2300 const PP_DecryptedBlockInfo* block_info) { |
2301 content_decryptor_delegate_->DeliverBlock(decrypted_block, block_info); | 2301 content_decryptor_delegate_->DeliverBlock(decrypted_block, block_info); |
2302 } | 2302 } |
2303 | 2303 |
2304 void PepperPluginInstanceImpl::DecoderInitializeDone( | 2304 void PepperPluginInstanceImpl::DecoderInitializeDone( |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3065 // Running out-of-process. Initiate an IPC call to notify the plugin | 3065 // Running out-of-process. Initiate an IPC call to notify the plugin |
3066 // process. | 3066 // process. |
3067 ppapi::proxy::HostDispatcher* dispatcher = | 3067 ppapi::proxy::HostDispatcher* dispatcher = |
3068 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); | 3068 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); |
3069 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( | 3069 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( |
3070 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); | 3070 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); |
3071 } | 3071 } |
3072 } | 3072 } |
3073 | 3073 |
3074 } // namespace content | 3074 } // namespace content |
OLD | NEW |