| 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/renderer/npapi/webplugin_impl.h" | 5 #include "content/renderer/npapi/webplugin_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 render_view_(render_view), | 546 render_view_(render_view), |
| 547 webframe_(webframe), | 547 webframe_(webframe), |
| 548 delegate_(NULL), | 548 delegate_(NULL), |
| 549 container_(NULL), | 549 container_(NULL), |
| 550 npp_(NULL), | 550 npp_(NULL), |
| 551 plugin_url_(params.url), | 551 plugin_url_(params.url), |
| 552 load_manually_(params.loadManually), | 552 load_manually_(params.loadManually), |
| 553 first_geometry_update_(true), | 553 first_geometry_update_(true), |
| 554 ignore_response_error_(false), | 554 ignore_response_error_(false), |
| 555 file_path_(file_path), | 555 file_path_(file_path), |
| 556 mime_type_(base::UTF16ToASCII(base::StringPiece16(params.mimeType))), | 556 mime_type_(base::ToLowerASCII(base::UTF16ToASCII( |
| 557 base::StringPiece16(params.mimeType)))), |
| 557 loader_client_(this), | 558 loader_client_(this), |
| 558 weak_factory_(this) { | 559 weak_factory_(this) { |
| 559 DCHECK_EQ(params.attributeNames.size(), params.attributeValues.size()); | 560 DCHECK_EQ(params.attributeNames.size(), params.attributeValues.size()); |
| 560 base::StringToLowerASCII(&mime_type_); | |
| 561 | 561 |
| 562 for (size_t i = 0; i < params.attributeNames.size(); ++i) { | 562 for (size_t i = 0; i < params.attributeNames.size(); ++i) { |
| 563 arg_names_.push_back(params.attributeNames[i].utf8()); | 563 arg_names_.push_back(params.attributeNames[i].utf8()); |
| 564 arg_values_.push_back(params.attributeValues[i].utf8()); | 564 arg_values_.push_back(params.attributeValues[i].utf8()); |
| 565 } | 565 } |
| 566 | 566 |
| 567 // Set subresource URL for crash reporting. | 567 // Set subresource URL for crash reporting. |
| 568 base::debug::SetCrashKeyValue("subresource_url", plugin_url_.spec()); | 568 base::debug::SetCrashKeyValue("subresource_url", plugin_url_.spec()); |
| 569 } | 569 } |
| 570 | 570 |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 case PLUGIN_SRC: | 1542 case PLUGIN_SRC: |
| 1543 webframe_->setReferrerForRequest(*request, plugin_url_); | 1543 webframe_->setReferrerForRequest(*request, plugin_url_); |
| 1544 break; | 1544 break; |
| 1545 | 1545 |
| 1546 default: | 1546 default: |
| 1547 break; | 1547 break; |
| 1548 } | 1548 } |
| 1549 } | 1549 } |
| 1550 | 1550 |
| 1551 } // namespace content | 1551 } // namespace content |
| OLD | NEW |