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

Side by Side Diff: chrome/browser/ui/webui/plugins_ui.cc

Issue 11316163: Remove the last usages of PrefObserver outside of Prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build. Created 8 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) 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 }; 186 };
187 187
188 PluginsDOMHandler::PluginsDOMHandler() 188 PluginsDOMHandler::PluginsDOMHandler()
189 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { 189 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
190 } 190 }
191 191
192 void PluginsDOMHandler::RegisterMessages() { 192 void PluginsDOMHandler::RegisterMessages() {
193 Profile* profile = Profile::FromWebUI(web_ui()); 193 Profile* profile = Profile::FromWebUI(web_ui());
194 194
195 PrefService* prefs = profile->GetPrefs(); 195 PrefService* prefs = profile->GetPrefs();
196 show_details_.Init(prefs::kPluginsShowDetails, prefs, NULL); 196 show_details_.Init(prefs::kPluginsShowDetails, prefs);
197 197
198 registrar_.Add(this, 198 registrar_.Add(this,
199 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, 199 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED,
200 content::Source<Profile>(profile)); 200 content::Source<Profile>(profile));
201 201
202 web_ui()->RegisterMessageCallback("requestPluginsData", 202 web_ui()->RegisterMessageCallback("requestPluginsData",
203 base::Bind(&PluginsDOMHandler::HandleRequestPluginsData, 203 base::Bind(&PluginsDOMHandler::HandleRequestPluginsData,
204 base::Unretained(this))); 204 base::Unretained(this)));
205 web_ui()->RegisterMessageCallback("enablePlugin", 205 web_ui()->RegisterMessageCallback("enablePlugin",
206 base::Bind(&PluginsDOMHandler::HandleEnablePluginMessage, 206 base::Bind(&PluginsDOMHandler::HandleEnablePluginMessage,
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 } 491 }
492 492
493 // static 493 // static
494 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 494 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
495 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails, 495 prefs->RegisterBooleanPref(prefs::kPluginsShowDetails,
496 false, 496 false,
497 PrefService::UNSYNCABLE_PREF); 497 PrefService::UNSYNCABLE_PREF);
498 prefs->RegisterDictionaryPref(prefs::kContentSettingsPluginWhitelist, 498 prefs->RegisterDictionaryPref(prefs::kContentSettingsPluginWhitelist,
499 PrefService::SYNCABLE_PREF); 499 PrefService::SYNCABLE_PREF);
500 } 500 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698