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