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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "app/gfx/gl/gl_implementation.h" | 7 #include "app/gfx/gl/gl_implementation.h" |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 const WebPluginParams& params) { | 249 const WebPluginParams& params) { |
250 const bool kAllowWildcard = true; | 250 const bool kAllowWildcard = true; |
251 WebPluginInfo info; | 251 WebPluginInfo info; |
252 std::string actual_mime_type; | 252 std::string actual_mime_type; |
253 if (!NPAPI::PluginList::Singleton()->GetPluginInfo( | 253 if (!NPAPI::PluginList::Singleton()->GetPluginInfo( |
254 params.url, params.mimeType.utf8(), kAllowWildcard, &info, | 254 params.url, params.mimeType.utf8(), kAllowWildcard, &info, |
255 &actual_mime_type) || !info.enabled) { | 255 &actual_mime_type) || !info.enabled) { |
256 return NULL; | 256 return NULL; |
257 } | 257 } |
258 | 258 |
259 if (actual_mime_type.empty()) | |
260 actual_mime_type = params.mimeType.utf8(); | |
261 | |
262 return new WebPluginImplWithPageDelegate( | 259 return new WebPluginImplWithPageDelegate( |
263 frame, params, info.path, actual_mime_type); | 260 frame, params, info.path, actual_mime_type); |
264 } | 261 } |
265 | 262 |
266 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, | 263 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, |
267 WebMediaPlayerClient* client) { | 264 WebMediaPlayerClient* client) { |
268 scoped_refptr<media::FilterFactoryCollection> factory = | 265 scoped_refptr<media::FilterFactoryCollection> factory = |
269 new media::FilterFactoryCollection(); | 266 new media::FilterFactoryCollection(); |
270 | 267 |
271 appcache::WebApplicationCacheHostImpl* appcache_host = | 268 appcache::WebApplicationCacheHostImpl* appcache_host = |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 if (!webkit_glue::GetExeDirectory(&dirExe)) { | 529 if (!webkit_glue::GetExeDirectory(&dirExe)) { |
533 DCHECK(false); | 530 DCHECK(false); |
534 return WebURL(); | 531 return WebURL(); |
535 } | 532 } |
536 FilePath devToolsPath = dirExe.AppendASCII( | 533 FilePath devToolsPath = dirExe.AppendASCII( |
537 "resources/inspector/devtools.html"); | 534 "resources/inspector/devtools.html"); |
538 return net::FilePathToFileURL(devToolsPath); | 535 return net::FilePathToFileURL(devToolsPath); |
539 } | 536 } |
540 | 537 |
541 } // namespace webkit_support | 538 } // namespace webkit_support |
OLD | NEW |