| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4059 const FilePath& path, | 4059 const FilePath& path, |
| 4060 pepper::PluginModule* pepper_module) { | 4060 pepper::PluginModule* pepper_module) { |
| 4061 return new pepper::WebPluginImpl( | 4061 return new pepper::WebPluginImpl( |
| 4062 pepper_module, params, pepper_delegate_.AsWeakPtr()); | 4062 pepper_module, params, pepper_delegate_.AsWeakPtr()); |
| 4063 } | 4063 } |
| 4064 | 4064 |
| 4065 WebPlugin* RenderView::CreateNPAPIPlugin(WebFrame* frame, | 4065 WebPlugin* RenderView::CreateNPAPIPlugin(WebFrame* frame, |
| 4066 const WebPluginParams& params, | 4066 const WebPluginParams& params, |
| 4067 const FilePath& path, | 4067 const FilePath& path, |
| 4068 const std::string& mime_type) { | 4068 const std::string& mime_type) { |
| 4069 std::string actual_mime_type(mime_type); | 4069 return new webkit_glue::WebPluginImpl( |
| 4070 if (actual_mime_type.empty()) | 4070 frame, params, path, mime_type, AsWeakPtr()); |
| 4071 actual_mime_type = params.mimeType.utf8(); | |
| 4072 | |
| 4073 return new webkit_glue::WebPluginImpl(frame, params, path, | |
| 4074 actual_mime_type, AsWeakPtr()); | |
| 4075 } | 4071 } |
| 4076 | 4072 |
| 4077 WebPlugin* RenderView::CreateOutdatedPluginPlaceholder( | 4073 WebPlugin* RenderView::CreateOutdatedPluginPlaceholder( |
| 4078 WebFrame* frame, | 4074 WebFrame* frame, |
| 4079 const WebPluginParams& params, | 4075 const WebPluginParams& params, |
| 4080 PluginGroup* group) { | 4076 PluginGroup* group) { |
| 4081 int resource_id = IDR_OUTDATED_PLUGIN_HTML; | 4077 int resource_id = IDR_OUTDATED_PLUGIN_HTML; |
| 4082 const base::StringPiece template_html( | 4078 const base::StringPiece template_html( |
| 4083 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); | 4079 ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); |
| 4084 | 4080 |
| (...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5993 } | 5989 } |
| 5994 | 5990 |
| 5995 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, | 5991 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, |
| 5996 IPC::PlatformFileForTransit file_for_transit, | 5992 IPC::PlatformFileForTransit file_for_transit, |
| 5997 int message_id) { | 5993 int message_id) { |
| 5998 pepper_delegate_.OnAsyncFileOpened( | 5994 pepper_delegate_.OnAsyncFileOpened( |
| 5999 error_code, | 5995 error_code, |
| 6000 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), | 5996 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), |
| 6001 message_id); | 5997 message_id); |
| 6002 } | 5998 } |
| OLD | NEW |