| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 #endif // defined(ENABLE_PLUGINS) | 525 #endif // defined(ENABLE_PLUGINS) |
| 522 } | 526 } |
| 523 | 527 |
| 524 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( | 528 blink::WebMediaPlayer* RenderFrameImpl::createMediaPlayer( |
| 525 blink::WebFrame* frame, | 529 blink::WebFrame* frame, |
| 526 const blink::WebURL& url, | 530 const blink::WebURL& url, |
| 527 blink::WebMediaPlayerClient* client) { | 531 blink::WebMediaPlayerClient* client) { |
| 528 // TODO(nasko): Moving the implementation here involves moving a few media | 532 // TODO(nasko): Moving the implementation here involves moving a few media |
| 529 // related client objects here or referencing them in the RenderView. Needs | 533 // related client objects here or referencing them in the RenderView. Needs |
| 530 // more work to understand where the proper place for those objects is. | 534 // more work to understand where the proper place for those objects is. |
| 531 return render_view_->createMediaPlayer(frame, url, client); | 535 return render_view_->CreateMediaPlayer(this, frame, url, client); |
| 532 } | 536 } |
| 533 | 537 |
| 534 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( | 538 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( |
| 535 blink::WebFrame* frame, | 539 blink::WebFrame* frame, |
| 536 blink::WebApplicationCacheHostClient* client) { | 540 blink::WebApplicationCacheHostClient* client) { |
| 537 if (!frame || !frame->view()) | 541 if (!frame || !frame->view()) |
| 538 return NULL; | 542 return NULL; |
| 539 return new RendererWebApplicationCacheHostImpl( | 543 return new RendererWebApplicationCacheHostImpl( |
| 540 RenderViewImpl::FromWebView(frame->view()), client, | 544 RenderViewImpl::FromWebView(frame->view()), client, |
| 541 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 545 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { | 1338 void RenderFrameImpl::AddObserver(RenderFrameObserver* observer) { |
| 1335 observers_.AddObserver(observer); | 1339 observers_.AddObserver(observer); |
| 1336 } | 1340 } |
| 1337 | 1341 |
| 1338 void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { | 1342 void RenderFrameImpl::RemoveObserver(RenderFrameObserver* observer) { |
| 1339 observer->RenderFrameGone(); | 1343 observer->RenderFrameGone(); |
| 1340 observers_.RemoveObserver(observer); | 1344 observers_.RemoveObserver(observer); |
| 1341 } | 1345 } |
| 1342 | 1346 |
| 1343 } // namespace content | 1347 } // namespace content |
| OLD | NEW |