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

Unified Diff: components/font_service/public/interfaces/font_service.mojom

Issue 1280043003: Sandbox html_viewer on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update DEPS for the new dependency. Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/font_service/public/interfaces/BUILD.gn ('k') | components/html_viewer/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/font_service/public/interfaces/font_service.mojom
diff --git a/components/font_service/public/interfaces/font_service.mojom b/components/font_service/public/interfaces/font_service.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..3d53b0007f30616b9eadd31754ebc1fce7ac1aef
--- /dev/null
+++ b/components/font_service/public/interfaces/font_service.mojom
@@ -0,0 +1,38 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+module font_service;
+
+enum TypefaceStyle {
+ NORMAL = 0,
+ BOLD = 0x01,
+ ITALIC = 0x02,
+ BOLD_ITALIC = 0x03
+};
+
+// A reference to specific font on the font service.
+struct FontIdentity {
+ uint32 id;
+ int32 ttc_index;
+ // TODO(erg): So the string is supposed to be a path. However, the current
+ // chrome code goes out of its way to send this to the renderer process, and
+ // it is passed to blink, even though the openStream() IPC in chrome uses the
+ // id number instead. Do more investigation about what we need to do to plug
+ // this system path leak.
+ string str_representation;
+};
+
+// Loads and resolves fonts.
+//
+// We still need to load fonts from within a sandboxed process. We set
+// up a service to match fonts and load them,
+interface FontService {
+ // Returns the best match for |family_name| and |style|. On error, returns a
+ // null |identity|.
+ MatchFamilyName(string family_name, TypefaceStyle style) =>
+ (FontIdentity? identity, string family_name, TypefaceStyle style);
+
+ // Returns a handle to the raw font specified by |id_number|.
+ OpenStream(uint32 id_number) => (handle font_handle);
+};
« no previous file with comments | « components/font_service/public/interfaces/BUILD.gn ('k') | components/html_viewer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698