OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "content/child/appcache/appcache_dispatcher.h" | 10 #include "content/child/appcache/appcache_dispatcher.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 return NULL; | 161 return NULL; |
162 | 162 |
163 WebPluginParams params_to_use = params; | 163 WebPluginParams params_to_use = params; |
164 params_to_use.mimeType = WebString::fromUTF8(mime_type); | 164 params_to_use.mimeType = WebString::fromUTF8(mime_type); |
165 return render_view_->CreatePlugin(frame, info, params_to_use); | 165 return render_view_->CreatePlugin(frame, info, params_to_use); |
166 #else | 166 #else |
167 return NULL; | 167 return NULL; |
168 #endif // defined(ENABLE_PLUGINS) | 168 #endif // defined(ENABLE_PLUGINS) |
169 } | 169 } |
170 | 170 |
171 WebKit::WebSharedWorker* RenderFrameImpl::createSharedWorker( | |
172 WebKit::WebFrame* frame, | |
173 const WebKit::WebURL& url, | |
174 const WebKit::WebString& name, | |
175 unsigned long long document_id) { | |
176 int route_id = MSG_ROUTING_NONE; | |
177 bool exists = false; | |
178 bool url_mismatch = false; | |
179 ViewHostMsg_CreateWorker_Params params; | |
180 params.url = url; | |
181 params.name = name; | |
182 params.document_id = document_id; | |
183 params.render_view_route_id = render_view_->GetRoutingID(); | |
184 params.route_id = MSG_ROUTING_NONE; | |
185 params.script_resource_appcache_id = 0; | |
186 render_view_->Send(new ViewHostMsg_LookupSharedWorker( | |
187 params, &exists, &route_id, &url_mismatch)); | |
188 if (url_mismatch) { | |
189 return NULL; | |
190 } else { | |
191 return new WebSharedWorkerProxy(RenderThreadImpl::current(), | |
192 document_id, | |
193 exists, | |
194 route_id, | |
195 render_view_->GetRoutingID()); | |
196 } | |
197 } | |
198 | |
199 WebKit::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( | 171 WebKit::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( |
200 WebKit::WebFrame* frame, | 172 WebKit::WebFrame* frame, |
201 const WebKit::WebURL& url, | 173 const WebKit::WebURL& url, |
202 WebKit::WebMediaPlayerClient* client) { | 174 WebKit::WebMediaPlayerClient* client) { |
203 // TODO(nasko): Moving the implementation here involves moving a few media | 175 // TODO(nasko): Moving the implementation here involves moving a few media |
204 // related client objects here or referencing them in the RenderView. Needs | 176 // related client objects here or referencing them in the RenderView. Needs |
205 // more work to understand where the proper place for those objects is. | 177 // more work to understand where the proper place for those objects is. |
206 return render_view_->createMediaPlayer(frame, url, client); | 178 return render_view_->createMediaPlayer(frame, url, client); |
207 } | 179 } |
208 | 180 |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
954 | 926 |
955 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, | 927 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, |
956 int arb_robustness_status_code) { | 928 int arb_robustness_status_code) { |
957 render_view_->Send(new ViewHostMsg_DidLose3DContext( | 929 render_view_->Send(new ViewHostMsg_DidLose3DContext( |
958 GURL(frame->top()->document().securityOrigin().toString()), | 930 GURL(frame->top()->document().securityOrigin().toString()), |
959 THREE_D_API_TYPE_WEBGL, | 931 THREE_D_API_TYPE_WEBGL, |
960 arb_robustness_status_code)); | 932 arb_robustness_status_code)); |
961 } | 933 } |
962 | 934 |
963 } // namespace content | 935 } // namespace content |
OLD | NEW |