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

Side by Side Diff: chrome/browser/ui/webui/options/font_settings_handler.cc

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright bumps Created 8 years, 9 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) 2011 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 <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"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 }; 59 };
60 60
61 RegisterStrings(localized_strings, resources, arraysize(resources)); 61 RegisterStrings(localized_strings, resources, arraysize(resources));
62 RegisterTitle(localized_strings, "fontSettingsPage", 62 RegisterTitle(localized_strings, "fontSettingsPage",
63 IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE); 63 IDS_FONT_LANGUAGE_SETTING_FONT_TAB_TITLE);
64 localized_strings->SetString("fontSettingsPlaceholder", 64 localized_strings->SetString("fontSettingsPlaceholder",
65 l10n_util::GetStringUTF16( 65 l10n_util::GetStringUTF16(
66 IDS_FONT_LANGUAGE_SETTING_PLACEHOLDER)); 66 IDS_FONT_LANGUAGE_SETTING_PLACEHOLDER));
67 } 67 }
68 68
69 void FontSettingsHandler::Initialize() { 69 void FontSettingsHandler::InitializeHandler() {
70 DCHECK(web_ui()); 70 DCHECK(web_ui());
71 SetUpStandardFontSample(); 71 SetUpStandardFontSample();
72 SetUpSerifFontSample(); 72 SetUpSerifFontSample();
73 SetUpSansSerifFontSample(); 73 SetUpSansSerifFontSample();
74 SetUpFixedFontSample(); 74 SetUpFixedFontSample();
75 SetUpMinimumFontSample(); 75 SetUpMinimumFontSample();
76 } 76 }
77 77
78 void FontSettingsHandler::RegisterMessages() { 78 void FontSettingsHandler::RegisterMessages() {
79 // Perform validation for saved fonts. 79 // Perform validation for saved fonts.
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 base::FundamentalValue size_value(default_fixed_font_size_.GetValue()); 199 base::FundamentalValue size_value(default_fixed_font_size_.GetValue());
200 web_ui()->CallJavascriptFunction( 200 web_ui()->CallJavascriptFunction(
201 "FontSettings.setUpFixedFontSample", font_value, size_value); 201 "FontSettings.setUpFixedFontSample", font_value, size_value);
202 } 202 }
203 203
204 void FontSettingsHandler::SetUpMinimumFontSample() { 204 void FontSettingsHandler::SetUpMinimumFontSample() {
205 base::FundamentalValue size_value(minimum_font_size_.GetValue()); 205 base::FundamentalValue size_value(minimum_font_size_.GetValue());
206 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", 206 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample",
207 size_value); 207 size_value);
208 } 208 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_handler.h ('k') | chrome/browser/ui/webui/options/handler_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698