| 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/browser/render_view_host.h" | 10 #include "content/public/browser/render_view_host.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 return found->second.document_url; | 119 return found->second.document_url; |
| 120 } | 120 } |
| 121 | 121 |
| 122 GURL BrowserPpapiHostImpl::GetPluginURLForInstance(PP_Instance instance) { | 122 GURL BrowserPpapiHostImpl::GetPluginURLForInstance(PP_Instance instance) { |
| 123 InstanceMap::const_iterator found = instance_map_.find(instance); | 123 InstanceMap::const_iterator found = instance_map_.find(instance); |
| 124 if (found == instance_map_.end()) | 124 if (found == instance_map_.end()) |
| 125 return GURL(); | 125 return GURL(); |
| 126 return found->second.plugin_url; | 126 return found->second.plugin_url; |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool BrowserPpapiHostImpl::IsInProcess() const { |
| 130 return in_process(); |
| 131 } |
| 132 |
| 129 void BrowserPpapiHostImpl::AddInstance( | 133 void BrowserPpapiHostImpl::AddInstance( |
| 130 PP_Instance instance, | 134 PP_Instance instance, |
| 131 const PepperRendererInstanceData& instance_data) { | 135 const PepperRendererInstanceData& instance_data) { |
| 132 DCHECK(instance_map_.find(instance) == instance_map_.end()); | 136 DCHECK(instance_map_.find(instance) == instance_map_.end()); |
| 133 instance_map_[instance] = instance_data; | 137 instance_map_[instance] = instance_data; |
| 134 } | 138 } |
| 135 | 139 |
| 136 void BrowserPpapiHostImpl::DeleteInstance(PP_Instance instance) { | 140 void BrowserPpapiHostImpl::DeleteInstance(PP_Instance instance) { |
| 137 InstanceMap::iterator found = instance_map_.find(instance); | 141 InstanceMap::iterator found = instance_map_.find(instance); |
| 138 if (found == instance_map_.end()) { | 142 if (found == instance_map_.end()) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 158 */ | 162 */ |
| 159 return ppapi_host_->OnMessageReceived(msg); | 163 return ppapi_host_->OnMessageReceived(msg); |
| 160 } | 164 } |
| 161 | 165 |
| 162 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() { | 166 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() { |
| 163 DCHECK(ppapi_host_); | 167 DCHECK(ppapi_host_); |
| 164 ppapi_host_ = NULL; | 168 ppapi_host_ = NULL; |
| 165 } | 169 } |
| 166 | 170 |
| 167 } // namespace content | 171 } // namespace content |
| OLD | NEW |