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

Side by Side Diff: content/plugin/webplugin_delegate_stub.cc

Issue 19844003: Remove webkit/plugins/npapi. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: remove GetDefaultWindowParent Created 7 years, 5 months 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/plugin/webplugin_delegate_stub.h" 5 #include "content/plugin/webplugin_delegate_stub.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 175 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
176 base::FilePath path = 176 base::FilePath path =
177 command_line.GetSwitchValuePath(switches::kPluginPath); 177 command_line.GetSwitchValuePath(switches::kPluginPath);
178 178
179 webplugin_ = new WebPluginProxy(channel_.get(), 179 webplugin_ = new WebPluginProxy(channel_.get(),
180 instance_id_, 180 instance_id_,
181 page_url_, 181 page_url_,
182 params.host_render_view_routing_id); 182 params.host_render_view_routing_id);
183 delegate_ = WebPluginDelegateImpl::Create(path, mime_type_); 183 delegate_ = WebPluginDelegateImpl::Create(path, mime_type_);
184 if (delegate_) { 184 if (delegate_) {
185 if (delegate_->GetQuirks() &
186 WebPluginDelegateImpl::PLUGIN_QUIRK_DIE_AFTER_UNLOAD) {
187 PluginThread::current()->SetForcefullyTerminatePluginProcess();
188 }
189
185 webplugin_->set_delegate(delegate_); 190 webplugin_->set_delegate(delegate_);
186 std::vector<std::string> arg_names = params.arg_names; 191 std::vector<std::string> arg_names = params.arg_names;
187 std::vector<std::string> arg_values = params.arg_values; 192 std::vector<std::string> arg_values = params.arg_values;
188 193
189 // Register the plugin as a valid object owner. 194 // Register the plugin as a valid object owner.
190 WebBindings::registerObjectOwner(delegate_->GetPluginNPP()); 195 WebBindings::registerObjectOwner(delegate_->GetPluginNPP());
191 196
192 // Add an NPObject owner mapping for this instance, to support ownership 197 // Add an NPObject owner mapping for this instance, to support ownership
193 // tracking in the renderer. 198 // tracking in the renderer.
194 channel_->AddMappingForNPObjectOwner(instance_id_, 199 channel_->AddMappingForNPObjectOwner(instance_id_,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 } 416 }
412 417
413 void WebPluginDelegateStub::OnHTTPRangeRequestReply( 418 void WebPluginDelegateStub::OnHTTPRangeRequestReply(
414 unsigned long resource_id, int range_request_id) { 419 unsigned long resource_id, int range_request_id) {
415 WebPluginResourceClient* resource_client = 420 WebPluginResourceClient* resource_client =
416 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); 421 delegate_->CreateSeekableResourceClient(resource_id, range_request_id);
417 webplugin_->OnResourceCreated(resource_id, resource_client); 422 webplugin_->OnResourceCreated(resource_id, resource_client);
418 } 423 }
419 424
420 } // namespace content 425 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698