| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/base64.h" | 8 #include "base/base64.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "ui/gfx/gl/gl_surface.h" | 42 #include "ui/gfx/gl/gl_surface.h" |
| 43 #include "webkit/appcache/web_application_cache_host_impl.h" | 43 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 44 #include "webkit/glue/media/video_renderer_impl.h" | 44 #include "webkit/glue/media/video_renderer_impl.h" |
| 45 #include "webkit/glue/webkit_constants.h" | 45 #include "webkit/glue/webkit_constants.h" |
| 46 #include "webkit/glue/webkit_glue.h" | 46 #include "webkit/glue/webkit_glue.h" |
| 47 #include "webkit/glue/webkitclient_impl.h" | 47 #include "webkit/glue/webkitclient_impl.h" |
| 48 #include "webkit/glue/webmediaplayer_impl.h" | 48 #include "webkit/glue/webmediaplayer_impl.h" |
| 49 #include "webkit/plugins/npapi/plugin_list.h" | 49 #include "webkit/plugins/npapi/plugin_list.h" |
| 50 #include "webkit/plugins/npapi/webplugin_impl.h" | 50 #include "webkit/plugins/npapi/webplugin_impl.h" |
| 51 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | 51 #include "webkit/plugins/npapi/webplugin_page_delegate.h" |
| 52 #include "webkit/plugins/npapi/webplugininfo.h" | 52 #include "webkit/plugins/webplugininfo.h" |
| 53 #include "webkit/support/platform_support.h" | 53 #include "webkit/support/platform_support.h" |
| 54 #include "webkit/support/simple_database_system.h" | 54 #include "webkit/support/simple_database_system.h" |
| 55 #include "webkit/support/test_webplugin_page_delegate.h" | 55 #include "webkit/support/test_webplugin_page_delegate.h" |
| 56 #include "webkit/support/test_webkit_client.h" | 56 #include "webkit/support/test_webkit_client.h" |
| 57 #include "webkit/tools/test_shell/simple_file_system.h" | 57 #include "webkit/tools/test_shell/simple_file_system.h" |
| 58 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" | 58 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" |
| 59 | 59 |
| 60 using WebKit::WebCString; | 60 using WebKit::WebCString; |
| 61 using WebKit::WebDevToolsAgentClient; | 61 using WebKit::WebDevToolsAgentClient; |
| 62 using WebKit::WebFileSystem; | 62 using WebKit::WebFileSystem; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 275 } |
| 276 | 276 |
| 277 WebKit::WebKitClient* GetWebKitClient() { | 277 WebKit::WebKitClient* GetWebKitClient() { |
| 278 DCHECK(test_environment); | 278 DCHECK(test_environment); |
| 279 return test_environment->webkit_client(); | 279 return test_environment->webkit_client(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 WebPlugin* CreateWebPlugin(WebFrame* frame, | 282 WebPlugin* CreateWebPlugin(WebFrame* frame, |
| 283 const WebPluginParams& params) { | 283 const WebPluginParams& params) { |
| 284 const bool kAllowWildcard = true; | 284 const bool kAllowWildcard = true; |
| 285 std::vector<webkit::npapi::WebPluginInfo> plugins; | 285 std::vector<webkit::WebPluginInfo> plugins; |
| 286 std::vector<std::string> mime_types; | 286 std::vector<std::string> mime_types; |
| 287 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( | 287 webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( |
| 288 params.url, params.mimeType.utf8(), kAllowWildcard, | 288 params.url, params.mimeType.utf8(), kAllowWildcard, |
| 289 NULL, &plugins, &mime_types); | 289 NULL, &plugins, &mime_types); |
| 290 if (plugins.empty()) | 290 if (plugins.empty()) |
| 291 return NULL; | 291 return NULL; |
| 292 | 292 |
| 293 return new WebPluginImplWithPageDelegate( | 293 return new WebPluginImplWithPageDelegate( |
| 294 frame, params, plugins.front().path, mime_types.front()); | 294 frame, params, plugins.front().path, mime_types.front()); |
| 295 } | 295 } |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 test_environment->webkit_client()->fileSystem()); | 611 test_environment->webkit_client()->fileSystem()); |
| 612 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); | 612 fileSystem->OpenFileSystem(frame, type, size, create, callbacks); |
| 613 } | 613 } |
| 614 | 614 |
| 615 // Timers | 615 // Timers |
| 616 double GetForegroundTabTimerInterval() { | 616 double GetForegroundTabTimerInterval() { |
| 617 return webkit_glue::kForegroundTabTimerInterval; | 617 return webkit_glue::kForegroundTabTimerInterval; |
| 618 } | 618 } |
| 619 | 619 |
| 620 } // namespace webkit_support | 620 } // namespace webkit_support |
| OLD | NEW |