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

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed)

Created:
7 years, 9 months ago by bbudge
Modified:
7 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, sail+watch_chromium.org
Visibility:
Public.

Description

Add Pepper TrueType font API plumbing. Adds Font resource and host, font singleton resource and host. Adds PPAPI IPC messages to communicate with renderer and browser. Adds Browser process font listing helper class abstraction and impls for Windows, Mac, and Linux. Font family enumeration is done in the browser process and is a rework of the trusted BrowserFont API. Adds Renderer process font helper class abstraction and impl stubs. Font operations are done in the renderer process because of Linux sandbox restrictions. BUG=79375 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=188576

Patch Set 1 : #

Total comments: 38

Patch Set 2 : Address dmichael's comments. #

Patch Set 3 : Rebase and add lost fixes. #

Patch Set 4 : Fix Windows compile. #

Total comments: 12

Patch Set 5 : Clean up font listing, rename SingletonHost to ListHost. #

Total comments: 5

Patch Set 6 : Check that desc.family value from plugin is UTF-8 before passing on to OS. #

Total comments: 12

Patch Set 7 : Address jschuh's first round of comments. #

Patch Set 8 : Fix linux_aura. Pango headers missing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1142 lines, -30 lines) Patch
M content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
A content/browser/renderer_host/pepper/pepper_truetype_font_list.h View 1 1 chunk +21 lines, -0 lines 0 comments Download
A content/browser/renderer_host/pepper/pepper_truetype_font_list_android.cc View 1 1 chunk +13 lines, -0 lines 0 comments Download
A content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
A + content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc View 1 2 3 4 5 6 4 chunks +21 lines, -30 lines 0 comments Download
A content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
A content/browser/renderer_host/pepper/pepper_truetype_font_list_mac.mm View 1 1 chunk +23 lines, -0 lines 0 comments Download
A content/browser/renderer_host/pepper/pepper_truetype_font_list_win.cc View 1 2 3 4 1 chunk +44 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 chunk +7 lines, -0 lines 0 comments Download
M content/renderer/pepper/content_renderer_pepper_host_factory.cc View 1 2 3 4 5 2 chunks +19 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_in_process_resource_creation.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_in_process_resource_creation.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font.h View 1 1 chunk +50 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font_android.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font_host.h View 1 chunk +50 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font_host.cc View 1 chunk +96 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font_linux.cc View 1 chunk +16 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font_mac.mm View 1 chunk +16 lines, -0 lines 0 comments Download
A content/renderer/pepper/pepper_truetype_font_win.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M ppapi/ppapi_proxy.gypi View 2 1 chunk +4 lines, -0 lines 0 comments Download
M ppapi/ppapi_shared.gypi View 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/proxy/interface_list.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 3 chunks +26 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_param_traits.h View 2 chunks +10 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_param_traits.cc View 1 chunk +37 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_instance_proxy.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ppapi/proxy/resource_creation_proxy.cc View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M ppapi/proxy/serialized_structs.h View 1 2 chunks +25 lines, -0 lines 0 comments Download
M ppapi/proxy/serialized_structs.cc View 1 1 chunk +34 lines, -0 lines 0 comments Download
A ppapi/proxy/truetype_font_resource.h View 1 1 chunk +73 lines, -0 lines 0 comments Download
A ppapi/proxy/truetype_font_resource.cc View 1 1 chunk +130 lines, -0 lines 0 comments Download
A ppapi/proxy/truetype_font_singleton_resource.h View 1 2 3 4 1 chunk +55 lines, -0 lines 0 comments Download
A ppapi/proxy/truetype_font_singleton_resource.cc View 1 2 3 4 1 chunk +68 lines, -0 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/shared_impl/singleton_resource_id.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/all_c_includes.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/thunk/interfaces_ppb_public_dev.h View 1 chunk +2 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_truetype_font_api.h View 1 chunk +36 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_truetype_font_singleton_api.h View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A ppapi/thunk/ppb_truetype_font_thunk.cc View 1 2 1 chunk +94 lines, -0 lines 0 comments Download
M ppapi/thunk/resource_creation_api.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_module.cc View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppapi_plugin_instance.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
bbudge
Brett for content plumbing and browser process rework of BrowserFont list stuff. David for PPAPI ...
7 years, 9 months ago (2013-03-11 22:53:18 UTC) #1
dmichael (off chromium)
Looks good overall; mostly nits. https://codereview.chromium.org/12600019/diff/4001/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc File content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc (right): https://codereview.chromium.org/12600019/diff/4001/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc#newcode67 content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc:67: } It looks like ...
7 years, 9 months ago (2013-03-12 18:07:58 UTC) #2
bbudge
Addressing David's comments. Ignore ppapi/thunk/enter.* files. These changes are in another CL but my feeble ...
7 years, 9 months ago (2013-03-13 01:26:50 UTC) #3
bbudge
Addressed David's comments, rebased, and recreated my branch locally. A git rebase went bad. PTAL
7 years, 9 months ago (2013-03-13 18:28:38 UTC) #4
dmichael (off chromium)
lgtm https://codereview.chromium.org/12600019/diff/38001/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc File content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc (right): https://codereview.chromium.org/12600019/diff/38001/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc#newcode23 content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc:23: sorted_families.insert(::pango_font_family_get_name(families[i])); BTW, why do you do the intermediate ...
7 years, 9 months ago (2013-03-13 20:20:25 UTC) #5
bbudge
https://codereview.chromium.org/12600019/diff/38001/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc File content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc (right): https://codereview.chromium.org/12600019/diff/38001/content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc#newcode23 content/browser/renderer_host/pepper/pepper_truetype_font_list_linux.cc:23: sorted_families.insert(::pango_font_family_get_name(families[i])); This code is originally from content/common/font_list_linux.cc. I assumed ...
7 years, 9 months ago (2013-03-13 21:20:37 UTC) #6
dmichael (off chromium)
OOps, noticed another nit https://codereview.chromium.org/12600019/diff/4001/content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h File content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h (right): https://codereview.chromium.org/12600019/diff/4001/content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h#newcode15 content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h:15: class PepperTrueTypeFontSingletonHost : public ppapi::host::ResourceHost ...
7 years, 9 months ago (2013-03-13 21:50:51 UTC) #7
bbudge
https://codereview.chromium.org/12600019/diff/4001/content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h File content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h (right): https://codereview.chromium.org/12600019/diff/4001/content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h#newcode15 content/browser/renderer_host/pepper/pepper_truetype_font_singleton_host.h:15: class PepperTrueTypeFontSingletonHost : public ppapi::host::ResourceHost { On 2013/03/13 21:50:51, ...
7 years, 9 months ago (2013-03-13 22:48:50 UTC) #8
brettw
lgtm
7 years, 9 months ago (2013-03-14 18:31:21 UTC) #9
bbudge
Added some explanation of the messages for jschuh to help with IPC message review. https://codereview.chromium.org/12600019/diff/56001/ppapi/proxy/ppapi_messages.h ...
7 years, 9 months ago (2013-03-14 18:57:13 UTC) #10
bbudge
https://codereview.chromium.org/12600019/diff/75001/content/renderer/pepper/content_renderer_pepper_host_factory.cc File content/renderer/pepper/content_renderer_pepper_host_factory.cc (right): https://codereview.chromium.org/12600019/diff/75001/content/renderer/pepper/content_renderer_pepper_host_factory.cc#newcode88 content/renderer/pepper/content_renderer_pepper_host_factory.cc:88: if (IsStringUTF8(desc.family)) { This check has to be done ...
7 years, 9 months ago (2013-03-14 19:31:22 UTC) #11
jschuh
A few comments. I'll make a last sanity check after resolving these. https://codereview.chromium.org/12600019/diff/75001/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc File content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc ...
7 years, 9 months ago (2013-03-14 21:56:07 UTC) #12
bbudge
Addressed first round of jschuh's comments. https://codereview.chromium.org/12600019/diff/75001/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc File content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc (right): https://codereview.chromium.org/12600019/diff/75001/content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc#newcode75 content/browser/renderer_host/pepper/pepper_truetype_font_list_host.cc:75: int result = ...
7 years, 9 months ago (2013-03-14 23:20:22 UTC) #13
jschuh
ipc security lgtm. https://codereview.chromium.org/12600019/diff/75001/ppapi/proxy/truetype_font_resource.cc File ppapi/proxy/truetype_font_resource.cc (right): https://codereview.chromium.org/12600019/diff/75001/ppapi/proxy/truetype_font_resource.cc#newcode97 ppapi/proxy/truetype_font_resource.cc:97: result == static_cast<int32_t>(tag_array.size())); On 2013/03/14 23:20:23, ...
7 years, 9 months ago (2013-03-15 18:28:01 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/12600019/83001
7 years, 9 months ago (2013-03-15 18:32:04 UTC) #15
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 9 months ago (2013-03-15 18:50:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/12600019/83001
7 years, 9 months ago (2013-03-15 19:22:16 UTC) #17
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 9 months ago (2013-03-15 20:15:52 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/12600019/23050
7 years, 9 months ago (2013-03-15 21:44:43 UTC) #19
commit-bot: I haz the power
7 years, 9 months ago (2013-03-16 09:57:58 UTC) #20
Message was sent while issue was closed.
Change committed as 188576

Powered by Google App Engine
This is Rietveld 408576698