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

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

Issue 7477044: Use PluginPrefs in ChromePluginServiceFilter to check whether a plugin is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view.h ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_view.h" 5 #include "content/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 547 }
548 548
549 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, 549 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame,
550 const WebPluginParams& params) { 550 const WebPluginParams& params) {
551 webkit::npapi::WebPluginInfo info; 551 webkit::npapi::WebPluginInfo info;
552 bool found; 552 bool found;
553 std::string mime_type; 553 std::string mime_type;
554 Send(new ViewHostMsg_GetPluginInfo( 554 Send(new ViewHostMsg_GetPluginInfo(
555 routing_id_, params.url, frame->top()->document().url(), 555 routing_id_, params.url, frame->top()->document().url(),
556 params.mimeType.utf8(), &found, &info, &mime_type)); 556 params.mimeType.utf8(), &found, &info, &mime_type));
557 if (!found || !webkit::npapi::IsPluginEnabled(info)) 557 if (!found)
558 return NULL; 558 return NULL;
559 559
560 bool pepper_plugin_was_registered = false; 560 bool pepper_plugin_was_registered = false;
561 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( 561 scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
562 pepper_delegate_.CreatePepperPlugin(info.path, 562 pepper_delegate_.CreatePepperPlugin(info.path,
563 &pepper_plugin_was_registered)); 563 &pepper_plugin_was_registered));
564 if (pepper_plugin_was_registered) { 564 if (pepper_plugin_was_registered) {
565 if (pepper_module) 565 if (pepper_module)
566 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); 566 return CreatePepperPlugin(frame, params, info.path, pepper_module.get());
567 return NULL; 567 return NULL;
(...skipping 3888 matching lines...) Expand 10 before | Expand all | Expand 10 after
4456 } 4456 }
4457 #endif 4457 #endif
4458 4458
4459 void RenderView::OnContextMenuClosed( 4459 void RenderView::OnContextMenuClosed(
4460 const webkit_glue::CustomContextMenuContext& custom_context) { 4460 const webkit_glue::CustomContextMenuContext& custom_context) {
4461 if (custom_context.is_pepper_menu) 4461 if (custom_context.is_pepper_menu)
4462 pepper_delegate_.OnContextMenuClosed(custom_context); 4462 pepper_delegate_.OnContextMenuClosed(custom_context);
4463 else 4463 else
4464 context_menu_node_.reset(); 4464 context_menu_node_.reset();
4465 } 4465 }
OLDNEW
« no previous file with comments | « content/renderer/render_view.h ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698