| 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 // 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 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.Get(); | 219 return g_factory.Pointer(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 bool FontSettingsClearFontFunction::RunImpl() { | 222 bool FontSettingsClearFontFunction::RunImpl() { |
| 223 if (GetProfile()->IsOffTheRecord()) { | 223 if (GetProfile()->IsOffTheRecord()) { |
| 224 error_ = kSetFromIncognitoError; | 224 error_ = kSetFromIncognitoError; |
| 225 return false; | 225 return false; |
| 226 } | 226 } |
| 227 | 227 |
| 228 scoped_ptr<fonts::ClearFont::Params> params( | 228 scoped_ptr<fonts::ClearFont::Params> params( |
| 229 fonts::ClearFont::Params::Create(*args_)); | 229 fonts::ClearFont::Params::Create(*args_)); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |