| 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/child/npapi/webplugin_delegate_impl.h" | 5 #include "content/child/npapi/webplugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 if (plugin_lib->instance_count() > 1) { | 63 if (plugin_lib->instance_count() > 1) { |
| 64 return false; | 64 return false; |
| 65 } | 65 } |
| 66 } | 66 } |
| 67 | 67 |
| 68 int argc = 0; | 68 int argc = 0; |
| 69 scoped_ptr<char*[]> argn(new char*[arg_names.size()]); | 69 scoped_ptr<char*[]> argn(new char*[arg_names.size()]); |
| 70 scoped_ptr<char*[]> argv(new char*[arg_names.size()]); | 70 scoped_ptr<char*[]> argv(new char*[arg_names.size()]); |
| 71 for (size_t i = 0; i < arg_names.size(); ++i) { | 71 for (size_t i = 0; i < arg_names.size(); ++i) { |
| 72 if (quirks_ & PLUGIN_QUIRK_NO_WINDOWLESS && | 72 if (quirks_ & PLUGIN_QUIRK_NO_WINDOWLESS && |
| 73 LowerCaseEqualsASCII(arg_names[i], "windowlessvideo")) { | 73 base::LowerCaseEqualsASCII(arg_names[i], "windowlessvideo")) { |
| 74 continue; | 74 continue; |
| 75 } | 75 } |
| 76 argn[argc] = const_cast<char*>(arg_names[i].c_str()); | 76 argn[argc] = const_cast<char*>(arg_names[i].c_str()); |
| 77 argv[argc] = const_cast<char*>(arg_values[i].c_str()); | 77 argv[argc] = const_cast<char*>(arg_values[i].c_str()); |
| 78 argc++; | 78 argc++; |
| 79 } | 79 } |
| 80 | 80 |
| 81 creation_succeeded_ = instance_->Start( | 81 creation_succeeded_ = instance_->Start( |
| 82 url, argn.get(), argv.get(), argc, load_manually); | 82 url, argn.get(), argv.get(), argc, load_manually); |
| 83 if (!creation_succeeded_) { | 83 if (!creation_succeeded_) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 resource_id, url, std::string(), notify_id); | 323 resource_id, url, std::string(), notify_id); |
| 324 | 324 |
| 325 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA); | 325 bool copy_stream_data = !!(quirks_ & PLUGIN_QUIRK_COPY_STREAM_DATA); |
| 326 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( | 326 plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( |
| 327 plugin_stream, url, first_party_for_cookies, method, buf, len, | 327 plugin_stream, url, first_party_for_cookies, method, buf, len, |
| 328 referrer, std::string(), notify_redirects, is_plugin_src_load, origin_pid, | 328 referrer, std::string(), notify_redirects, is_plugin_src_load, origin_pid, |
| 329 render_frame_id, render_view_id, resource_id, copy_stream_data)); | 329 render_frame_id, render_view_id, resource_id, copy_stream_data)); |
| 330 } | 330 } |
| 331 | 331 |
| 332 } // namespace content | 332 } // namespace content |
| OLD | NEW |