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

Side by Side Diff: chrome/browser/dom_ui/plugins_ui.cc

Issue 5998002: Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser/dom_ui/plugins_ui.h" 5 #include "chrome/browser/dom_ui/plugins_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/ui/browser_window.h" 25 #include "chrome/browser/ui/browser_window.h"
26 #include "chrome/common/chrome_paths.h" 26 #include "chrome/common/chrome_paths.h"
27 #include "chrome/common/jstemplate_builder.h" 27 #include "chrome/common/jstemplate_builder.h"
28 #include "chrome/common/notification_service.h" 28 #include "chrome/common/notification_service.h"
29 #include "chrome/common/pepper_plugin_registry.h" 29 #include "chrome/common/pepper_plugin_registry.h"
30 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
31 #include "chrome/common/url_constants.h" 31 #include "chrome/common/url_constants.h"
32 #include "grit/browser_resources.h" 32 #include "grit/browser_resources.h"
33 #include "grit/generated_resources.h" 33 #include "grit/generated_resources.h"
34 #include "grit/theme_resources.h" 34 #include "grit/theme_resources.h"
35 #include "webkit/plugins/npapi/plugin_list.h" 35 #include "webkit/glue/plugins/plugin_list.h"
36 36
37 namespace { 37 namespace {
38 38
39 /////////////////////////////////////////////////////////////////////////////// 39 ///////////////////////////////////////////////////////////////////////////////
40 // 40 //
41 // PluginsHTMLSource 41 // PluginsHTMLSource
42 // 42 //
43 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
44 44
45 class PluginsUIHTMLSource : public ChromeURLDataManager::DataSource { 45 class PluginsUIHTMLSource : public ChromeURLDataManager::DataSource {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 PluginUpdater* plugin_updater = PluginUpdater::GetInstance(); 217 PluginUpdater* plugin_updater = PluginUpdater::GetInstance();
218 if (is_group_str == "true") { 218 if (is_group_str == "true") {
219 string16 group_name; 219 string16 group_name;
220 if (!args->GetString(0, &group_name)) 220 if (!args->GetString(0, &group_name))
221 return; 221 return;
222 222
223 plugin_updater->EnablePluginGroup(enable, group_name); 223 plugin_updater->EnablePluginGroup(enable, group_name);
224 if (enable) { 224 if (enable) {
225 // See http://crbug.com/50105 for background. 225 // See http://crbug.com/50105 for background.
226 string16 adobereader = ASCIIToUTF16( 226 string16 adobereader = ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName);
227 webkit::npapi::PluginGroup::kAdobeReaderGroupName);
228 string16 internalpdf = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName); 227 string16 internalpdf = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName);
229 if (group_name == adobereader) { 228 if (group_name == adobereader) {
230 plugin_updater->EnablePluginGroup(false, internalpdf); 229 plugin_updater->EnablePluginGroup(false, internalpdf);
231 } else if (group_name == internalpdf) { 230 } else if (group_name == internalpdf) {
232 plugin_updater->EnablePluginGroup(false, adobereader); 231 plugin_updater->EnablePluginGroup(false, adobereader);
233 } 232 }
234 } 233 }
235 } else { 234 } else {
236 FilePath::StringType file_path; 235 FilePath::StringType file_path;
237 if (!args->GetString(0, &file_path)) 236 if (!args->GetString(0, &file_path))
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 330 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
332 FilePath internal_dir; 331 FilePath internal_dir;
333 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 332 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
334 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 333 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
335 internal_dir); 334 internal_dir);
336 335
337 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); 336 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist);
338 prefs->RegisterListPref(prefs::kPluginsPluginsList); 337 prefs->RegisterListPref(prefs::kPluginsPluginsList);
339 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); 338 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false);
340 } 339 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/gtk/content_setting_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698