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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 376033002: Adding MimeHandlerView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pending-zork-patch2
Patch Set: remove some printfs. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/chrome_content_renderer_client.cc
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 23eb94b1d72c7775e1105804d5bb032dd7ba40b8..1cbdfe7c28fbd73e4da4f94dc20f16485f8a8f4d 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/renderer/chrome_content_renderer_client.h"
+#include "base/debug/stack_trace.h"
#include "base/command_line.h"
#include "base/debug/crash_logging.h"
@@ -495,7 +496,9 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
content::RenderFrame* render_frame,
WebLocalFrame* frame,
const WebPluginParams& params,
+ int* instance_id,
WebPlugin** plugin) {
+ *instance_id = -1; // kInstanceIDNone.
std::string orig_mime_type = params.mimeType.utf8();
if (orig_mime_type == content::kBrowserPluginMimeType) {
WebDocument document = frame->document();
@@ -518,9 +521,15 @@ bool ChromeContentRendererClient::OverrideCreatePlugin(
render_frame->Send(new ChromeViewHostMsg_GetPluginInfo(
render_frame->GetRoutingID(), GURL(params.url),
frame->top()->document().url(), orig_mime_type, &output));
+ printf("PLUGIN_TYPE_BROWSER_PLUGIN: %d\n",
+ content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN);
- if (output.plugin.type == content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN)
+ // This would result in double GetPluginInfo, once from here and one more time
+ // from content/.
+ if (output.plugin.type == content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN) {
+ *instance_id = output.instance_id;
return false;
+ }
#else
output.status.value = ChromeViewHostMsg_GetPluginInfo_Status::kNotFound;
#endif

Powered by Google App Engine
This is Rietveld 408576698