| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ | 5 #ifndef COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ |
| 6 #define COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ | 6 #define COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ |
| 7 | 7 |
| 8 #include "components/font_service/public/interfaces/font_service.mojom.h" | 8 #include "components/font_service/public/interfaces/font_service.mojom.h" |
| 9 #include "mojo/application/public/cpp/application_delegate.h" | 9 #include "mojo/application/public/cpp/application_delegate.h" |
| 10 #include "mojo/application/public/cpp/interface_factory.h" | 10 #include "mojo/application/public/cpp/interface_factory.h" |
| 11 #include "mojo/common/weak_binding_set.h" | 11 #include "mojo/common/weak_binding_set.h" |
| 12 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
| 12 #include "skia/ext/skia_utils_base.h" | 13 #include "skia/ext/skia_utils_base.h" |
| 13 | 14 |
| 14 namespace font_service { | 15 namespace font_service { |
| 15 | 16 |
| 16 class FontServiceApp : public mojo::ApplicationDelegate, | 17 class FontServiceApp : public mojo::ApplicationDelegate, |
| 17 public mojo::InterfaceFactory<FontService>, | 18 public mojo::InterfaceFactory<FontService>, |
| 18 public FontService { | 19 public FontService { |
| 19 public: | 20 public: |
| 20 FontServiceApp(); | 21 FontServiceApp(); |
| 21 ~FontServiceApp() override; | 22 ~FontServiceApp() override; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 34 void MatchFamilyName(const mojo::String& family_name, | 35 void MatchFamilyName(const mojo::String& family_name, |
| 35 TypefaceStyle requested_style, | 36 TypefaceStyle requested_style, |
| 36 const MatchFamilyNameCallback& callback) override; | 37 const MatchFamilyNameCallback& callback) override; |
| 37 void OpenStream(uint32_t id_number, | 38 void OpenStream(uint32_t id_number, |
| 38 const OpenStreamCallback& callback) override; | 39 const OpenStreamCallback& callback) override; |
| 39 | 40 |
| 40 int FindOrAddPath(const SkString& path); | 41 int FindOrAddPath(const SkString& path); |
| 41 | 42 |
| 42 mojo::WeakBindingSet<FontService> bindings_; | 43 mojo::WeakBindingSet<FontService> bindings_; |
| 43 | 44 |
| 45 mojo::TracingImpl tracing_; |
| 46 |
| 44 // We don't want to leak paths to our callers; we thus enumerate the paths of | 47 // We don't want to leak paths to our callers; we thus enumerate the paths of |
| 45 // fonts. | 48 // fonts. |
| 46 SkTDArray<SkString*> paths_; | 49 SkTDArray<SkString*> paths_; |
| 47 | 50 |
| 48 DISALLOW_COPY_AND_ASSIGN(FontServiceApp); | 51 DISALLOW_COPY_AND_ASSIGN(FontServiceApp); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 } // namespace font_service | 54 } // namespace font_service |
| 52 | 55 |
| 53 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ | 56 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ |
| OLD | NEW |