| 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 <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 while ((observer = it.GetNext()) != NULL) { | 452 while ((observer = it.GetNext()) != NULL) { |
| 453 if (observer->OnMessageReceived(msg)) | 453 if (observer->OnMessageReceived(msg)) |
| 454 return true; | 454 return true; |
| 455 } | 455 } |
| 456 | 456 |
| 457 // TODO(ajwong): Fill in with message handlers as various components | 457 // TODO(ajwong): Fill in with message handlers as various components |
| 458 // are migrated over to understand frames. | 458 // are migrated over to understand frames. |
| 459 return false; | 459 return false; |
| 460 } | 460 } |
| 461 | 461 |
| 462 RenderView* RenderFrameImpl::GetRenderView() { |
| 463 return render_view_; |
| 464 } |
| 465 |
| 462 int RenderFrameImpl::GetRoutingID() { | 466 int RenderFrameImpl::GetRoutingID() { |
| 463 return routing_id_; | 467 return routing_id_; |
| 464 } | 468 } |
| 465 | 469 |
| 466 blink::WebPlugin* RenderFrameImpl::CreatePlugin( | 470 blink::WebPlugin* RenderFrameImpl::CreatePlugin( |
| 467 blink::WebFrame* frame, | 471 blink::WebFrame* frame, |
| 468 const WebPluginInfo& info, | 472 const WebPluginInfo& info, |
| 469 const blink::WebPluginParams& params) { | 473 const blink::WebPluginParams& params) { |
| 470 #if defined(ENABLE_PLUGINS) | 474 #if defined(ENABLE_PLUGINS) |
| 471 bool pepper_plugin_was_registered = false; | 475 bool pepper_plugin_was_registered = false; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 #endif // defined(ENABLE_PLUGINS) | 529 #endif // defined(ENABLE_PLUGINS) |
| 526 } | 530 } |
| 527 | 531 |
| 528 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( | 532 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( |
| 529 blink::WebFrame* frame, | 533 blink::WebFrame* frame, |
| 530 const blink::WebURL& url, | 534 const blink::WebURL& url, |
| 531 blink::WebMediaPlayerClient* client) { | 535 blink::WebMediaPlayerClient* client) { |
| 532 // TODO(nasko): Moving the implementation here involves moving a few media | 536 // TODO(nasko): Moving the implementation here involves moving a few media |
| 533 // related client objects here or referencing them in the RenderView. Needs | 537 // related client objects here or referencing them in the RenderView. Needs |
| 534 // more work to understand where the proper place for those objects is. | 538 // more work to understand where the proper place for those objects is. |
| 535 return render_view_->createMediaPlayer(frame, url, client); | 539 return render_view_->CreateMediaPlayer(this, frame, url, client); |
| 536 } | 540 } |
| 537 | 541 |
| 538 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( | 542 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( |
| 539 blink::WebFrame* frame, | 543 blink::WebFrame* frame, |
| 540 blink::WebApplicationCacheHostClient* client) { | 544 blink::WebApplicationCacheHostClient* client) { |
| 541 if (!frame || !frame->view()) | 545 if (!frame || !frame->view()) |
| 542 return NULL; | 546 return NULL; |
| 543 return new RendererWebApplicationCacheHostImpl( | 547 return new RendererWebApplicationCacheHostImpl( |
| 544 RenderViewImpl::FromWebView(frame->view()), client, | 548 RenderViewImpl::FromWebView(frame->view()), client, |
| 545 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 549 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1338 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { | 1342 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { |
| 1339 observers_.AddObserver(observer); | 1343 observers_.AddObserver(observer); |
| 1340 } | 1344 } |
| 1341 | 1345 |
| 1342 void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { | 1346 void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { |
| 1343 observer->RenderFrameGone(); | 1347 observer->RenderFrameGone(); |
| 1344 observers_.RemoveObserver(observer); | 1348 observers_.RemoveObserver(observer); |
| 1345 } | 1349 } |
| 1346 | 1350 |
| 1347 } // namespace content | 1351 } // namespace content |
| OLD | NEW |