OLD | NEW |
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/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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(const ListValue* args) { | 238 void PluginsDOMHandler::HandleSaveShowDetailsToPrefs(const ListValue* args) { |
239 std::string details_mode; | 239 std::string details_mode; |
240 if (!args->GetString(0, &details_mode)) { | 240 if (!args->GetString(0, &details_mode)) { |
241 NOTREACHED(); | 241 NOTREACHED(); |
242 return; | 242 return; |
243 } | 243 } |
244 show_details_.SetValue(details_mode == "true"); | 244 show_details_.SetValue(details_mode == "true"); |
245 } | 245 } |
246 | 246 |
247 void PluginsDOMHandler::HandleGetShowDetails(const ListValue* args) { | 247 void PluginsDOMHandler::HandleGetShowDetails(const ListValue* args) { |
248 base::FundamentalValue show_details(show_details_.GetValue()); | 248 base::BooleanValue show_details(show_details_.GetValue()); |
249 web_ui_->CallJavascriptFunction("loadShowDetailsFromPrefs", show_details); | 249 web_ui_->CallJavascriptFunction("loadShowDetailsFromPrefs", show_details); |
250 } | 250 } |
251 | 251 |
252 void PluginsDOMHandler::Observe(int type, | 252 void PluginsDOMHandler::Observe(int type, |
253 const NotificationSource& source, | 253 const NotificationSource& source, |
254 const NotificationDetails& details) { | 254 const NotificationDetails& details) { |
255 DCHECK_EQ(content::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, type); | 255 DCHECK_EQ(content::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, type); |
256 LoadPlugins(); | 256 LoadPlugins(); |
257 } | 257 } |
258 | 258 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, | 329 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, |
330 false, | 330 false, |
331 PrefService::UNSYNCABLE_PREF); | 331 PrefService::UNSYNCABLE_PREF); |
332 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, | 332 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, |
333 false, | 333 false, |
334 PrefService::UNSYNCABLE_PREF); | 334 PrefService::UNSYNCABLE_PREF); |
335 prefs->RegisterBooleanPref(prefs::kPluginsShowSetReaderDefaultInfobar, | 335 prefs->RegisterBooleanPref(prefs::kPluginsShowSetReaderDefaultInfobar, |
336 true, | 336 true, |
337 PrefService::UNSYNCABLE_PREF); | 337 PrefService::UNSYNCABLE_PREF); |
338 } | 338 } |
OLD | NEW |