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

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

Issue 9224002: Make WebUI objects not derive from WebUI. WebUI objects own the controller. This is the ownership... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync to head to clear linux_chromeos browsertest failures Created 8 years, 11 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) 2011 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"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/string_number_conversions.h" 13 #include "base/string_number_conversions.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/character_encoding.h" 17 #include "chrome/browser/character_encoding.h"
18 #include "chrome/browser/prefs/pref_service.h" 18 #include "chrome/browser/prefs/pref_service.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/webui/options/font_settings_utils.h" 20 #include "chrome/browser/ui/webui/options/font_settings_utils.h"
21 #include "chrome/common/chrome_notification_types.h" 21 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "content/browser/webui/web_ui.h"
23 #include "content/public/browser/notification_details.h" 24 #include "content/public/browser/notification_details.h"
24 #include "grit/chromium_strings.h" 25 #include "grit/chromium_strings.h"
25 #include "grit/generated_resources.h" 26 #include "grit/generated_resources.h"
26 #include "ui/base/l10n/l10n_util.h" 27 #include "ui/base/l10n/l10n_util.h"
27 28
28 FontSettingsHandler::FontSettingsHandler() { 29 FontSettingsHandler::FontSettingsHandler() {
29 } 30 }
30 31
31 FontSettingsHandler::~FontSettingsHandler() { 32 FontSettingsHandler::~FontSettingsHandler() {
32 } 33 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 base::FundamentalValue size_value(default_fixed_font_size_.GetValue()); 198 base::FundamentalValue size_value(default_fixed_font_size_.GetValue());
198 web_ui()->CallJavascriptFunction( 199 web_ui()->CallJavascriptFunction(
199 "FontSettings.setUpFixedFontSample", font_value, size_value); 200 "FontSettings.setUpFixedFontSample", font_value, size_value);
200 } 201 }
201 202
202 void FontSettingsHandler::SetUpMinimumFontSample() { 203 void FontSettingsHandler::SetUpMinimumFontSample() {
203 base::FundamentalValue size_value(minimum_font_size_.GetValue()); 204 base::FundamentalValue size_value(minimum_font_size_.GetValue());
204 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample", 205 web_ui()->CallJavascriptFunction("FontSettings.setUpMinimumFontSample",
205 size_value); 206 size_value);
206 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698