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

Issue 9836036: Add getDefaultFontSize and setDefaultFontSize to Font Settings Extension API. (Closed)

Created:
8 years, 9 months ago by falken
Modified:
8 years, 9 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Aaron Boodman, mihaip+watch_chromium.org
Visibility:
Public.

Description

Add getDefaultFontSize and setDefaultFontSize to Font Settings Extension API. BUG=114148 TEST=manually and browser_tests --gtest_filter=ExtensionApiTest.FontSettings Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=128879

Patch Set 1 #

Total comments: 7

Patch Set 2 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -8 lines) Patch
M chrome/browser/extensions/extension_font_settings_api.h View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_font_settings_api.cc View 5 chunks +29 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_function_registry.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/extensions/api/experimental.fontSettings.json View 1 chunk +52 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/examples/api/fontSettings.zip View 1 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/common/extensions/docs/examples/api/fontSettings/popup.html View 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/examples/api/fontSettings/popup.js View 2 chunks +16 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/experimental.fontSettings.html View 3 chunks +254 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/samples.html View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/samples.json View 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/test/data/extensions/api_test/font_settings/test.js View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
falken
Hi Matt, PTAL.
8 years, 9 months ago (2012-03-23 14:08:04 UTC) #1
Matt Perry
lgtm https://chromiumcodereview.appspot.com/9836036/diff/1/chrome/browser/extensions/extension_font_settings_api.cc File chrome/browser/extensions/extension_font_settings_api.cc (right): https://chromiumcodereview.appspot.com/9836036/diff/1/chrome/browser/extensions/extension_font_settings_api.cc#newcode149 chrome/browser/extensions/extension_font_settings_api.cc:149: DictionaryValue* result = new DictionaryValue(); why not just ...
8 years, 9 months ago (2012-03-23 18:32:53 UTC) #2
falken
Thanks for the review. https://chromiumcodereview.appspot.com/9836036/diff/1/chrome/browser/extensions/extension_font_settings_api.cc File chrome/browser/extensions/extension_font_settings_api.cc (right): https://chromiumcodereview.appspot.com/9836036/diff/1/chrome/browser/extensions/extension_font_settings_api.cc#newcode149 chrome/browser/extensions/extension_font_settings_api.cc:149: DictionaryValue* result = new DictionaryValue(); ...
8 years, 9 months ago (2012-03-24 04:27:13 UTC) #3
Matt Perry
https://chromiumcodereview.appspot.com/9836036/diff/1/chrome/browser/extensions/extension_font_settings_api.cc File chrome/browser/extensions/extension_font_settings_api.cc (right): https://chromiumcodereview.appspot.com/9836036/diff/1/chrome/browser/extensions/extension_font_settings_api.cc#newcode149 chrome/browser/extensions/extension_font_settings_api.cc:149: DictionaryValue* result = new DictionaryValue(); On 2012/03/24 04:27:13, falken ...
8 years, 9 months ago (2012-03-26 18:31:18 UTC) #4
falken
8 years, 9 months ago (2012-03-27 02:04:11 UTC) #5
http://codereview.chromium.org/9836036/diff/1/chrome/common/extensions/api/ex...
File chrome/common/extensions/api/experimental.fontSettings.json (right):

http://codereview.chromium.org/9836036/diff/1/chrome/common/extensions/api/ex...
chrome/common/extensions/api/experimental.fontSettings.json:137: "description":
"This parameter is currently unused."
On 2012/03/26 18:31:18, Matt Perry wrote:
> On 2012/03/24 04:27:13, falken wrote:
> > On 2012/03/23 18:32:53, Matt Perry wrote:
> > > Just remove this param if its not used. Do you have plans to make use of
it?
> > 
> > Yes, I think eventually we want the font size prefs to also be per-script,
at
> > least for minimum font size (http://crbug.com/17078). I figure reserving
this
> > parameter would make it less disruptive to extend the API if that happens.
> 
> OK, makes sense. Do you foresee it being optional? (i.e. omitting it means
"get
> font size for all fonts" ?) If so, I'd make it optional now. Otherwise, this
is
> good.

OK, I'll make it optional in the next patch
(http://codereview.chromium.org/9853013/). I thought it would have to be
specified whenever the callback is specified (due to the order of parameters),
but it seems to work.

Powered by Google App Engine
This is Rietveld 408576698