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/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1531 pref_service->SetInteger(prefs::kWebKitDefaultFontSize, font_size); | 1531 pref_service->SetInteger(prefs::kWebKitDefaultFontSize, font_size); |
1532 SetupFontSizeSelector(); | 1532 SetupFontSizeSelector(); |
1533 } | 1533 } |
1534 } | 1534 } |
1535 } | 1535 } |
1536 | 1536 |
1537 void BrowserOptionsHandler::HandleDefaultZoomFactor( | 1537 void BrowserOptionsHandler::HandleDefaultZoomFactor( |
1538 const base::ListValue* args) { | 1538 const base::ListValue* args) { |
1539 double zoom_factor; | 1539 double zoom_factor; |
1540 if (ExtractDoubleValue(args, &zoom_factor)) { | 1540 if (ExtractDoubleValue(args, &zoom_factor)) { |
1541 // TODO9wjmaclean) Verify this is still correct. | |
Fady Samuel
2014/11/03 18:57:45
typo
wjmaclean
2014/11/03 21:53:59
Done.
Removed Todo.
| |
1541 Profile::FromWebUI(web_ui())->GetZoomLevelPrefs()->SetDefaultZoomLevelPref( | 1542 Profile::FromWebUI(web_ui())->GetZoomLevelPrefs()->SetDefaultZoomLevelPref( |
1542 content::ZoomFactorToZoomLevel(zoom_factor)); | 1543 content::ZoomFactorToZoomLevel(zoom_factor)); |
1543 } | 1544 } |
1544 } | 1545 } |
1545 | 1546 |
1546 void BrowserOptionsHandler::HandleRestartBrowser(const base::ListValue* args) { | 1547 void BrowserOptionsHandler::HandleRestartBrowser(const base::ListValue* args) { |
1547 #if defined(OS_WIN) && defined(USE_ASH) | 1548 #if defined(OS_WIN) && defined(USE_ASH) |
1548 // If hardware acceleration is disabled then we need to force restart | 1549 // If hardware acceleration is disabled then we need to force restart |
1549 // browser in desktop mode. | 1550 // browser in desktop mode. |
1550 // TODO(shrikant): Remove this once we fix start mode logic for browser. | 1551 // TODO(shrikant): Remove this once we fix start mode logic for browser. |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1989 | 1990 |
1990 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, | 1991 void BrowserOptionsHandler::SetMetricsReportingCheckbox(bool checked, |
1991 bool disabled) { | 1992 bool disabled) { |
1992 web_ui()->CallJavascriptFunction( | 1993 web_ui()->CallJavascriptFunction( |
1993 "BrowserOptions.setMetricsReportingCheckboxState", | 1994 "BrowserOptions.setMetricsReportingCheckboxState", |
1994 base::FundamentalValue(checked), | 1995 base::FundamentalValue(checked), |
1995 base::FundamentalValue(disabled)); | 1996 base::FundamentalValue(disabled)); |
1996 } | 1997 } |
1997 | 1998 |
1998 } // namespace options | 1999 } // namespace options |
OLD | NEW |