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

Unified Diff: content/renderer/font_access/web_font_access_impl.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 Nasko. Created 4 years, 10 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 | « content/content_tests.gypi ('k') | content/renderer/font_access/web_font_access_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/font_access/web_font_access_impl.h
diff --git a/content/renderer/font_access/web_font_access_impl.h b/content/renderer/font_access/web_font_access_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..05a7095d4d1a39a686cb833f08f6fb3706b1ce34
--- /dev/null
+++ b/content/renderer/font_access/web_font_access_impl.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 CONTENT_RENDERER_FONT_ACCESS_WEB_FONT_ACCESS_IMPL_H_
+#define CONTENT_RENDERER_FONT_ACCESS_WEB_FONT_ACCESS_IMPL_H_
+
+#include "base/compiler_specific.h"
+#include "content/common/content_export.h"
+#include "content/common/font_access/font_access_service.mojom.h"
+#include "mojo/public/cpp/bindings/lib/buffer.h"
+#include "third_party/WebKit/public/platform/modules/font_access/WebFontAccess.h"
+
+namespace content {
+
+class CONTENT_EXPORT WebFontAccessImpl final
+ : NON_EXPORTED_BASE(public blink::WebFontAccess) {
+ public:
+ WebFontAccessImpl();
+ ~WebFontAccessImpl() override;
+
+ void getFonts(blink::FontAccessCallbacks*) override;
+ void getFontWebData(const blink::WebString& family,
+ const blink::WebString& style,
+ blink::FontDataCallbacks*) override;
+
+ private:
+ void FontListHasLoaded(scoped_ptr<blink::FontAccessCallbacks> callbacks,
+ mojo::Array<FontDescriptionPtr> fonts);
+ void FontDataHasLoaded(scoped_ptr<blink::FontDataCallbacks> callbacks,
+ mojo::ScopedSharedBufferHandle handle,
+ uint64_t size);
+
+ FontAccessServicePtr& GetService();
+
+ FontAccessServicePtr provider_;
+
+ DISALLOW_COPY_AND_ASSIGN(WebFontAccessImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_FONT_ACCESS_WEB_FONT_ACCESS_IMPL_H_
« no previous file with comments | « content/content_tests.gypi ('k') | content/renderer/font_access/web_font_access_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698