| 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_context.h" | 7 #include "app/gfx/gl/gl_context.h" |
| 8 #include "app/gfx/gl/gl_implementation.h" | 8 #include "app/gfx/gl/gl_implementation.h" |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 return test_environment->webkit_client(); | 246 return test_environment->webkit_client(); |
| 247 } | 247 } |
| 248 | 248 |
| 249 WebPlugin* CreateWebPlugin(WebFrame* frame, | 249 WebPlugin* CreateWebPlugin(WebFrame* frame, |
| 250 const WebPluginParams& params) { | 250 const WebPluginParams& params) { |
| 251 const bool kAllowWildcard = true; | 251 const bool kAllowWildcard = true; |
| 252 webkit::npapi::WebPluginInfo info; | 252 webkit::npapi::WebPluginInfo info; |
| 253 std::string actual_mime_type; | 253 std::string actual_mime_type; |
| 254 if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( | 254 if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo( |
| 255 params.url, params.mimeType.utf8(), kAllowWildcard, &info, | 255 params.url, params.mimeType.utf8(), kAllowWildcard, &info, |
| 256 &actual_mime_type) || !info.enabled) { | 256 &actual_mime_type) || !webkit::npapi::IsPluginEnabled(info)) { |
| 257 return NULL; | 257 return NULL; |
| 258 } | 258 } |
| 259 | 259 |
| 260 return new WebPluginImplWithPageDelegate( | 260 return new WebPluginImplWithPageDelegate( |
| 261 frame, params, info.path, actual_mime_type); | 261 frame, params, info.path, actual_mime_type); |
| 262 } | 262 } |
| 263 | 263 |
| 264 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, | 264 WebKit::WebMediaPlayer* CreateMediaPlayer(WebFrame* frame, |
| 265 WebMediaPlayerClient* client) { | 265 WebMediaPlayerClient* client) { |
| 266 scoped_ptr<media::MessageLoopFactory> message_loop_factory( | 266 scoped_ptr<media::MessageLoopFactory> message_loop_factory( |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 541 |
| 542 // FileSystem | 542 // FileSystem |
| 543 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, | 543 void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type, |
| 544 long long size, bool create, WebFileSystemCallbacks* callbacks) { | 544 long long size, bool create, WebFileSystemCallbacks* callbacks) { |
| 545 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( | 545 SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>( |
| 546 test_environment->webkit_client()->fileSystem()); | 546 test_environment->webkit_client()->fileSystem()); |
| 547 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 547 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
| 548 } | 548 } |
| 549 | 549 |
| 550 } // namespace webkit_support | 550 } // namespace webkit_support |
| OLD | NEW |