Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 376033002: Adding MimeHandlerView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pending-zork-patch2
Patch Set: With the new attach approach Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 const blink::WebPluginParams& params) { 1512 const blink::WebPluginParams& params) {
1513 DCHECK_EQ(frame_, frame); 1513 DCHECK_EQ(frame_, frame);
1514 blink::WebPlugin* plugin = NULL; 1514 blink::WebPlugin* plugin = NULL;
1515 if (GetContentClient()->renderer()->OverrideCreatePlugin( 1515 if (GetContentClient()->renderer()->OverrideCreatePlugin(
1516 this, frame, params, &plugin)) { 1516 this, frame, params, &plugin)) {
1517 return plugin; 1517 return plugin;
1518 } 1518 }
1519 1519
1520 if (base::UTF16ToUTF8(params.mimeType) == kBrowserPluginMimeType) { 1520 if (base::UTF16ToUTF8(params.mimeType) == kBrowserPluginMimeType) {
1521 return render_view_->GetBrowserPluginManager()->CreateBrowserPlugin( 1521 return render_view_->GetBrowserPluginManager()->CreateBrowserPlugin(
1522 render_view_.get(), frame, false); 1522 render_view_.get(), frame, false, "");
1523 } 1523 }
1524 1524
1525 #if defined(ENABLE_PLUGINS) 1525 #if defined(ENABLE_PLUGINS)
1526 WebPluginInfo info; 1526 WebPluginInfo info;
1527 std::string mime_type; 1527 std::string mime_type;
1528 bool found = false; 1528 bool found = false;
1529 Send(new FrameHostMsg_GetPluginInfo( 1529 Send(new FrameHostMsg_GetPluginInfo(
1530 routing_id_, params.url, frame->top()->document().url(), 1530 routing_id_, params.url, frame->top()->document().url(),
1531 params.mimeType.utf8(), &found, &info, &mime_type)); 1531 params.mimeType.utf8(), &found, &info, &mime_type));
1532 if (!found) 1532 if (!found)
1533 return NULL; 1533 return NULL;
1534 1534
1535 if (info.type == content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) { 1535 if (info.type == content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) {
1536 return render_view_->GetBrowserPluginManager()->CreateBrowserPlugin( 1536 return render_view_->GetBrowserPluginManager()->CreateBrowserPlugin(
Fady Samuel 2014/08/29 18:52:32 Create a Delegate here, and pass it in.
lazyboy 2014/08/29 22:08:25 Done.
1537 render_view_.get(), frame, true); 1537 render_view_.get(), frame, true, base::UTF16ToUTF8(params.mimeType));
1538 } 1538 }
1539 1539
1540 1540
1541 WebPluginParams params_to_use = params; 1541 WebPluginParams params_to_use = params;
1542 params_to_use.mimeType = WebString::fromUTF8(mime_type); 1542 params_to_use.mimeType = WebString::fromUTF8(mime_type);
1543 return CreatePlugin(frame, info, params_to_use); 1543 return CreatePlugin(frame, info, params_to_use);
1544 #else 1544 #else
1545 return NULL; 1545 return NULL;
1546 #endif // defined(ENABLE_PLUGINS) 1546 #endif // defined(ENABLE_PLUGINS)
1547 } 1547 }
(...skipping 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
3820 3820
3821 #if defined(ENABLE_BROWSER_CDMS) 3821 #if defined(ENABLE_BROWSER_CDMS)
3822 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3822 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3823 if (!cdm_manager_) 3823 if (!cdm_manager_)
3824 cdm_manager_ = new RendererCdmManager(this); 3824 cdm_manager_ = new RendererCdmManager(this);
3825 return cdm_manager_; 3825 return cdm_manager_;
3826 } 3826 }
3827 #endif // defined(ENABLE_BROWSER_CDMS) 3827 #endif // defined(ENABLE_BROWSER_CDMS)
3828 3828
3829 } // namespace content 3829 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698