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

Side by Side Diff: components/font_service/font_service_app.cc

Issue 2483013002: Mojo C++ bindings: Remove more use_new_wrapper_types=false. (Closed)
Patch Set: . Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 registry->AddInterface(this); 59 registry->AddInterface(this);
60 return true; 60 return true;
61 } 61 }
62 62
63 void FontServiceApp::Create( 63 void FontServiceApp::Create(
64 const service_manager::Identity& remote_identity, 64 const service_manager::Identity& remote_identity,
65 mojo::InterfaceRequest<mojom::FontService> request) { 65 mojo::InterfaceRequest<mojom::FontService> request) {
66 bindings_.AddBinding(this, std::move(request)); 66 bindings_.AddBinding(this, std::move(request));
67 } 67 }
68 68
69 void FontServiceApp::MatchFamilyName(const mojo::String& family_name, 69 void FontServiceApp::MatchFamilyName(const std::string& family_name,
70 mojom::TypefaceStylePtr requested_style, 70 mojom::TypefaceStylePtr requested_style,
71 const MatchFamilyNameCallback& callback) { 71 const MatchFamilyNameCallback& callback) {
72 SkFontConfigInterface::FontIdentity result_identity; 72 SkFontConfigInterface::FontIdentity result_identity;
73 SkString result_family; 73 SkString result_family;
74 SkFontStyle result_style; 74 SkFontStyle result_style;
75 SkFontConfigInterface* fc = 75 SkFontConfigInterface* fc =
76 SkFontConfigInterface::GetSingletonDirectInterface(); 76 SkFontConfigInterface::GetSingletonDirectInterface();
77 const bool r = fc->matchFamilyName( 77 const bool r = fc->matchFamilyName(
78 family_name.data(), 78 family_name.data(),
79 SkFontStyle(requested_style->weight, 79 SkFontStyle(requested_style->weight,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 int count = paths_.size(); 121 int count = paths_.size();
122 for (int i = 0; i < count; ++i) { 122 for (int i = 0; i < count; ++i) {
123 if (path == paths_[i]) 123 if (path == paths_[i])
124 return i; 124 return i;
125 } 125 }
126 paths_.emplace_back(path); 126 paths_.emplace_back(path);
127 return count; 127 return count;
128 } 128 }
129 129
130 } // namespace font_service 130 } // namespace font_service
OLDNEW
« no previous file with comments | « components/font_service/font_service_app.h ('k') | components/font_service/public/cpp/font_service_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698