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/options/font_settings_handler.h" | 5 #include "chrome/browser/ui/webui/options/font_settings_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 160 |
161 void FontSettingsHandler::OnExtensionLoaded( | 161 void FontSettingsHandler::OnExtensionLoaded( |
162 content::BrowserContext* browser_context, | 162 content::BrowserContext* browser_context, |
163 const extensions::Extension* extension) { | 163 const extensions::Extension* extension) { |
164 NotifyAdvancedFontSettingsAvailability(); | 164 NotifyAdvancedFontSettingsAvailability(); |
165 } | 165 } |
166 | 166 |
167 void FontSettingsHandler::OnExtensionUnloaded( | 167 void FontSettingsHandler::OnExtensionUnloaded( |
168 content::BrowserContext* browser_context, | 168 content::BrowserContext* browser_context, |
169 const extensions::Extension* extension, | 169 const extensions::Extension* extension, |
170 extensions::UnloadedExtensionInfo::Reason reason) { | 170 extensions::UnloadedExtensionReason reason) { |
171 NotifyAdvancedFontSettingsAvailability(); | 171 NotifyAdvancedFontSettingsAvailability(); |
172 } | 172 } |
173 | 173 |
174 void FontSettingsHandler::HandleFetchFontsData(const base::ListValue* args) { | 174 void FontSettingsHandler::HandleFetchFontsData(const base::ListValue* args) { |
175 content::GetFontListAsync( | 175 content::GetFontListAsync( |
176 base::Bind(&FontSettingsHandler::FontsListHasLoaded, | 176 base::Bind(&FontSettingsHandler::FontsListHasLoaded, |
177 weak_ptr_factory_.GetWeakPtr())); | 177 weak_ptr_factory_.GetWeakPtr())); |
178 } | 178 } |
179 | 179 |
180 void FontSettingsHandler::FontsListHasLoaded( | 180 void FontSettingsHandler::FontsListHasLoaded( |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); | 268 chrome::FindBrowserWithWebContents(web_ui()->GetWebContents())); |
269 } | 269 } |
270 | 270 |
271 void FontSettingsHandler::OnWebKitDefaultFontSizeChanged() { | 271 void FontSettingsHandler::OnWebKitDefaultFontSizeChanged() { |
272 SetUpStandardFontSample(); | 272 SetUpStandardFontSample(); |
273 SetUpSerifFontSample(); | 273 SetUpSerifFontSample(); |
274 SetUpSansSerifFontSample(); | 274 SetUpSansSerifFontSample(); |
275 } | 275 } |
276 | 276 |
277 } // namespace options | 277 } // namespace options |
OLD | NEW |