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

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

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes only. Trybot happiness still applies. Created 9 years, 11 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
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 "chrome/renderer/render_view.h" 5 #include "chrome/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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 913
914 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, 914 WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame,
915 const WebPluginParams& params) { 915 const WebPluginParams& params) {
916 webkit::npapi::WebPluginInfo info; 916 webkit::npapi::WebPluginInfo info;
917 bool found; 917 bool found;
918 ContentSetting setting; 918 ContentSetting setting;
919 std::string mime_type; 919 std::string mime_type;
920 Send(new ViewHostMsg_GetPluginInfo( 920 Send(new ViewHostMsg_GetPluginInfo(
921 routing_id_, params.url, frame->top()->url(), params.mimeType.utf8(), 921 routing_id_, params.url, frame->top()->url(), params.mimeType.utf8(),
922 &found, &info, &setting, &mime_type)); 922 &found, &info, &setting, &mime_type));
923 if (!found || !info.enabled) 923 if (!found || !webkit::npapi::IsPluginEnabled(info))
924 return NULL; 924 return NULL;
925 925
926 scoped_refptr<webkit::ppapi::PluginModule> pepper_module( 926 scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
927 pepper_delegate_.CreatePepperPlugin(info.path)); 927 pepper_delegate_.CreatePepperPlugin(info.path));
928 if (pepper_module) 928 if (pepper_module)
929 return CreatePepperPlugin(frame, params, info.path, pepper_module.get()); 929 return CreatePepperPlugin(frame, params, info.path, pepper_module.get());
930 return CreateNPAPIPlugin(frame, params, info.path, mime_type); 930 return CreateNPAPIPlugin(frame, params, info.path, mime_type);
931 } 931 }
932 932
933 void RenderView::RegisterPluginDelegate(WebPluginDelegateProxy* delegate) { 933 void RenderView::RegisterPluginDelegate(WebPluginDelegateProxy* delegate) {
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2710 group->GetGroupName(), 2710 group->GetGroupName(),
2711 GURL(group->GetUpdateURL()))); 2711 GURL(group->GetUpdateURL())));
2712 return CreatePluginPlaceholder(frame, 2712 return CreatePluginPlaceholder(frame,
2713 params, 2713 params,
2714 *group, 2714 *group,
2715 IDR_BLOCKED_PLUGIN_HTML, 2715 IDR_BLOCKED_PLUGIN_HTML,
2716 IDS_PLUGIN_OUTDATED, 2716 IDS_PLUGIN_OUTDATED,
2717 false); 2717 false);
2718 } 2718 }
2719 2719
2720 if (!info.enabled) 2720 if (!webkit::npapi::IsPluginEnabled(info))
2721 return NULL; 2721 return NULL;
2722 2722
2723 ContentSetting host_setting = 2723 ContentSetting host_setting =
2724 current_content_settings_.settings[CONTENT_SETTINGS_TYPE_PLUGINS]; 2724 current_content_settings_.settings[CONTENT_SETTINGS_TYPE_PLUGINS];
2725 if (info.path.value() == webkit::npapi::kDefaultPluginLibraryName || 2725 if (info.path.value() == webkit::npapi::kDefaultPluginLibraryName ||
2726 plugin_setting == CONTENT_SETTING_ALLOW || 2726 plugin_setting == CONTENT_SETTING_ALLOW ||
2727 host_setting == CONTENT_SETTING_ALLOW) { 2727 host_setting == CONTENT_SETTING_ALLOW) {
2728 // Delay loading plugins if prerendering. 2728 // Delay loading plugins if prerendering.
2729 WebDataSource* ds = frame->dataSource(); 2729 WebDataSource* ds = frame->dataSource();
2730 NavigationState* navigation_state = NavigationState::FromDataSource(ds); 2730 NavigationState* navigation_state = NavigationState::FromDataSource(ds);
(...skipping 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after
5747 if (cmd == kJavaScriptStressTestSetStressRunType) { 5747 if (cmd == kJavaScriptStressTestSetStressRunType) {
5748 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); 5748 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param));
5749 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { 5749 } else if (cmd == kJavaScriptStressTestPrepareStressRun) {
5750 v8::Testing::PrepareStressRun(param); 5750 v8::Testing::PrepareStressRun(param);
5751 } 5751 }
5752 } 5752 }
5753 5753
5754 void RenderView::OnContextMenuClosed() { 5754 void RenderView::OnContextMenuClosed() {
5755 context_menu_node_.reset(); 5755 context_menu_node_.reset();
5756 } 5756 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm ('k') | webkit/plugins/npapi/plugin_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698