| 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 #include "chrome/browser/ui/webui/options2/font_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options2/font_settings_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 return static_cast<gfx::PlatformFontWin*>(font.platform_font())-> | 43 return static_cast<gfx::PlatformFontWin*>(font.platform_font())-> |
| 44 GetLocalizedFontName(); | 44 GetLocalizedFontName(); |
| 45 #else | 45 #else |
| 46 return font_name; | 46 return font_name; |
| 47 #endif | 47 #endif |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace | 50 } // namespace |
| 51 | 51 |
| 52 | 52 |
| 53 namespace options2 { | 53 namespace options { |
| 54 | 54 |
| 55 FontSettingsHandler::FontSettingsHandler() { | 55 FontSettingsHandler::FontSettingsHandler() { |
| 56 } | 56 } |
| 57 | 57 |
| 58 FontSettingsHandler::~FontSettingsHandler() { | 58 FontSettingsHandler::~FontSettingsHandler() { |
| 59 } | 59 } |
| 60 | 60 |
| 61 void FontSettingsHandler::GetLocalizedValues( | 61 void FontSettingsHandler::GetLocalizedValues( |
| 62 DictionaryValue* localized_strings) { | 62 DictionaryValue* localized_strings) { |
| 63 DCHECK(localized_strings); | 63 DCHECK(localized_strings); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 web_ui()->CallJavascriptFunction( | 238 web_ui()->CallJavascriptFunction( |
| 239 "FontSettings.setUpFixedFontSample", font_value, size_value); | 239 "FontSettings.setUpFixedFontSample", font_value, size_value); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void FontSettingsHandler::SetUpMinimumFontSample() { | 242 void FontSettingsHandler::SetUpMinimumFontSample() { |
| 243 base::FundamentalValue size_value(minimum_font_size_.GetValue()); | 243 base::FundamentalValue size_value(minimum_font_size_.GetValue()); |
| 244 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", | 244 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", |
| 245 size_value); | 245 size_value); |
| 246 } | 246 } |
| 247 | 247 |
| 248 } // namespace options2 | 248 } // namespace options |
| OLD | NEW |