OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_FONT_ACCESS_WEB_FONT_ACCESS_IMPL_H_ |
| 6 #define CONTENT_RENDERER_FONT_ACCESS_WEB_FONT_ACCESS_IMPL_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "content/common/content_export.h" |
| 10 #include "content/common/font_access/font_access_service.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/lib/buffer.h" |
| 12 #include "third_party/WebKit/public/platform/modules/font_access/WebFontAccess.h
" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 class CONTENT_EXPORT WebFontAccessImpl final |
| 17 : NON_EXPORTED_BASE(public blink::WebFontAccess) { |
| 18 public: |
| 19 WebFontAccessImpl(); |
| 20 ~WebFontAccessImpl() override; |
| 21 |
| 22 void getFonts(blink::FontAccessCallbacks*) override; |
| 23 void getFontWebData(const blink::WebString& family, |
| 24 const blink::WebString& style, |
| 25 blink::FontDataCallbacks*) override; |
| 26 |
| 27 private: |
| 28 void FontListHasLoaded(scoped_ptr<blink::FontAccessCallbacks> callbacks, |
| 29 mojo::Array<FontDescriptionPtr> fonts); |
| 30 void FontDataHasLoaded(scoped_ptr<blink::FontDataCallbacks> callbacks, |
| 31 mojo::ScopedSharedBufferHandle handle, |
| 32 uint64_t size); |
| 33 |
| 34 FontAccessServicePtr& GetService(); |
| 35 |
| 36 FontAccessServicePtr provider_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(WebFontAccessImpl); |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_RENDERER_FONT_ACCESS_WEB_FONT_ACCESS_IMPL_H_ |
OLD | NEW |