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 #include "components/font_service/font_service_app.h" | 5 #include "components/font_service/font_service_app.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 } | 41 } |
42 | 42 |
43 } // namespace | 43 } // namespace |
44 | 44 |
45 namespace font_service { | 45 namespace font_service { |
46 | 46 |
47 FontServiceApp::FontServiceApp() {} | 47 FontServiceApp::FontServiceApp() {} |
48 | 48 |
49 FontServiceApp::~FontServiceApp() {} | 49 FontServiceApp::~FontServiceApp() {} |
50 | 50 |
51 void FontServiceApp::OnStart(const shell::Identity& identity) { | 51 void FontServiceApp::OnStart(const service_manager::Identity& identity) { |
52 tracing_.Initialize(connector(), identity.name()); | 52 tracing_.Initialize(connector(), identity.name()); |
53 } | 53 } |
54 | 54 |
55 bool FontServiceApp::OnConnect(const shell::Identity& remote_identity, | 55 bool FontServiceApp::OnConnect(const service_manager::Identity& remote_identity, |
56 shell::InterfaceRegistry* registry) { | 56 service_manager::InterfaceRegistry* registry) { |
57 registry->AddInterface(this); | 57 registry->AddInterface(this); |
58 return true; | 58 return true; |
59 } | 59 } |
60 | 60 |
61 void FontServiceApp::Create( | 61 void FontServiceApp::Create( |
62 const shell::Identity& remote_identity, | 62 const service_manager::Identity& remote_identity, |
63 mojo::InterfaceRequest<mojom::FontService> request) { | 63 mojo::InterfaceRequest<mojom::FontService> request) { |
64 bindings_.AddBinding(this, std::move(request)); | 64 bindings_.AddBinding(this, std::move(request)); |
65 } | 65 } |
66 | 66 |
67 void FontServiceApp::MatchFamilyName(const mojo::String& family_name, | 67 void FontServiceApp::MatchFamilyName(const mojo::String& family_name, |
68 mojom::TypefaceStylePtr requested_style, | 68 mojom::TypefaceStylePtr requested_style, |
69 const MatchFamilyNameCallback& callback) { | 69 const MatchFamilyNameCallback& callback) { |
70 SkFontConfigInterface::FontIdentity result_identity; | 70 SkFontConfigInterface::FontIdentity result_identity; |
71 SkString result_family; | 71 SkString result_family; |
72 SkFontStyle result_style; | 72 SkFontStyle result_style; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 int count = paths_.size(); | 119 int count = paths_.size(); |
120 for (int i = 0; i < count; ++i) { | 120 for (int i = 0; i < count; ++i) { |
121 if (path == paths_[i]) | 121 if (path == paths_[i]) |
122 return i; | 122 return i; |
123 } | 123 } |
124 paths_.emplace_back(path); | 124 paths_.emplace_back(path); |
125 return count; | 125 return count; |
126 } | 126 } |
127 | 127 |
128 } // namespace font_service | 128 } // namespace font_service |
OLD | NEW |