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

Side by Side Diff: chrome/browser/extensions/api/font_settings/font_settings_api.cc

Issue 166053003: Move ProfileKeyedAPI implementations to take BrowserContext in the constructor (part 2). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: | Created 6 years, 10 months 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 // Font Settings Extension API implementation. 5 // Font Settings Extension API implementation.
6 6
7 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h" 7 #include "chrome/browser/extensions/api/font_settings/font_settings_api.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 extensions::preference_helpers::DispatchEventToExtensions( 198 extensions::preference_helpers::DispatchEventToExtensions(
199 profile_, 199 profile_,
200 event_name, 200 event_name,
201 &args, 201 &args,
202 APIPermission::kFontSettings, 202 APIPermission::kFontSettings,
203 false, 203 false,
204 pref_name); 204 pref_name);
205 } 205 }
206 206
207 FontSettingsAPI::FontSettingsAPI(Profile* profile) 207 FontSettingsAPI::FontSettingsAPI(content::BrowserContext* context)
208 : font_settings_event_router_(new FontSettingsEventRouter(profile)) { 208 : font_settings_event_router_(
209 } 209 new FontSettingsEventRouter(Profile::FromBrowserContext(context))) {}
210 210
211 FontSettingsAPI::~FontSettingsAPI() { 211 FontSettingsAPI::~FontSettingsAPI() {
212 } 212 }
213 213
214 static base::LazyInstance<ProfileKeyedAPIFactory<FontSettingsAPI> > 214 static base::LazyInstance<ProfileKeyedAPIFactory<FontSettingsAPI> >
215 g_factory = LAZY_INSTANCE_INITIALIZER; 215 g_factory = LAZY_INSTANCE_INITIALIZER;
216 216
217 // static 217 // static
218 ProfileKeyedAPIFactory<FontSettingsAPI>* FontSettingsAPI::GetFactoryInstance() { 218 ProfileKeyedAPIFactory<FontSettingsAPI>* FontSettingsAPI::GetFactoryInstance() {
219 return g_factory.Pointer(); 219 return g_factory.Pointer();
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 const char* FontSettingsSetMinimumFontSizeFunction::GetPrefName() { 448 const char* FontSettingsSetMinimumFontSizeFunction::GetPrefName() {
449 return prefs::kWebKitMinimumFontSize; 449 return prefs::kWebKitMinimumFontSize;
450 } 450 }
451 451
452 const char* FontSettingsSetMinimumFontSizeFunction::GetKey() { 452 const char* FontSettingsSetMinimumFontSizeFunction::GetKey() {
453 return kPixelSizeKey; 453 return kPixelSizeKey;
454 } 454 }
455 455
456 } // namespace extensions 456 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/font_settings/font_settings_api.h ('k') | chrome/browser/extensions/api/history/history_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698