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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 #include "v8/include/v8.h" | 157 #include "v8/include/v8.h" |
158 #include "webkit/appcache/web_application_cache_host_impl.h" | 158 #include "webkit/appcache/web_application_cache_host_impl.h" |
159 #include "webkit/glue/alt_error_page_resource_fetcher.h" | 159 #include "webkit/glue/alt_error_page_resource_fetcher.h" |
160 #include "webkit/glue/context_menu.h" | 160 #include "webkit/glue/context_menu.h" |
161 #include "webkit/glue/dom_operations.h" | 161 #include "webkit/glue/dom_operations.h" |
162 #include "webkit/glue/form_data.h" | 162 #include "webkit/glue/form_data.h" |
163 #include "webkit/glue/form_field.h" | 163 #include "webkit/glue/form_field.h" |
164 #include "webkit/glue/glue_serialize.h" | 164 #include "webkit/glue/glue_serialize.h" |
165 #include "webkit/glue/image_decoder.h" | 165 #include "webkit/glue/image_decoder.h" |
166 #include "webkit/glue/image_resource_fetcher.h" | 166 #include "webkit/glue/image_resource_fetcher.h" |
167 #include "webkit/glue/media/buffered_data_source.h" | |
168 #include "webkit/glue/media/simple_data_source.h" | |
169 #include "webkit/glue/media/video_renderer_impl.h" | 167 #include "webkit/glue/media/video_renderer_impl.h" |
170 #include "webkit/glue/password_form_dom_manager.h" | 168 #include "webkit/glue/password_form_dom_manager.h" |
171 #include "webkit/glue/plugins/default_plugin_shared.h" | 169 #include "webkit/glue/plugins/default_plugin_shared.h" |
172 #include "webkit/glue/plugins/pepper_webplugin_impl.h" | 170 #include "webkit/glue/plugins/pepper_webplugin_impl.h" |
173 #include "webkit/glue/plugins/plugin_list.h" | 171 #include "webkit/glue/plugins/plugin_list.h" |
174 #include "webkit/glue/plugins/webplugin_delegate.h" | 172 #include "webkit/glue/plugins/webplugin_delegate.h" |
175 #include "webkit/glue/plugins/webplugin_delegate_impl.h" | 173 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
176 #include "webkit/glue/plugins/webplugin_impl.h" | 174 #include "webkit/glue/plugins/webplugin_impl.h" |
177 #include "webkit/glue/plugins/webview_plugin.h" | 175 #include "webkit/glue/plugins/webview_plugin.h" |
178 #include "webkit/glue/resource_fetcher.h" | 176 #include "webkit/glue/resource_fetcher.h" |
(...skipping 2676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2855 | 2853 |
2856 // Add the hardware video decoder factory. | 2854 // Add the hardware video decoder factory. |
2857 // TODO(hclam): This will cause the renderer process to crash on context | 2855 // TODO(hclam): This will cause the renderer process to crash on context |
2858 // lost. | 2856 // lost. |
2859 bool ret = context->makeContextCurrent(); | 2857 bool ret = context->makeContextCurrent(); |
2860 CHECK(ret) << "Failed to switch context"; | 2858 CHECK(ret) << "Failed to switch context"; |
2861 collection->AddVideoDecoder(new IpcVideoDecoder( | 2859 collection->AddVideoDecoder(new IpcVideoDecoder( |
2862 MessageLoop::current(), context->context())); | 2860 MessageLoop::current(), context->context())); |
2863 } | 2861 } |
2864 | 2862 |
2865 // TODO(annacc): do we still need appcache_host? http://crbug.com/65135 | |
2866 // WebApplicationCacheHostImpl* appcache_host = | |
2867 // WebApplicationCacheHostImpl::FromFrame(frame); | |
2868 | |
2869 scoped_refptr<webkit_glue::WebVideoRenderer> video_renderer; | 2863 scoped_refptr<webkit_glue::WebVideoRenderer> video_renderer; |
2870 bool pts_logging = cmd_line->HasSwitch(switches::kEnableVideoLogging); | 2864 bool pts_logging = cmd_line->HasSwitch(switches::kEnableVideoLogging); |
2871 scoped_refptr<webkit_glue::VideoRendererImpl> renderer( | 2865 scoped_refptr<webkit_glue::VideoRendererImpl> renderer( |
2872 new webkit_glue::VideoRendererImpl(pts_logging)); | 2866 new webkit_glue::VideoRendererImpl(pts_logging)); |
2873 collection->AddVideoRenderer(renderer); | 2867 collection->AddVideoRenderer(renderer); |
2874 video_renderer = renderer; | 2868 video_renderer = renderer; |
2875 | 2869 |
2876 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( | 2870 scoped_ptr<webkit_glue::WebMediaPlayerImpl> result( |
2877 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); | 2871 new webkit_glue::WebMediaPlayerImpl(client, collection.release())); |
2878 if (!result->Initialize(frame, | 2872 if (!result->Initialize(frame, |
(...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5731 external_popup_menu_.reset(); | 5725 external_popup_menu_.reset(); |
5732 } | 5726 } |
5733 #endif | 5727 #endif |
5734 | 5728 |
5735 void RenderView::AddErrorToRootConsole(const string16& message) { | 5729 void RenderView::AddErrorToRootConsole(const string16& message) { |
5736 if (webview() && webview()->mainFrame()) { | 5730 if (webview() && webview()->mainFrame()) { |
5737 webview()->mainFrame()->addMessageToConsole( | 5731 webview()->mainFrame()->addMessageToConsole( |
5738 WebConsoleMessage(WebConsoleMessage::LevelError, message)); | 5732 WebConsoleMessage(WebConsoleMessage::LevelError, message)); |
5739 } | 5733 } |
5740 } | 5734 } |
OLD | NEW |