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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months 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
« no previous file with comments | « components/font_service/font_service_app.h ('k') | components/font_service/main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 } // namespace 46 } // namespace
47 47
48 namespace font_service { 48 namespace font_service {
49 49
50 FontServiceApp::FontServiceApp() {} 50 FontServiceApp::FontServiceApp() {}
51 51
52 FontServiceApp::~FontServiceApp() {} 52 FontServiceApp::~FontServiceApp() {}
53 53
54 void FontServiceApp::Initialize(mojo::Connector* connector, 54 void FontServiceApp::Initialize(shell::Connector* connector,
55 const mojo::Identity& identity, 55 const shell::Identity& identity,
56 uint32_t id) { 56 uint32_t id) {
57 tracing_.Initialize(connector, identity.name()); 57 tracing_.Initialize(connector, identity.name());
58 } 58 }
59 59
60 bool FontServiceApp::AcceptConnection(mojo::Connection* connection) { 60 bool FontServiceApp::AcceptConnection(shell::Connection* connection) {
61 connection->AddInterface(this); 61 connection->AddInterface(this);
62 return true; 62 return true;
63 } 63 }
64 64
65 void FontServiceApp::Create(mojo::Connection* connection, 65 void FontServiceApp::Create(shell::Connection* connection,
66 mojo::InterfaceRequest<FontService> request) { 66 mojo::InterfaceRequest<FontService> request) {
67 bindings_.AddBinding(this, std::move(request)); 67 bindings_.AddBinding(this, std::move(request));
68 } 68 }
69 69
70 void FontServiceApp::MatchFamilyName(const mojo::String& family_name, 70 void FontServiceApp::MatchFamilyName(const mojo::String& family_name,
71 TypefaceStylePtr requested_style, 71 TypefaceStylePtr requested_style,
72 const MatchFamilyNameCallback& callback) { 72 const MatchFamilyNameCallback& callback) {
73 SkFontConfigInterface::FontIdentity result_identity; 73 SkFontConfigInterface::FontIdentity result_identity;
74 SkString result_family; 74 SkString result_family;
75 SkFontStyle result_style; 75 SkFontStyle result_style;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 int count = paths_.size(); 122 int count = paths_.size();
123 for (int i = 0; i < count; ++i) { 123 for (int i = 0; i < count; ++i) {
124 if (path == paths_[i]) 124 if (path == paths_[i])
125 return i; 125 return i;
126 } 126 }
127 paths_.emplace_back(path); 127 paths_.emplace_back(path);
128 return count; 128 return count;
129 } 129 }
130 130
131 } // namespace font_service 131 } // namespace font_service
OLDNEW
« no previous file with comments | « components/font_service/font_service_app.h ('k') | components/font_service/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698