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

Unified Diff: third_party/WebKit/Source/modules/fontaccess/FontAccessDescription.h

Issue 1615133002: Implement API for accessing fonts installed locally on the system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing Mounir's comments. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fontaccess/FontAccessDescription.h
diff --git a/third_party/WebKit/Source/modules/fontaccess/FontAccessDescription.h b/third_party/WebKit/Source/modules/fontaccess/FontAccessDescription.h
new file mode 100644
index 0000000000000000000000000000000000000000..f6b16fc56d25e14ba9f1f11633f118ff80a8593e
--- /dev/null
+++ b/third_party/WebKit/Source/modules/fontaccess/FontAccessDescription.h
@@ -0,0 +1,43 @@
+// Copyright 2016 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.
+
+#ifndef FontAccessDescription_h
+#define FontAccessDescription_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+#include "public/platform/modules/font_access/WebFontAccessDescription.h"
+
+namespace blink {
+
+class FontAccessDescription
esprehn 2016/01/26 20:26:45 Where is this class used?
+ : public GarbageCollectedFinalized<FontAccessDescription>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+public:
+ using WebType = WebFontAccessDescription;
+ static FontAccessDescription* create(PassOwnPtr<WebFontAccessDescription> descriptor)
+ {
+ return new FontAccessDescription(descriptor);
+ }
+
+ explicit FontAccessDescription(PassOwnPtr<WebFontAccessDescription> descriptor)
+ : m_descriptor(descriptor)
+ {
+ }
+
+ virtual ~FontAccessDescription() {}
+
+ String family() const { return m_descriptor->family; }
+ String style() const { return m_descriptor->style; }
+
+ DEFINE_INLINE_TRACE() {}
+
+private:
+ OwnPtr<WebFontAccessDescription> m_descriptor;
esprehn 2016/01/26 20:26:45 This should just be two String family and style, n
+};
+
+} // namespace blink
+
+#endif // FontAccessDescription_h

Powered by Google App Engine
This is Rietveld 408576698