| 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/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 blink::WebLocalFrame* frame, | 1545 blink::WebLocalFrame* frame, |
| 1546 const blink::WebPluginParams& params) { | 1546 const blink::WebPluginParams& params) { |
| 1547 DCHECK_EQ(frame_, frame); | 1547 DCHECK_EQ(frame_, frame); |
| 1548 blink::WebPlugin* plugin = NULL; | 1548 blink::WebPlugin* plugin = NULL; |
| 1549 if (GetContentClient()->renderer()->OverrideCreatePlugin( | 1549 if (GetContentClient()->renderer()->OverrideCreatePlugin( |
| 1550 this, frame, params, &plugin)) { | 1550 this, frame, params, &plugin)) { |
| 1551 return plugin; | 1551 return plugin; |
| 1552 } | 1552 } |
| 1553 | 1553 |
| 1554 if (base::UTF16ToUTF8(params.mimeType) == kBrowserPluginMimeType) { | 1554 if (base::UTF16ToUTF8(params.mimeType) == kBrowserPluginMimeType) { |
| 1555 scoped_ptr<BrowserPluginDelegate> browser_plugin_delegate( |
| 1556 GetContentClient()->renderer()->CreateBrowserPluginDelegate( |
| 1557 this, base::UTF16ToUTF8(params.mimeType))); |
| 1555 return render_view_->GetBrowserPluginManager()->CreateBrowserPlugin( | 1558 return render_view_->GetBrowserPluginManager()->CreateBrowserPlugin( |
| 1556 render_view_.get(), frame, scoped_ptr<BrowserPluginDelegate>()); | 1559 render_view_.get(), frame, browser_plugin_delegate.Pass()); |
| 1557 } | 1560 } |
| 1558 | 1561 |
| 1559 #if defined(ENABLE_PLUGINS) | 1562 #if defined(ENABLE_PLUGINS) |
| 1560 WebPluginInfo info; | 1563 WebPluginInfo info; |
| 1561 std::string mime_type; | 1564 std::string mime_type; |
| 1562 bool found = false; | 1565 bool found = false; |
| 1563 Send(new FrameHostMsg_GetPluginInfo( | 1566 Send(new FrameHostMsg_GetPluginInfo( |
| 1564 routing_id_, params.url, frame->top()->document().url(), | 1567 routing_id_, params.url, frame->top()->document().url(), |
| 1565 params.mimeType.utf8(), &found, &info, &mime_type)); | 1568 params.mimeType.utf8(), &found, &info, &mime_type)); |
| 1566 if (!found) | 1569 if (!found) |
| (...skipping 2337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3904 | 3907 |
| 3905 #if defined(ENABLE_BROWSER_CDMS) | 3908 #if defined(ENABLE_BROWSER_CDMS) |
| 3906 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 3909 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 3907 if (!cdm_manager_) | 3910 if (!cdm_manager_) |
| 3908 cdm_manager_ = new RendererCdmManager(this); | 3911 cdm_manager_ = new RendererCdmManager(this); |
| 3909 return cdm_manager_; | 3912 return cdm_manager_; |
| 3910 } | 3913 } |
| 3911 #endif // defined(ENABLE_BROWSER_CDMS) | 3914 #endif // defined(ENABLE_BROWSER_CDMS) |
| 3912 | 3915 |
| 3913 } // namespace content | 3916 } // namespace content |
| OLD | NEW |