| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 registry_.AddInterface(this); | 43 registry_.AddInterface(this); |
| 44 } | 44 } |
| 45 | 45 |
| 46 FontServiceApp::~FontServiceApp() {} | 46 FontServiceApp::~FontServiceApp() {} |
| 47 | 47 |
| 48 void FontServiceApp::OnStart() { | 48 void FontServiceApp::OnStart() { |
| 49 tracing_.Initialize(context()->connector(), context()->identity().name()); | 49 tracing_.Initialize(context()->connector(), context()->identity().name()); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void FontServiceApp::OnBindInterface( | 52 void FontServiceApp::OnBindInterface( |
| 53 const service_manager::ServiceInfo& source_info, | 53 const service_manager::BindSourceInfo& source_info, |
| 54 const std::string& interface_name, | 54 const std::string& interface_name, |
| 55 mojo::ScopedMessagePipeHandle interface_pipe) { | 55 mojo::ScopedMessagePipeHandle interface_pipe) { |
| 56 registry_.BindInterface(source_info.identity, interface_name, | 56 registry_.BindInterface(source_info.identity, interface_name, |
| 57 std::move(interface_pipe)); | 57 std::move(interface_pipe)); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void FontServiceApp::Create( | 60 void FontServiceApp::Create( |
| 61 const service_manager::Identity& remote_identity, | 61 const service_manager::Identity& remote_identity, |
| 62 mojo::InterfaceRequest<mojom::FontService> request) { | 62 mojo::InterfaceRequest<mojom::FontService> request) { |
| 63 bindings_.AddBinding(this, std::move(request)); | 63 bindings_.AddBinding(this, std::move(request)); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 int count = paths_.size(); | 118 int count = paths_.size(); |
| 119 for (int i = 0; i < count; ++i) { | 119 for (int i = 0; i < count; ++i) { |
| 120 if (path == paths_[i]) | 120 if (path == paths_[i]) |
| 121 return i; | 121 return i; |
| 122 } | 122 } |
| 123 paths_.emplace_back(path); | 123 paths_.emplace_back(path); |
| 124 return count; | 124 return count; |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace font_service | 127 } // namespace font_service |
| OLD | NEW |