OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/plugins_ui.h" | 5 #include "chrome/browser/ui/webui/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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 namespace { | 60 namespace { |
61 | 61 |
62 // Callback function to process result of EnablePlugin method. | 62 // Callback function to process result of EnablePlugin method. |
63 void AssertPluginEnabled(bool did_enable) { | 63 void AssertPluginEnabled(bool did_enable) { |
64 DCHECK(did_enable); | 64 DCHECK(did_enable); |
65 } | 65 } |
66 | 66 |
67 content::WebUIDataSource* CreatePluginsUIHTMLSource(Profile* profile) { | 67 content::WebUIDataSource* CreatePluginsUIHTMLSource(Profile* profile) { |
68 content::WebUIDataSource* source = | 68 content::WebUIDataSource* source = |
69 content::WebUIDataSource::Create(chrome::kChromeUIPluginsHost); | 69 content::WebUIDataSource::Create(chrome::kChromeUIPluginsHost); |
70 source->SetUseJsonJSFormatV2(); | |
71 | 70 |
72 source->AddLocalizedString("pluginsTitle", IDS_PLUGINS_TITLE); | 71 source->AddLocalizedString("pluginsTitle", IDS_PLUGINS_TITLE); |
73 source->AddLocalizedString("pluginsDetailsModeLink", | 72 source->AddLocalizedString("pluginsDetailsModeLink", |
74 IDS_PLUGINS_DETAILS_MODE_LINK); | 73 IDS_PLUGINS_DETAILS_MODE_LINK); |
75 source->AddLocalizedString("pluginsNoneInstalled", | 74 source->AddLocalizedString("pluginsNoneInstalled", |
76 IDS_PLUGINS_NONE_INSTALLED); | 75 IDS_PLUGINS_NONE_INSTALLED); |
77 source->AddLocalizedString("pluginDisabled", IDS_PLUGINS_DISABLED_PLUGIN); | 76 source->AddLocalizedString("pluginDisabled", IDS_PLUGINS_DISABLED_PLUGIN); |
78 source->AddLocalizedString("pluginDisabledByPolicy", | 77 source->AddLocalizedString("pluginDisabledByPolicy", |
79 IDS_PLUGINS_DISABLED_BY_POLICY_PLUGIN); | 78 IDS_PLUGINS_DISABLED_BY_POLICY_PLUGIN); |
80 source->AddLocalizedString("pluginEnabledByPolicy", | 79 source->AddLocalizedString("pluginEnabledByPolicy", |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 void PluginsUI::RegisterProfilePrefs( | 516 void PluginsUI::RegisterProfilePrefs( |
518 user_prefs::PrefRegistrySyncable* registry) { | 517 user_prefs::PrefRegistrySyncable* registry) { |
519 registry->RegisterBooleanPref( | 518 registry->RegisterBooleanPref( |
520 prefs::kPluginsShowDetails, | 519 prefs::kPluginsShowDetails, |
521 false, | 520 false, |
522 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 521 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
523 registry->RegisterDictionaryPref( | 522 registry->RegisterDictionaryPref( |
524 prefs::kContentSettingsPluginWhitelist, | 523 prefs::kContentSettingsPluginWhitelist, |
525 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 524 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
526 } | 525 } |
OLD | NEW |