summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/glue.vcproj1936
-rw-r--r--webkit/glue/media_player_private_impl.cc330
-rw-r--r--webkit/glue/webmediaplayer.h74
-rw-r--r--webkit/glue/webmediaplayer_delegate.h85
-rw-r--r--webkit/glue/webmediaplayer_impl.cc90
-rw-r--r--webkit/glue/webmediaplayer_impl.h71
-rw-r--r--webkit/glue/webmediaplayerclient_impl.cc307
-rw-r--r--webkit/glue/webmediaplayerclient_impl.h101
-rw-r--r--webkit/glue/webview_delegate.h5
9 files changed, 1383 insertions, 1616 deletions
diff --git a/webkit/glue/glue.vcproj b/webkit/glue/glue.vcproj
index 0677fbb..cb20e01 100644
--- a/webkit/glue/glue.vcproj
+++ b/webkit/glue/glue.vcproj
@@ -1,972 +1,964 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="Glue"
- ProjectGUID="{C66B126D-0ECE-4CA2-B6DC-FA780AFBBF09}"
- RootNamespace="glue"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- <ToolFile
- RelativePath=".\devtools\devtools_copy.rules"
- />
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="4"
- InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops;.\glue.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="devtools file copy"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="4"
- InheritedPropertySheets="..\..\build\release.vsprops;.\glue.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="devtools file copy"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="API"
- >
- <File
- RelativePath=".\autofill_form.cc"
- >
- </File>
- <File
- RelativePath=".\autofill_form.h"
- >
- </File>
- <File
- RelativePath=".\context_menu.h"
- >
- </File>
- <File
- RelativePath=".\cpp_bound_class.h"
- >
- </File>
- <File
- RelativePath=".\cpp_variant.h"
- >
- </File>
- <File
- RelativePath=".\dom_operations.h"
- >
- </File>
- <File
- RelativePath=".\form_data.h"
- >
- </File>
- <File
- RelativePath=".\image_decoder.h"
- >
- </File>
- <File
- RelativePath=".\password_form.h"
- >
- </File>
- <File
- RelativePath=".\resource_type.h"
- >
- </File>
- <File
- RelativePath=".\screen_info.h"
- >
- </File>
- <File
- RelativePath=".\webaccessibility.h"
- >
- </File>
- <File
- RelativePath=".\webaccessibilitymanager.h"
- >
- </File>
- <File
- RelativePath=".\webappcachecontext.cc"
- >
- </File>
- <File
- RelativePath=".\webappcachecontext.h"
- >
- </File>
- <File
- RelativePath=".\webdatasource.h"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsagent.h"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsagent_delegate.h"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsclient.h"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsclient_delegate.h"
- >
- </File>
- <File
- RelativePath=".\weberror.h"
- >
- </File>
- <File
- RelativePath=".\webframe.h"
- >
- </File>
- <File
- RelativePath=".\webhistoryitem.h"
- >
- </File>
- <File
- RelativePath=".\webmediaplayer.h"
- >
- </File>
- <File
- RelativePath=".\webmediaplayer_delegate.h"
- >
- </File>
- <File
- RelativePath=".\webplugin.h"
- >
- </File>
- <File
- RelativePath=".\webplugin_delegate.h"
- >
- </File>
- <File
- RelativePath=".\webplugininfo.h"
- >
- </File>
- <File
- RelativePath=".\webpreferences.h"
- >
- </File>
- <File
- RelativePath=".\webresponse.h"
- >
- </File>
- <File
- RelativePath=".\webtextinput.h"
- >
- </File>
- <File
- RelativePath=".\weburlrequest.h"
- >
- </File>
- <File
- RelativePath=".\webview.h"
- >
- </File>
- <File
- RelativePath=".\webview_delegate.h"
- >
- </File>
- <File
- RelativePath=".\webwidget.h"
- >
- </File>
- <File
- RelativePath=".\webwidget_delegate.h"
- >
- </File>
- <File
- RelativePath=".\webworker.h"
- >
- </File>
- <File
- RelativePath=".\webworkerclient.h"
- >
- </File>
- <File
- RelativePath=".\window_open_disposition.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Library"
- >
- <File
- RelativePath=".\alt_404_page_resource_fetcher.cc"
- >
- </File>
- <File
- RelativePath=".\alt_404_page_resource_fetcher.h"
- >
- </File>
- <File
- RelativePath=".\alt_error_page_resource_fetcher.cc"
- >
- </File>
- <File
- RelativePath=".\alt_error_page_resource_fetcher.h"
- >
- </File>
- <File
- RelativePath=".\back_forward_list_client_impl.cc"
- >
- </File>
- <File
- RelativePath=".\back_forward_list_client_impl.h"
- >
- </File>
- <File
- RelativePath=".\chrome_client_impl.cc"
- >
- </File>
- <File
- RelativePath=".\chrome_client_impl.h"
- >
- </File>
- <File
- RelativePath=".\chromium_bridge_impl.cc"
- >
- </File>
- <File
- RelativePath=".\context_menu_client_impl.cc"
- >
- </File>
- <File
- RelativePath=".\context_menu_client_impl.h"
- >
- </File>
- <File
- RelativePath=".\cpp_binding_example.cc"
- >
- </File>
- <File
- RelativePath=".\cpp_bound_class.cc"
- >
- </File>
- <File
- RelativePath=".\cpp_variant.cc"
- >
- </File>
- <File
- RelativePath=".\debugger_bridge.cc"
- >
- </File>
- <File
- RelativePath=".\debugger_bridge.h"
- >
- </File>
- <File
- RelativePath=".\dom_operations.cc"
- >
- </File>
- <File
- RelativePath=".\dom_operations_private.h"
- >
- </File>
- <File
- RelativePath=".\dom_serializer.cc"
- >
- </File>
- <File
- RelativePath=".\dom_serializer.h"
- >
- </File>
- <File
- RelativePath=".\dom_serializer_delegate.h"
- >
- </File>
- <File
- RelativePath=".\dragclient_impl.cc"
- >
- </File>
- <File
- RelativePath=".\dragclient_impl.h"
- >
- </File>
- <File
- RelativePath=".\editor_client_impl.cc"
- >
- </File>
- <File
- RelativePath=".\editor_client_impl.h"
- >
- </File>
- <File
- RelativePath=".\entity_map.cc"
- >
- </File>
- <File
- RelativePath=".\entity_map.h"
- >
- </File>
- <File
- RelativePath=".\event_conversion.cc"
- >
- </File>
- <File
- RelativePath=".\event_conversion.h"
- >
- </File>
- <File
- RelativePath=".\feed_preview.cc"
- >
- </File>
- <File
- RelativePath=".\feed_preview.h"
- >
- </File>
- <File
- RelativePath=".\glue_accessibility_object.cc"
- >
- </File>
- <File
- RelativePath=".\glue_accessibility_object.h"
- >
- </File>
- <File
- RelativePath=".\glue_serialize.cc"
- >
- </File>
- <File
- RelativePath=".\glue_serialize.h"
- >
- </File>
- <File
- RelativePath=".\glue_util.cc"
- >
- </File>
- <File
- RelativePath=".\glue_util.h"
- >
- </File>
- <File
- RelativePath=".\image_decoder.cc"
- >
- </File>
- <File
- RelativePath=".\image_resource_fetcher.cc"
- >
- </File>
- <File
- RelativePath=".\image_resource_fetcher.h"
- >
- </File>
- <File
- RelativePath=".\inspector_client_impl.cc"
- >
- </File>
- <File
- RelativePath=".\inspector_client_impl.h"
- >
- </File>
- <File
- RelativePath=".\localized_strings.cc"
- >
- </File>
- <File
- RelativePath=".\media_player_private_impl.cc"
- >
- </File>
- <File
- RelativePath=".\multipart_response_delegate.cc"
- >
- </File>
- <File
- RelativePath=".\multipart_response_delegate.h"
- >
- </File>
- <File
- RelativePath=".\npruntime_util.cc"
- >
- </File>
- <File
- RelativePath=".\npruntime_util.h"
- >
- </File>
- <File
- RelativePath=".\password_autocomplete_listener.cc"
- >
- </File>
- <File
- RelativePath=".\password_autocomplete_listener.h"
- >
- </File>
- <File
- RelativePath=".\password_form_dom_manager.cc"
- >
- </File>
- <File
- RelativePath=".\password_form_dom_manager.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath=".\resource_fetcher.cc"
- >
- </File>
- <File
- RelativePath=".\resource_fetcher.h"
- >
- </File>
- <File
- RelativePath=".\resource_handle_impl.cc"
- >
- </File>
- <File
- RelativePath=".\resource_loader_bridge.cc"
- >
- </File>
- <File
- RelativePath=".\resource_loader_bridge.h"
- >
- </File>
- <File
- RelativePath=".\scoped_clipboard_writer_glue.h"
- >
- </File>
- <File
- RelativePath=".\searchable_form_data.cc"
- >
- </File>
- <File
- RelativePath=".\searchable_form_data.h"
- >
- </File>
- <File
- RelativePath=".\simple_webmimeregistry_impl.cc"
- >
- </File>
- <File
- RelativePath=".\simple_webmimeregistry_impl.h"
- >
- </File>
- <File
- RelativePath=".\stacking_order_iterator.cc"
- >
- </File>
- <File
- RelativePath=".\stacking_order_iterator.h"
- >
- </File>
- <File
- RelativePath=".\webaccessibilitymanager_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webaccessibilitymanager_impl.h"
- >
- </File>
- <File
- RelativePath=".\webclipboard_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webclipboard_impl.h"
- >
- </File>
- <File
- RelativePath=".\webcursor.cc"
- >
- </File>
- <File
- RelativePath=".\webcursor.h"
- >
- </File>
- <File
- RelativePath=".\webcursor_win.cc"
- >
- </File>
- <File
- RelativePath=".\webdatasource_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webdatasource_impl.h"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsagent_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsagent_impl.h"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsclient_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webdevtoolsclient_impl.h"
- >
- </File>
- <File
- RelativePath=".\webdropdata.cc"
- >
- </File>
- <File
- RelativePath=".\webdropdata.h"
- >
- </File>
- <File
- RelativePath=".\webdropdata_win.cc"
- >
- </File>
- <File
- RelativePath=".\weberror_impl.cc"
- >
- </File>
- <File
- RelativePath=".\weberror_impl.h"
- >
- </File>
- <File
- RelativePath=".\webframe_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webframe_impl.h"
- >
- </File>
- <File
- RelativePath=".\webframeloaderclient_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webframeloaderclient_impl.h"
- >
- </File>
- <File
- RelativePath=".\webhistoryitem_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webhistoryitem_impl.h"
- >
- </File>
- <File
- RelativePath=".\webkit_glue.cc"
- >
- </File>
- <File
- RelativePath=".\webkit_glue.h"
- >
- </File>
- <File
- RelativePath=".\webkitclient_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webkitclient_impl.h"
- >
- </File>
- <File
- RelativePath=".\webmediaplayer_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webmediaplayer_impl.h"
- >
- </File>
- <File
- RelativePath=".\webplugin_delegate.cc"
- >
- </File>
- <File
- RelativePath=".\webplugin_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webplugin_impl.h"
- >
- </File>
- <File
- RelativePath=".\webresponse_impl.h"
- >
- </File>
- <File
- RelativePath=".\webscriptsource.h"
- >
- </File>
- <File
- RelativePath=".\webtextinput_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webtextinput_impl.h"
- >
- </File>
- <File
- RelativePath=".\webthemeengine_impl_win.cc"
- >
- </File>
- <File
- RelativePath=".\webthemeengine_impl_win.h"
- >
- </File>
- <File
- RelativePath=".\weburlrequest_impl.cc"
- >
- </File>
- <File
- RelativePath=".\weburlrequest_impl.h"
- >
- </File>
- <File
- RelativePath=".\webview_delegate.cc"
- >
- </File>
- <File
- RelativePath=".\webview_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webview_impl.h"
- >
- </File>
- <File
- RelativePath=".\webwidget_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webwidget_impl.h"
- >
- </File>
- <File
- RelativePath=".\webworker_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webworker_impl.h"
- >
- </File>
- <File
- RelativePath=".\webworkerclient_impl.cc"
- >
- </File>
- <File
- RelativePath=".\webworkerclient_impl.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Plugins"
- >
- <File
- RelativePath=".\plugins\mozilla_extensions.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\mozilla_extensions.h"
- >
- </File>
- <File
- RelativePath=".\plugins\nphostapi.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_constants_win.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_host.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_host.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_instance.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_instance.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_lib.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_lib.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_lib_win.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_list.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_list.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_list_win.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_stream.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_stream.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_stream_url.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_stream_url.h"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_stream_win.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_string_stream.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\plugin_string_stream.h"
- >
- </File>
- <File
- RelativePath=".\plugins\webplugin_delegate_impl.cc"
- >
- </File>
- <File
- RelativePath=".\plugins\webplugin_delegate_impl.h"
- >
- </File>
- </Filter>
- <Filter
- Name="DevTools"
- >
- <File
- RelativePath=".\devtools\debugger_agent.h"
- >
- </File>
- <File
- RelativePath=".\devtools\debugger_agent_impl.cc"
- >
- </File>
- <File
- RelativePath=".\devtools\debugger_agent_impl.h"
- >
- </File>
- <File
- RelativePath=".\devtools\debugger_agent_manager.cc"
- >
- </File>
- <File
- RelativePath=".\devtools\debugger_agent_manager.h"
- >
- </File>
- <File
- RelativePath=".\devtools\devtools_rpc.cc"
- >
- </File>
- <File
- RelativePath=".\devtools\devtools_rpc.h"
- >
- </File>
- <File
- RelativePath=".\devtools\devtools_rpc_js.h"
- >
- </File>
- <File
- RelativePath=".\devtools\dom_agent.h"
- >
- </File>
- <File
- RelativePath=".\devtools\dom_agent_impl.cc"
- >
- </File>
- <File
- RelativePath=".\devtools\dom_agent_impl.h"
- >
- </File>
- <File
- RelativePath=".\devtools\net_agent.h"
- >
- </File>
- <File
- RelativePath=".\devtools\net_agent_impl.cc"
- >
- </File>
- <File
- RelativePath=".\devtools\net_agent_impl.h"
- >
- </File>
- <File
- RelativePath=".\devtools\tools_agent.h"
- >
- </File>
- <Filter
- Name="js"
- >
- <File
- RelativePath=".\devtools\js\base.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\debugger_agent.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\devtools.html"
- >
- </File>
- <File
- RelativePath=".\devtools\js\devtools.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\devtools_callback.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\devtools_host_stub.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\dom_agent.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\inject.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\inspector_controller.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\inspector_controller_impl.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\json.js"
- >
- </File>
- <File
- RelativePath=".\devtools\js\net_agent.js"
- >
- </File>
- </Filter>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="Glue"
+ ProjectGUID="{C66B126D-0ECE-4CA2-B6DC-FA780AFBBF09}"
+ RootNamespace="glue"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ <ToolFile
+ RelativePath=".\devtools\devtools_copy.rules"
+ />
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(SolutionDir)..\build\debug.vsprops;.\glue.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="devtools file copy"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ ConfigurationType="4"
+ InheritedPropertySheets="..\..\build\release.vsprops;.\glue.vsprops"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="devtools file copy"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="API"
+ >
+ <File
+ RelativePath=".\autofill_form.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\autofill_form.h"
+ >
+ </File>
+ <File
+ RelativePath=".\context_menu.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cpp_bound_class.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cpp_variant.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_operations.h"
+ >
+ </File>
+ <File
+ RelativePath=".\form_data.h"
+ >
+ </File>
+ <File
+ RelativePath=".\image_decoder.h"
+ >
+ </File>
+ <File
+ RelativePath=".\password_form.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_type.h"
+ >
+ </File>
+ <File
+ RelativePath=".\screen_info.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webaccessibility.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webaccessibilitymanager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webappcachecontext.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webappcachecontext.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdatasource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsagent.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsagent_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsclient.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsclient_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\weberror.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webframe.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webhistoryitem.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webplugin.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webplugin_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webplugininfo.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webpreferences.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webresponse.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webtextinput.h"
+ >
+ </File>
+ <File
+ RelativePath=".\weburlrequest.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webview.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webview_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webwidget.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webwidget_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webworker.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webworkerclient.h"
+ >
+ </File>
+ <File
+ RelativePath=".\window_open_disposition.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Library"
+ >
+ <File
+ RelativePath=".\alt_404_page_resource_fetcher.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\alt_404_page_resource_fetcher.h"
+ >
+ </File>
+ <File
+ RelativePath=".\alt_error_page_resource_fetcher.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\alt_error_page_resource_fetcher.h"
+ >
+ </File>
+ <File
+ RelativePath=".\back_forward_list_client_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\back_forward_list_client_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\chrome_client_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\chrome_client_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\chromium_bridge_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\context_menu_client_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\context_menu_client_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\cpp_binding_example.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\cpp_bound_class.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\cpp_variant.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\debugger_bridge.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\debugger_bridge.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_operations.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_operations_private.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_serializer.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_serializer.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dom_serializer_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\dragclient_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\dragclient_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\editor_client_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\editor_client_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\entity_map.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\entity_map.h"
+ >
+ </File>
+ <File
+ RelativePath=".\event_conversion.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\event_conversion.h"
+ >
+ </File>
+ <File
+ RelativePath=".\feed_preview.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\feed_preview.h"
+ >
+ </File>
+ <File
+ RelativePath=".\glue_accessibility_object.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\glue_accessibility_object.h"
+ >
+ </File>
+ <File
+ RelativePath=".\glue_serialize.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\glue_serialize.h"
+ >
+ </File>
+ <File
+ RelativePath=".\glue_util.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\glue_util.h"
+ >
+ </File>
+ <File
+ RelativePath=".\image_decoder.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\image_resource_fetcher.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\image_resource_fetcher.h"
+ >
+ </File>
+ <File
+ RelativePath=".\inspector_client_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\inspector_client_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\localized_strings.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\media_player_private_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\multipart_response_delegate.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\multipart_response_delegate.h"
+ >
+ </File>
+ <File
+ RelativePath=".\npruntime_util.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\npruntime_util.h"
+ >
+ </File>
+ <File
+ RelativePath=".\password_autocomplete_listener.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\password_autocomplete_listener.h"
+ >
+ </File>
+ <File
+ RelativePath=".\password_form_dom_manager.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\password_form_dom_manager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_fetcher.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_fetcher.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_handle_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_loader_bridge.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\resource_loader_bridge.h"
+ >
+ </File>
+ <File
+ RelativePath=".\scoped_clipboard_writer_glue.h"
+ >
+ </File>
+ <File
+ RelativePath=".\searchable_form_data.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\searchable_form_data.h"
+ >
+ </File>
+ <File
+ RelativePath=".\simple_webmimeregistry_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\simple_webmimeregistry_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\stacking_order_iterator.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\stacking_order_iterator.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webaccessibilitymanager_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webaccessibilitymanager_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webclipboard_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webclipboard_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webcursor.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webcursor.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webcursor_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webdatasource_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webdatasource_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsagent_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsagent_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsclient_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webdevtoolsclient_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdropdata.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webdropdata.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webdropdata_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\weberror_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\weberror_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webframe_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webframe_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webframeloaderclient_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webframeloaderclient_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webhistoryitem_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webhistoryitem_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webkit_glue.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webkit_glue.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webkitclient_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webkitclient_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webmediaplayerclient_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webmediaplayerclient_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webplugin_delegate.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webplugin_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webplugin_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webresponse_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webscriptsource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webtextinput_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webtextinput_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webthemeengine_impl_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webthemeengine_impl_win.h"
+ >
+ </File>
+ <File
+ RelativePath=".\weburlrequest_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\weburlrequest_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webview_delegate.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webview_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webview_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webwidget_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webwidget_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webworker_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webworker_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\webworkerclient_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\webworkerclient_impl.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Plugins"
+ >
+ <File
+ RelativePath=".\plugins\mozilla_extensions.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\mozilla_extensions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\nphostapi.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_constants_win.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_host.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_host.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_instance.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_instance.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_lib.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_lib.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_lib_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_list.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_list.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_list_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_stream.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_stream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_stream_url.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_stream_url.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_stream_win.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_string_stream.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\plugin_string_stream.h"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\webplugin_delegate_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\plugins\webplugin_delegate_impl.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="DevTools"
+ >
+ <File
+ RelativePath=".\devtools\debugger_agent.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\debugger_agent_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\debugger_agent_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\debugger_agent_manager.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\debugger_agent_manager.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\devtools_rpc.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\devtools_rpc.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\devtools_rpc_js.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\dom_agent.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\dom_agent_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\dom_agent_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\net_agent.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\net_agent_impl.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\net_agent_impl.h"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\tools_agent.h"
+ >
+ </File>
+ <Filter
+ Name="js"
+ >
+ <File
+ RelativePath=".\devtools\js\base.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\debugger_agent.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\devtools.html"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\devtools.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\devtools_callback.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\devtools_host_stub.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\dom_agent.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\inject.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\inspector_controller.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\inspector_controller_impl.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\json.js"
+ >
+ </File>
+ <File
+ RelativePath=".\devtools\js\net_agent.js"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/webkit/glue/media_player_private_impl.cc b/webkit/glue/media_player_private_impl.cc
index 7bc09a3..15661b5 100644
--- a/webkit/glue/media_player_private_impl.cc
+++ b/webkit/glue/media_player_private_impl.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2008-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,335 +6,19 @@
#if ENABLE(VIDEO)
-#include "Document.h"
-#include "GraphicsContext.h"
-#include "HTMLMediaElement.h"
-#include "IntRect.h"
#include "MediaPlayerPrivateChromium.h"
-#include "NotImplemented.h"
-#include "PlatformContextSkia.h"
-#undef LOG
-#include "base/gfx/rect.h"
-#include "googleurl/src/gurl.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
-#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webframe.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webmediaplayer.h"
-#include "webkit/glue/webmediaplayer_impl.h"
-#include "webkit/glue/webmediaplayer_delegate.h"
-#include "webkit/glue/webview.h"
-#include "webkit/glue/webview_delegate.h"
+#include "webkit/glue/webmediaplayerclient_impl.h"
namespace WebCore {
-// To avoid exposing a glue type like this in WebCore, MediaPlayerPrivate
-// defines a private field m_data as type void*. This method is used to
-// cast that to a WebMediaPlayerDelegate pointer.
-static inline webkit_glue::WebMediaPlayerDelegate* AsDelegate(void* data) {
- return static_cast<webkit_glue::WebMediaPlayerDelegate*>(data);
-}
-
-// We can't create the delegate here because m_player->frameView is null at
-// this moment. Although we can static_cast the MediaPlayerClient to
-// HTMLElement and get the frame from there, but creating the delegate from
-// load() seems to be a better idea.
-MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
- : m_player(player),
- m_data(NULL) {
-}
-
-MediaPlayerPrivate::~MediaPlayerPrivate() {
- // Delete the delegate, it should delete the associated WebMediaPlayer.
- delete AsDelegate(m_data);
-}
-
-void MediaPlayerPrivate::load(const String& url) {
- // Delete the delegate if it already exists. Because we may be in a different
- // view since last load. WebMediaPlayer uses the view internally when
- // using ResourceHandle, WebMediaPlayerDelegate contains the actual media
- // player, in order to hook the actual media player with ResourceHandle in
- // WebMediaPlayer given the new view, we destroy the old
- // WebMediaPlayerDelegate and WebMediaPlayer and create a new set of both.
- delete AsDelegate(m_data);
- m_data = NULL;
-
- webkit_glue::WebMediaPlayer* media_player =
- new webkit_glue::WebMediaPlayerImpl(this);
- WebViewDelegate* d = media_player->GetWebFrame()->GetView()->GetDelegate();
-
- webkit_glue::WebMediaPlayerDelegate* new_delegate =
- d->CreateMediaPlayerDelegate();
- // In case we couldn't create a delegate.
- if (new_delegate) {
- m_data = new_delegate;
- new_delegate->Initialize(media_player);
- media_player->Initialize(new_delegate);
-
- new_delegate->Load(webkit_glue::StringToGURL(url));
- }
-}
-
-void MediaPlayerPrivate::cancelLoad() {
- if (m_data)
- AsDelegate(m_data)->CancelLoad();
-}
-
-IntSize MediaPlayerPrivate::naturalSize() const {
- if (m_data) {
- return IntSize(AsDelegate(m_data)->GetWidth(),
- AsDelegate(m_data)->GetHeight());
- } else {
- return IntSize(0, 0);
- }
-}
-
-bool MediaPlayerPrivate::hasVideo() const {
- if (m_data) {
- return AsDelegate(m_data)->IsVideo();
- } else {
- return false;
- }
-}
-
-void MediaPlayerPrivate::play() {
- if (m_data) {
- AsDelegate(m_data)->Play();
- }
-}
-
-void MediaPlayerPrivate::pause() {
- if (m_data) {
- AsDelegate(m_data)->Pause();
- }
-}
-
-bool MediaPlayerPrivate::paused() const {
- if (m_data) {
- return AsDelegate(m_data)->IsPaused();
- } else {
- return true;
- }
-}
-
-bool MediaPlayerPrivate::seeking() const {
- if (m_data) {
- return AsDelegate(m_data)->IsSeeking();
- } else {
- return false;
- }
-}
-
-float MediaPlayerPrivate::duration() const {
- if (m_data) {
- return AsDelegate(m_data)->GetDuration();
- } else {
- return 0.0f;
- }
-}
-
-float MediaPlayerPrivate::currentTime() const {
- if (m_data) {
- return AsDelegate(m_data)->GetCurrentTime();
- } else {
- return 0.0f;
- }
-}
-
-void MediaPlayerPrivate::seek(float time) {
- if (m_data) {
- AsDelegate(m_data)->Seek(time);
- }
-}
-
-void MediaPlayerPrivate::setEndTime(float time) {
- if (m_data) {
- AsDelegate(m_data)->SetEndTime(time);
- }
-}
-
-void MediaPlayerPrivate::setRate(float rate) {
- if (m_data) {
- AsDelegate(m_data)->SetPlaybackRate(rate);
- }
-}
-
-void MediaPlayerPrivate::setVolume(float volume) {
- if (m_data) {
- AsDelegate(m_data)->SetVolume(volume);
- }
-}
-
-int MediaPlayerPrivate::dataRate() const {
- if (m_data) {
- return AsDelegate(m_data)->GetDataRate();
- } else {
- return 0;
- }
-}
-
-MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const {
- if (m_data) {
- switch (AsDelegate(m_data)->GetNetworkState()) {
- case webkit_glue::WebMediaPlayer::EMPTY:
- return MediaPlayer::Empty;
- case webkit_glue::WebMediaPlayer::IDLE:
- return MediaPlayer::Idle;
- case webkit_glue::WebMediaPlayer::LOADING:
- return MediaPlayer::Loading;
- case webkit_glue::WebMediaPlayer::LOADED:
- return MediaPlayer::Loaded;
- case webkit_glue::WebMediaPlayer::FORMAT_ERROR:
- return MediaPlayer::FormatError;
- case webkit_glue::WebMediaPlayer::NETWORK_ERROR:
- return MediaPlayer::NetworkError;
- case webkit_glue::WebMediaPlayer::DECODE_ERROR:
- return MediaPlayer::DecodeError;
- }
- }
- return MediaPlayer::Empty;
-}
-
-MediaPlayer::ReadyState MediaPlayerPrivate::readyState() const {
- if (m_data) {
- switch (AsDelegate(m_data)->GetReadyState()) {
- case webkit_glue::WebMediaPlayer::HAVE_NOTHING:
- return MediaPlayer::HaveNothing;
- case webkit_glue::WebMediaPlayer::HAVE_METADATA:
- return MediaPlayer::HaveMetadata;
- case webkit_glue::WebMediaPlayer::HAVE_CURRENT_DATA:
- return MediaPlayer::HaveCurrentData;
- case webkit_glue::WebMediaPlayer::HAVE_FUTURE_DATA:
- return MediaPlayer::HaveFutureData;
- case webkit_glue::WebMediaPlayer::HAVE_ENOUGH_DATA:
- return MediaPlayer::HaveEnoughData;
- }
- }
- return MediaPlayer::HaveNothing;
-}
-
-float MediaPlayerPrivate::maxTimeBuffered() const {
- if (m_data) {
- return AsDelegate(m_data)->GetMaxTimeBuffered();
- } else {
- return 0.0f;
- }
-}
-
-float MediaPlayerPrivate::maxTimeSeekable() const {
- if (m_data) {
- return AsDelegate(m_data)->GetMaxTimeSeekable();
- } else {
- return 0.0f;
- }
-}
-
-unsigned MediaPlayerPrivate::bytesLoaded() const {
- if (m_data) {
- return static_cast<unsigned>(AsDelegate(m_data)->GetBytesLoaded());
- } else {
- return 0;
- }
-}
-
-bool MediaPlayerPrivate::totalBytesKnown() const {
- if (m_data) {
- return AsDelegate(m_data)->IsTotalBytesKnown();
- } else {
- return false;
- }
-}
-
-unsigned MediaPlayerPrivate::totalBytes() const {
- if (m_data) {
- return static_cast<unsigned>(AsDelegate(m_data)->GetTotalBytes());
- } else {
- return 0;
- }
-}
-
-void MediaPlayerPrivate::setVisible(bool visible) {
- if (m_data) {
- AsDelegate(m_data)->SetVisible(visible);
- }
-}
-
-void MediaPlayerPrivate::setSize(const IntSize& size) {
- if (m_data) {
- AsDelegate(m_data)->SetSize(webkit_glue::IntSizeToWebSize(size));
- }
-}
-
-void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r) {
- if (m_data) {
- AsDelegate(m_data)->Paint(p->platformContext()->canvas(),
- webkit_glue::IntRectToWebRect(r));
- }
-}
-
-// Called from WebMediaPlayer -------------------------------------------------
-FrameView* MediaPlayerPrivate::frameView() {
- // Unfortunately m_player->frameView() can be NULL for <audio> so get the
- // FrameView from the document directly.
- return static_cast<HTMLMediaElement*>(
- m_player->mediaPlayerClient())->document()->view();
-}
-
-void MediaPlayerPrivate::networkStateChanged() {
- m_player->networkStateChanged();
-}
-
-void MediaPlayerPrivate::readyStateChanged() {
- m_player->readyStateChanged();
-}
-
-void MediaPlayerPrivate::timeChanged() {
- m_player->timeChanged();
-}
-
-void MediaPlayerPrivate::volumeChanged() {
- m_player->volumeChanged();
-}
-
-void MediaPlayerPrivate::repaint() {
- m_player->repaint();
-}
-
-void MediaPlayerPrivate::sizeChanged() {
- m_player->sizeChanged();
-}
-
-void MediaPlayerPrivate::rateChanged() {
- m_player->rateChanged();
-}
-
-void MediaPlayerPrivate::durationChanged() {
- m_player->durationChanged();
-}
-
-// public static methods ------------------------------------------------------
-
-MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player) {
- return new MediaPlayerPrivate(player);
-}
-
void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar) {
- if (webkit_glue::IsMediaPlayerAvailable())
- registrar(create, getSupportedTypes, supportsType);
-}
-
-MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(
- const String &type, const String &codecs) {
- // TODO(hclam): decide what to do here, now we just say we support everything.
- return MediaPlayer::IsSupported;
-}
-
-void MediaPlayerPrivate::getSupportedTypes(HashSet<String>& types) {
- // TODO(hclam): decide what to do here, we should fill in the HashSet about
- // codecs that we support.
- notImplemented();
+ if (webkit_glue::IsMediaPlayerAvailable()) {
+ registrar(&WebMediaPlayerClientImpl::create,
+ &WebMediaPlayerClientImpl::getSupportedTypes,
+ &WebMediaPlayerClientImpl::supportsType);
+ }
}
} // namespace WebCore
diff --git a/webkit/glue/webmediaplayer.h b/webkit/glue/webmediaplayer.h
deleted file mode 100644
index 4d80cfa..0000000
--- a/webkit/glue/webmediaplayer.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-#ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_H_
-#define WEBKIT_GLUE_WEBMEDIAPLAYER_H_
-
-#include "base/basictypes.h"
-
-class WebFrame;
-
-namespace webkit_glue {
-
-class WebMediaPlayerDelegate;
-
-class WebMediaPlayer {
-public:
- enum NetworkState {
- EMPTY,
- IDLE,
- LOADING,
- LOADED,
- FORMAT_ERROR,
- NETWORK_ERROR,
- DECODE_ERROR,
- };
-
- enum ReadyState {
- HAVE_NOTHING,
- HAVE_METADATA,
- HAVE_CURRENT_DATA,
- HAVE_FUTURE_DATA,
- HAVE_ENOUGH_DATA,
- };
-
- WebMediaPlayer() {}
- virtual ~WebMediaPlayer() {}
-
- virtual void Initialize(WebMediaPlayerDelegate* delegate) = 0;
-
- // Get the web frame associated with the media player
- virtual WebFrame* GetWebFrame() = 0;
-
- // Notify the media player about network state change.
- virtual void NotifyNetworkStateChange() = 0;
-
- // Notify the media player about ready state change.
- virtual void NotifyReadyStateChange() = 0;
-
- // Notify the media player about time change.
- virtual void NotifyTimeChange() = 0;
-
- // Notify the media player about volume change.
- virtual void NotifyVolumeChange() = 0;
-
- // Notify the media player size of video frame changed.
- virtual void NotifySizeChanged() = 0;
-
- // Notify the media player playback rate has changed.
- virtual void NotifyRateChanged() = 0;
-
- // Notify the media player duration of the media file has changed.
- virtual void NotifyDurationChanged() = 0;
-
- // Tell the media player to repaint itself.
- virtual void Repaint() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebMediaPlayer);
-};
-
-} // namespace webkit_glue
-
-#endif // WEBKIT_GLUE_WEBMEDIAPLAYER_H_
diff --git a/webkit/glue/webmediaplayer_delegate.h b/webkit/glue/webmediaplayer_delegate.h
deleted file mode 100644
index c86b001..0000000
--- a/webkit/glue/webmediaplayer_delegate.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-#ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_DELEGATE_H_
-#define WEBKIT_GLUE_WEBMEDIAPLAYER_DELEGATE_H_
-
-#include "base/gfx/platform_canvas.h"
-#include "webkit/glue/weberror.h"
-#include "webkit/glue/webmediaplayer.h"
-#include "webkit/glue/webresponse.h"
-#include "webkit/glue/weburlrequest.h"
-
-class GURL;
-
-namespace WebKit {
-struct WebRect;
-struct WebSize;
-}
-
-namespace webkit_glue {
-
-class WebMediaPlayerDelegate {
- public:
- WebMediaPlayerDelegate() {}
- virtual ~WebMediaPlayerDelegate() {}
-
- virtual void Initialize(WebMediaPlayer *web_media_player) = 0;
-
- virtual void Load(const GURL& url) = 0;
- virtual void CancelLoad() = 0;
-
- // Playback controls.
- virtual void Play() = 0;
- virtual void Pause() = 0;
- virtual void Stop() = 0;
- virtual void Seek(float time) = 0;
- virtual void SetEndTime(float time) = 0;
- virtual void SetPlaybackRate(float rate) = 0;
- virtual void SetVolume(float volume) = 0;
- virtual void SetVisible(bool visible) = 0;
- virtual bool IsTotalBytesKnown() = 0;
- virtual float GetMaxTimeBuffered() const = 0;
- virtual float GetMaxTimeSeekable() const = 0;
-
- // Methods for painting.
- virtual void SetSize(const WebKit::WebSize& size) = 0;
-
- // TODO(hclam): Using paint at the moment, maybe we just need to return a
- // SkiaBitmap?
- virtual void Paint(skia::PlatformCanvas *canvas,
- const WebKit::WebRect& rect) = 0;
-
- // True if a video is loaded.
- virtual bool IsVideo() const = 0;
-
- // Dimension of the video.
- virtual size_t GetWidth() const = 0;
- virtual size_t GetHeight() const = 0;
-
- // Getters fo playback state.
- virtual bool IsPaused() const = 0;
- virtual bool IsSeeking() const = 0;
- virtual float GetDuration() const = 0;
- virtual float GetCurrentTime() const = 0;
- virtual float GetPlayBackRate() const = 0;
- virtual float GetVolume() const = 0;
-
- // Get rate of loading the resource.
- virtual int32 GetDataRate() const = 0;
-
- // Internal states of loading and network.
- virtual WebMediaPlayer::NetworkState GetNetworkState() const = 0;
- virtual WebMediaPlayer::ReadyState GetReadyState() const = 0;
-
- virtual int64 GetBytesLoaded() const = 0;
- virtual int64 GetTotalBytes() const = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerDelegate);
-};
-
-} // namespace webkit_glue
-
-#endif // WEBKIT_GLUE_WEBMEDIAPLAYER_DELEGATE_H_
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc
deleted file mode 100644
index 1a17346..0000000
--- a/webkit/glue/webmediaplayer_impl.cc
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-#include "config.h"
-
-#include "FrameView.h"
-#include "MediaPlayerPrivateChromium.h"
-#include "PlatformString.h"
-#include "ResourceRequest.h"
-#include "ResourceHandle.h"
-#undef LOG
-
-#include "googleurl/src/gurl.h"
-#include "webkit/glue/glue_util.h"
-#include "webkit/glue/weberror_impl.h"
-#include "webkit/glue/webframe_impl.h"
-#include "webkit/glue/webmediaplayer_delegate.h"
-#include "webkit/glue/webmediaplayer_impl.h"
-#include "webkit/glue/webresponse_impl.h"
-#include "webkit/glue/weburlrequest_impl.h"
-
-#if ENABLE(VIDEO)
-
-namespace webkit_glue {
-
-WebMediaPlayerImpl::WebMediaPlayerImpl(
- WebCore::MediaPlayerPrivate* media_player_private)
- : media_player_private_(media_player_private) {
-}
-
-WebMediaPlayerImpl::~WebMediaPlayerImpl() {
-}
-
-void WebMediaPlayerImpl::Initialize(WebMediaPlayerDelegate* delegate){
- delegate_ = delegate;
-}
-
-WebFrame* WebMediaPlayerImpl::GetWebFrame() {
- if (media_player_private_ && media_player_private_->frameView()->frame()) {
- return WebFrameImpl::FromFrame(
- media_player_private_->frameView()->frame());
- } else {
- return NULL;
- }
-}
-
-void WebMediaPlayerImpl::NotifyNetworkStateChange() {
- if (media_player_private_)
- media_player_private_->networkStateChanged();
-}
-
-void WebMediaPlayerImpl::NotifyReadyStateChange() {
- if (media_player_private_)
- media_player_private_->readyStateChanged();
-}
-
-void WebMediaPlayerImpl::NotifyTimeChange() {
- if (media_player_private_)
- media_player_private_->timeChanged();
-}
-
-void WebMediaPlayerImpl::NotifyVolumeChange() {
- if (media_player_private_)
- media_player_private_->volumeChanged();
-}
-
-void WebMediaPlayerImpl::NotifySizeChanged() {
- if (media_player_private_)
- media_player_private_->sizeChanged();
-}
-
-void WebMediaPlayerImpl::NotifyRateChanged() {
- if (media_player_private_)
- media_player_private_->rateChanged();
-}
-
-void WebMediaPlayerImpl::NotifyDurationChanged() {
- if (media_player_private_)
- media_player_private_->durationChanged();
-}
-
-void WebMediaPlayerImpl::Repaint() {
- if (media_player_private_)
- media_player_private_->repaint();
-}
-
-} // namespace webkit_glue
-
-#endif // ENABLE(VIDEO)
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
deleted file mode 100644
index 3dc29e5..0000000
--- a/webkit/glue/webmediaplayer_impl.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
-// source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-//
-// Wrapper over WebCore::MediaPlayerPrivate. It also would handle resource
-// loading for the internal media player.
-
-#ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
-#define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_
-
-#include "webkit/glue/webmediaplayer.h"
-
-#if ENABLE(VIDEO)
-
-namespace WebCore {
-class MediaPlayerPrivate;
-class ResourceHandle;
-}
-
-namespace webkit_glue {
-
-class WebMediaPlayerDelegate;
-
-class WebMediaPlayerImpl : public WebMediaPlayer {
- public:
- explicit WebMediaPlayerImpl(
- WebCore::MediaPlayerPrivate* media_player_private);
-
- virtual ~WebMediaPlayerImpl();
-
- virtual void Initialize(WebMediaPlayerDelegate* delegate);
-
- // Get the web frame associated with the media player
- virtual WebFrame* GetWebFrame();
-
- // Notify the media player about network state change.
- virtual void NotifyNetworkStateChange();
-
- // Notify the media player about ready state change.
- virtual void NotifyReadyStateChange();
-
- // Notify the media player about time change.
- virtual void NotifyTimeChange();
-
- // Notify the media player about volume change.
- virtual void NotifyVolumeChange();
-
- // Notify the media player size of video frame changed.
- virtual void NotifySizeChanged();
-
- // Notify the media player playback rate has changed.
- virtual void NotifyRateChanged();
-
- // Notify the media player duration of the media file has changed.
- virtual void NotifyDurationChanged();
-
- // Tell the media player to repaint itself.
- virtual void Repaint();
-
- private:
- WebCore::MediaPlayerPrivate* media_player_private_;
- WebMediaPlayerDelegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
-};
-
-} // namespace webkit_glue
-
-#endif // ENABLE(VIDEO)
-
-#endif // WEBKIT_GLUE_WEBMEDIAPLAYER_H_
diff --git a/webkit/glue/webmediaplayerclient_impl.cc b/webkit/glue/webmediaplayerclient_impl.cc
new file mode 100644
index 0000000..ebd2e57
--- /dev/null
+++ b/webkit/glue/webmediaplayerclient_impl.cc
@@ -0,0 +1,307 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "webkit/glue/webmediaplayerclient_impl.h"
+
+#if ENABLE(VIDEO)
+
+#include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayer.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
+#include "webkit/glue/webframe_impl.h"
+#include "webkit/glue/webview.h"
+#include "webkit/glue/webview_delegate.h"
+
+#include "CString.h"
+#include "Frame.h"
+#include "GraphicsContext.h"
+#include "HTMLMediaElement.h"
+#include "IntSize.h"
+#include "MediaPlayer.h"
+#include "NotImplemented.h"
+#include "PlatformContextSkia.h"
+
+using namespace WebCore;
+using namespace WebKit;
+
+WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
+ : m_webMediaPlayer(0) {
+}
+
+
+WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl() {
+ delete m_webMediaPlayer;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// WebMediaPlayerClientImpl, WebMediaPlayerClient implementations
+void WebMediaPlayerClientImpl::networkStateChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->networkStateChanged();
+}
+
+void WebMediaPlayerClientImpl::readyStateChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->readyStateChanged();
+}
+
+void WebMediaPlayerClientImpl::volumeChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->volumeChanged();
+}
+
+void WebMediaPlayerClientImpl::timeChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->timeChanged();
+}
+
+void WebMediaPlayerClientImpl::repaint() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->repaint();
+}
+
+void WebMediaPlayerClientImpl::durationChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->durationChanged();
+}
+
+void WebMediaPlayerClientImpl::rateChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->rateChanged();
+}
+
+void WebMediaPlayerClientImpl::sizeChanged() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->sizeChanged();
+}
+
+void WebMediaPlayerClientImpl::sawUnsupportedTracks() {
+ ASSERT(m_mediaPlayer);
+ m_mediaPlayer->mediaPlayerClient()->mediaPlayerSawUnsupportedTracks(
+ m_mediaPlayer);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// WebMediaPlayerClientImpl, MediaPlayerPrivateInterface implementations
+void WebMediaPlayerClientImpl::load(const String& url) {
+ delete m_webMediaPlayer;
+
+ WebCore::Frame* frame = static_cast<HTMLMediaElement*>(
+ m_mediaPlayer->mediaPlayerClient())->document()->frame();
+ WebFrame* webFrame = WebFrameImpl::FromFrame(frame);
+ WebViewDelegate* d = webFrame->GetView()->GetDelegate();
+ m_webMediaPlayer = d->CreateWebMediaPlayer(this);
+ // TODO(hclam): Is there a simpler way to convert from WebCore::String to
+ // WebKit::WebURL?
+ m_webMediaPlayer->load(WebKit::WebURL(GURL(WebString::fromUTF8(url.utf8()))));
+}
+
+void WebMediaPlayerClientImpl::cancelLoad() {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->cancelLoad();
+}
+
+void WebMediaPlayerClientImpl::play() {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->play();
+}
+
+void WebMediaPlayerClientImpl::pause() {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->pause();
+}
+
+IntSize WebMediaPlayerClientImpl::naturalSize() const {
+ if (m_webMediaPlayer) {
+ const WebSize& size = m_webMediaPlayer->naturalSize();
+ return IntSize(size.width, size.height);
+ }
+ return IntSize(0, 0);
+}
+
+bool WebMediaPlayerClientImpl::hasVideo() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->hasVideo();
+ return false;
+}
+
+void WebMediaPlayerClientImpl::setVisible(bool visible) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setVisible(visible);
+}
+
+float WebMediaPlayerClientImpl::duration() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->duration();
+ return 0.0f;
+}
+
+float WebMediaPlayerClientImpl::currentTime() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->currentTime();
+ return 0.0f;
+}
+
+void WebMediaPlayerClientImpl::seek(float time) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->seek(time);
+}
+
+bool WebMediaPlayerClientImpl::seeking() const {
+ return m_webMediaPlayer->seeking();
+}
+
+void WebMediaPlayerClientImpl::setEndTime(float time) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setEndTime(time);
+}
+
+void WebMediaPlayerClientImpl::setRate(float rate) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setRate(rate);
+}
+
+bool WebMediaPlayerClientImpl::paused() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->paused();
+ return false;
+}
+
+void WebMediaPlayerClientImpl::setVolume(float volume) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setVolume(volume);
+}
+
+MediaPlayer::NetworkState WebMediaPlayerClientImpl::networkState() const {
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::Empty) == int(MediaPlayer::Empty), Empty);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::Idle) == int(MediaPlayer::Idle), Idle);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::Loading) == int(MediaPlayer::Loading), Loading);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::Loaded) == int(MediaPlayer::Loaded), Loaded);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::FormatError) == int(MediaPlayer::FormatError),
+ FormatError);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::NetworkError) == int(MediaPlayer::NetworkError),
+ NetworkError);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::DecodeError) == int(MediaPlayer::DecodeError),
+ DecodeError);
+
+ if (m_webMediaPlayer)
+ return static_cast<MediaPlayer::NetworkState>(
+ m_webMediaPlayer->networkState());
+ return MediaPlayer::Empty;
+}
+
+MediaPlayer::ReadyState WebMediaPlayerClientImpl::readyState() const {
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::HaveNothing) == int(MediaPlayer::HaveNothing),
+ HaveNothing);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::HaveMetadata) == int(MediaPlayer::HaveMetadata),
+ HaveMetadata);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::HaveCurrentData) == int(MediaPlayer::HaveCurrentData),
+ HaveCurrentData);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::HaveFutureData) == int(MediaPlayer::HaveFutureData),
+ HaveFutureData);
+ COMPILE_ASSERT(
+ int(WebMediaPlayer::HaveEnoughData) == int(MediaPlayer::HaveEnoughData),
+ HaveEnoughData);
+
+ if (m_webMediaPlayer)
+ return static_cast<MediaPlayer::ReadyState>(m_webMediaPlayer->readyState());
+ return MediaPlayer::HaveNothing;
+}
+
+float WebMediaPlayerClientImpl::maxTimeSeekable() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->maxTimeSeekable();
+ return 0.0f;
+}
+
+float WebMediaPlayerClientImpl::maxTimeBuffered() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->maxTimeBuffered();
+ return 0.0f;
+}
+
+int WebMediaPlayerClientImpl::dataRate() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->dataRate();
+ return 0;
+}
+
+bool WebMediaPlayerClientImpl::totalBytesKnown() const {
+ if (m_webMediaPlayer)
+ return m_webMediaPlayer->totalBytesKnown();
+ return false;
+}
+
+unsigned WebMediaPlayerClientImpl::totalBytes() const {
+ if (m_webMediaPlayer)
+ return static_cast<unsigned>(m_webMediaPlayer->totalBytes());
+ return 0;
+}
+
+unsigned WebMediaPlayerClientImpl::bytesLoaded() const {
+ if (m_webMediaPlayer)
+ return static_cast<unsigned>(m_webMediaPlayer->bytesLoaded());
+ return 0;
+}
+
+void WebMediaPlayerClientImpl::setSize(const IntSize& size) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setSize(WebSize(size.width(), size.height()));
+}
+
+void WebMediaPlayerClientImpl::paint(GraphicsContext* context,
+ const IntRect& rect) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->paint(
+ context->platformContext()->canvas(),
+ WebRect(rect.x(), rect.y(), rect.width(), rect.height()));
+}
+
+void WebMediaPlayerClientImpl::setAutobuffer(bool autoBuffer) {
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setAutoBuffer(autoBuffer);
+}
+
+// static
+MediaPlayerPrivateInterface* WebMediaPlayerClientImpl::create(
+ MediaPlayer* player) {
+ WebMediaPlayerClientImpl* client = new WebMediaPlayerClientImpl();
+ client->m_mediaPlayer = player;
+ return client;
+}
+
+// static
+void WebMediaPlayerClientImpl::getSupportedTypes(
+ HashSet<String>& supportedTypes) {
+ // TODO(hclam): decide what to do here, we should fill in the HashSet about
+ // codecs that we support.
+ notImplemented();
+}
+
+// static
+MediaPlayer::SupportsType WebMediaPlayerClientImpl::supportsType(
+ const String& type, const String& codecs) {
+ // TODO(hclam): implement this nicely.
+ return MediaPlayer::IsSupported;
+}
+
+#endif // ENABLE(VIDEO)
diff --git a/webkit/glue/webmediaplayerclient_impl.h b/webkit/glue/webmediaplayerclient_impl.h
new file mode 100644
index 0000000..5bbe9a3
--- /dev/null
+++ b/webkit/glue/webmediaplayerclient_impl.h
@@ -0,0 +1,101 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_GLUE_WEBMEDIAPLAYERCLIENT_IMPL_H_
+#define WEBKIT_GLUE_WEBMEDIAPLAYERCLIENT_IMPL_H_
+
+#if ENABLE(VIDEO)
+
+#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerClient.h"
+
+#include "MediaPlayerPrivate.h"
+
+namespace WebCore {
+class MediaPlayerPrivate;
+} // namespace WebCore
+
+namespace WebKit {
+class WebMediaPlayer;
+} // namespace WebKit
+
+class WebMediaPlayerClientImpl : public WebKit::WebMediaPlayerClient,
+ public WebCore::MediaPlayerPrivateInterface {
+ public:
+ virtual ~WebMediaPlayerClientImpl();
+
+ ////////////////////////////////////////////////////////////////////////////
+ // WebMediaPlayerPlayerClient methods
+ virtual void networkStateChanged();
+ virtual void readyStateChanged();
+ virtual void volumeChanged();
+ virtual void timeChanged();
+ virtual void repaint();
+ virtual void durationChanged();
+ virtual void rateChanged();
+ virtual void sizeChanged();
+ virtual void sawUnsupportedTracks();
+
+ ////////////////////////////////////////////////////////////////////////////
+ // MediaPlayerPrivateInterface methods
+ virtual void load(const WebCore::String& url);
+ virtual void cancelLoad();
+
+ virtual void play();
+ virtual void pause();
+
+ virtual WebCore::IntSize naturalSize() const;
+
+ virtual bool hasVideo() const;
+
+ virtual void setVisible(bool);
+
+ virtual float duration() const;
+
+ virtual float currentTime() const;
+ virtual void seek(float time);
+ virtual bool seeking() const;
+
+ virtual void setEndTime(float time);
+
+ virtual void setRate(float);
+ virtual bool paused() const;
+
+ virtual void setVolume(float);
+
+ virtual WebCore::MediaPlayer::NetworkState networkState() const;
+ virtual WebCore::MediaPlayer::ReadyState readyState() const;
+
+ virtual float maxTimeSeekable() const;
+ virtual float maxTimeBuffered() const;
+
+ virtual int dataRate() const;
+ virtual void setAutobuffer(bool);
+
+ virtual bool totalBytesKnown() const;
+ virtual unsigned totalBytes() const;
+ virtual unsigned bytesLoaded() const;
+
+ virtual void setSize(const WebCore::IntSize&);
+ virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&);
+
+ private:
+ friend class WebCore::MediaPlayerPrivate;
+
+ WebMediaPlayerClientImpl();
+
+ // Static methods used by WebKit for construction.
+ static WebCore::MediaPlayerPrivateInterface* create(
+ WebCore::MediaPlayer* player);
+ static void getSupportedTypes(
+ WTF::HashSet<WebCore::String>& supportedTypes);
+ static WebCore::MediaPlayer::SupportsType supportsType(
+ const WebCore::String& type, const WebCore::String& codecs);
+
+ WebCore::MediaPlayer* m_mediaPlayer;
+ WebKit::WebMediaPlayer* m_webMediaPlayer;
+};
+
+#endif // ENABLE(VIDEO)
+
+#endif // WEBKIT_GLUE_WEBMEDIAPLAYERCLIENT_IMPL_H_
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index dbaf3b8..193aef4 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -41,6 +41,8 @@ namespace WebKit {
class WebDragData;
class WebWorker;
class WebWorkerClient;
+class WebMediaPlayer;
+class WebMediaPlayerClient;
struct WebPoint;
struct WebRect;
}
@@ -134,7 +136,8 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
}
// Called when a WebMediaPlayerDelegate is needed.
- virtual webkit_glue::WebMediaPlayerDelegate* CreateMediaPlayerDelegate() {
+ virtual WebKit::WebMediaPlayer* CreateWebMediaPlayer(
+ WebKit::WebMediaPlayerClient* client) {
return NULL;
}