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/browser/renderer_host/pepper/browser_ppapi_host_impl.h" | 5 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
6 | 6 |
7 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" | 7 #include "content/browser/renderer_host/pepper/pepper_message_filter.h" |
8 #include "content/browser/tracing/trace_message_filter.h" | 8 #include "content/browser/tracing/trace_message_filter.h" |
9 #include "content/common/pepper_renderer_instance_data.h" | 9 #include "content/common/pepper_renderer_instance_data.h" |
10 #include "content/public/common/process_type.h" | 10 #include "content/public/common/process_type.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // their pointers to us to be valid. | 69 // their pointers to us to be valid. |
70 ppapi_host_.reset(); | 70 ppapi_host_.reset(); |
71 } | 71 } |
72 | 72 |
73 ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() { | 73 ppapi::host::PpapiHost* BrowserPpapiHostImpl::GetPpapiHost() { |
74 return ppapi_host_.get(); | 74 return ppapi_host_.get(); |
75 } | 75 } |
76 | 76 |
77 base::ProcessHandle BrowserPpapiHostImpl::GetPluginProcessHandle() const { | 77 base::ProcessHandle BrowserPpapiHostImpl::GetPluginProcessHandle() const { |
78 // Handle should previously have been set before use. | 78 // Handle should previously have been set before use. |
79 DCHECK(plugin_process_handle_ != base::kNullProcessHandle); | 79 DCHECK(in_process_ || plugin_process_handle_ != base::kNullProcessHandle); |
80 return plugin_process_handle_; | 80 return plugin_process_handle_; |
81 } | 81 } |
82 | 82 |
83 bool BrowserPpapiHostImpl::IsValidInstance(PP_Instance instance) const { | 83 bool BrowserPpapiHostImpl::IsValidInstance(PP_Instance instance) const { |
84 return instance_map_.find(instance) != instance_map_.end(); | 84 return instance_map_.find(instance) != instance_map_.end(); |
85 } | 85 } |
86 | 86 |
87 bool BrowserPpapiHostImpl::GetRenderFrameIDsForInstance( | 87 bool BrowserPpapiHostImpl::GetRenderFrameIDsForInstance( |
88 PP_Instance instance, | 88 PP_Instance instance, |
89 int* render_process_id, | 89 int* render_process_id, |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 instance_data[i].render_process_id = instance->second.render_process_id; | 204 instance_data[i].render_process_id = instance->second.render_process_id; |
205 instance_data[i].render_frame_id = instance->second.render_frame_id; | 205 instance_data[i].render_frame_id = instance->second.render_frame_id; |
206 instance_data[i].document_url = instance->second.document_url; | 206 instance_data[i].document_url = instance->second.document_url; |
207 ++instance; | 207 ++instance; |
208 ++i; | 208 ++i; |
209 } | 209 } |
210 on_keepalive_callback_.Run(instance_data, profile_data_directory_); | 210 on_keepalive_callback_.Run(instance_data, profile_data_directory_); |
211 } | 211 } |
212 | 212 |
213 } // namespace content | 213 } // namespace content |
OLD | NEW |