Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: content/browser/renderer_host/pepper/browser_ppapi_host_impl.cc

Issue 105553005: Make PepperWebPlugin not use RenderViews. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(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::GetRenderViewIDsForInstance( 87 bool BrowserPpapiHostImpl::GetRenderFrameIDsForInstance(
88 PP_Instance instance, 88 PP_Instance instance,
89 int* render_process_id, 89 int* render_process_id,
90 int* render_view_id) const { 90 int* render_frame_id) const {
91 InstanceMap::const_iterator found = instance_map_.find(instance); 91 InstanceMap::const_iterator found = instance_map_.find(instance);
92 if (found == instance_map_.end()) { 92 if (found == instance_map_.end()) {
93 *render_process_id = 0; 93 *render_process_id = 0;
94 *render_view_id = 0; 94 *render_frame_id = 0;
95 return false; 95 return false;
96 } 96 }
97 97
98 *render_process_id = found->second.render_process_id; 98 *render_process_id = found->second.render_process_id;
99 *render_view_id = found->second.render_view_id; 99 *render_frame_id = found->second.render_frame_id;
100 return true; 100 return true;
101 } 101 }
102 102
103 const std::string& BrowserPpapiHostImpl::GetPluginName() { 103 const std::string& BrowserPpapiHostImpl::GetPluginName() {
104 return plugin_name_; 104 return plugin_name_;
105 } 105 }
106 106
107 const base::FilePath& BrowserPpapiHostImpl::GetPluginPath() { 107 const base::FilePath& BrowserPpapiHostImpl::GetPluginPath() {
108 return plugin_path_; 108 return plugin_path_;
109 } 109 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 */ 158 */
159 return ppapi_host_->OnMessageReceived(msg); 159 return ppapi_host_->OnMessageReceived(msg);
160 } 160 }
161 161
162 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() { 162 void BrowserPpapiHostImpl::HostMessageFilter::OnHostDestroyed() {
163 DCHECK(ppapi_host_); 163 DCHECK(ppapi_host_);
164 ppapi_host_ = NULL; 164 ppapi_host_ = NULL;
165 } 165 }
166 166
167 } // namespace content 167 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698