| 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/renderer_ppapi_host_impl.h" | 5 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 blink::WebPluginContainer* RendererPpapiHostImpl::GetContainerForInstance( | 169 blink::WebPluginContainer* RendererPpapiHostImpl::GetContainerForInstance( |
| 170 PP_Instance instance) const { | 170 PP_Instance instance) const { |
| 171 PepperPluginInstanceImpl* instance_object = GetAndValidateInstance(instance); | 171 PepperPluginInstanceImpl* instance_object = GetAndValidateInstance(instance); |
| 172 if (!instance_object) | 172 if (!instance_object) |
| 173 return NULL; | 173 return NULL; |
| 174 return instance_object->container(); | 174 return instance_object->container(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 base::ProcessId RendererPpapiHostImpl::GetPluginPID() const { | 177 base::ProcessId RendererPpapiHostImpl::GetPluginPID() const { |
| 178 if (dispatcher_) | 178 if (dispatcher_) |
| 179 return dispatcher_->channel()->peer_pid(); | 179 return dispatcher_->channel()->GetPeerPID(); |
| 180 return base::kNullProcessId; | 180 return base::kNullProcessId; |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool RendererPpapiHostImpl::HasUserGesture(PP_Instance instance) const { | 183 bool RendererPpapiHostImpl::HasUserGesture(PP_Instance instance) const { |
| 184 PepperPluginInstanceImpl* instance_object = GetAndValidateInstance(instance); | 184 PepperPluginInstanceImpl* instance_object = GetAndValidateInstance(instance); |
| 185 if (!instance_object) | 185 if (!instance_object) |
| 186 return false; | 186 return false; |
| 187 | 187 |
| 188 if (instance_object->module()->permissions().HasPermission( | 188 if (instance_object->module()->permissions().HasPermission( |
| 189 ppapi::PERMISSION_BYPASS_USER_GESTURE)) | 189 ppapi::PERMISSION_BYPASS_USER_GESTURE)) |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 PepperPluginInstanceImpl* instance = | 271 PepperPluginInstanceImpl* instance = |
| 272 HostGlobals::Get()->GetInstance(pp_instance); | 272 HostGlobals::Get()->GetInstance(pp_instance); |
| 273 if (!instance) | 273 if (!instance) |
| 274 return NULL; | 274 return NULL; |
| 275 if (!instance->IsValidInstanceOf(module_)) | 275 if (!instance->IsValidInstanceOf(module_)) |
| 276 return NULL; | 276 return NULL; |
| 277 return instance; | 277 return instance; |
| 278 } | 278 } |
| 279 | 279 |
| 280 } // namespace content | 280 } // namespace content |
| OLD | NEW |