| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class FontServiceApp : public shell::Service, | 21 class FontServiceApp : public shell::Service, |
| 22 public shell::InterfaceFactory<mojom::FontService>, | 22 public shell::InterfaceFactory<mojom::FontService>, |
| 23 public mojom::FontService { | 23 public mojom::FontService { |
| 24 public: | 24 public: |
| 25 FontServiceApp(); | 25 FontServiceApp(); |
| 26 ~FontServiceApp() override; | 26 ~FontServiceApp() override; |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // shell::Service: | 29 // shell::Service: |
| 30 void OnStart(const shell::Identity& identity) override; | 30 void OnStart(const shell::Identity& identity) override; |
| 31 bool OnConnect(shell::Connection* connection) override; | 31 bool OnConnect(const shell::Identity& remote_identity, |
| 32 shell::InterfaceRegistry* registry) override; |
| 32 | 33 |
| 33 // shell::InterfaceFactory<mojom::FontService>: | 34 // shell::InterfaceFactory<mojom::FontService>: |
| 34 void Create(const shell::Identity& remote_identity, | 35 void Create(const shell::Identity& remote_identity, |
| 35 mojo::InterfaceRequest<mojom::FontService> request) override; | 36 mojo::InterfaceRequest<mojom::FontService> request) override; |
| 36 | 37 |
| 37 // FontService: | 38 // FontService: |
| 38 void MatchFamilyName(const mojo::String& family_name, | 39 void MatchFamilyName(const mojo::String& family_name, |
| 39 mojom::TypefaceStylePtr requested_style, | 40 mojom::TypefaceStylePtr requested_style, |
| 40 const MatchFamilyNameCallback& callback) override; | 41 const MatchFamilyNameCallback& callback) override; |
| 41 void OpenStream(uint32_t id_number, | 42 void OpenStream(uint32_t id_number, |
| 42 const OpenStreamCallback& callback) override; | 43 const OpenStreamCallback& callback) override; |
| 43 | 44 |
| 44 int FindOrAddPath(const SkString& path); | 45 int FindOrAddPath(const SkString& path); |
| 45 | 46 |
| 46 mojo::BindingSet<mojom::FontService> bindings_; | 47 mojo::BindingSet<mojom::FontService> bindings_; |
| 47 | 48 |
| 48 tracing::Provider tracing_; | 49 tracing::Provider tracing_; |
| 49 | 50 |
| 50 // We don't want to leak paths to our callers; we thus enumerate the paths of | 51 // We don't want to leak paths to our callers; we thus enumerate the paths of |
| 51 // fonts. | 52 // fonts. |
| 52 std::vector<SkString> paths_; | 53 std::vector<SkString> paths_; |
| 53 | 54 |
| 54 DISALLOW_COPY_AND_ASSIGN(FontServiceApp); | 55 DISALLOW_COPY_AND_ASSIGN(FontServiceApp); |
| 55 }; | 56 }; |
| 56 | 57 |
| 57 } // namespace font_service | 58 } // namespace font_service |
| 58 | 59 |
| 59 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ | 60 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ |
| OLD | NEW |