| 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 "base/files/file.h" | 7 #include "base/files/file.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "mojo/application/public/cpp/application_connection.h" | 9 #include "mojo/application/public/cpp/application_connection.h" |
| 10 #include "mojo/platform_handle/platform_handle_functions.h" | 10 #include "mojo/platform_handle/platform_handle_functions.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace | 51 } // namespace |
| 52 | 52 |
| 53 namespace font_service { | 53 namespace font_service { |
| 54 | 54 |
| 55 FontServiceApp::FontServiceApp() {} | 55 FontServiceApp::FontServiceApp() {} |
| 56 | 56 |
| 57 FontServiceApp::~FontServiceApp() {} | 57 FontServiceApp::~FontServiceApp() {} |
| 58 | 58 |
| 59 void FontServiceApp::Initialize(mojo::ApplicationImpl* app) {} | 59 void FontServiceApp::Initialize(mojo::ApplicationImpl* app) { |
| 60 tracing_.Initialize(app); |
| 61 } |
| 60 | 62 |
| 61 bool FontServiceApp::ConfigureIncomingConnection( | 63 bool FontServiceApp::ConfigureIncomingConnection( |
| 62 mojo::ApplicationConnection* connection) { | 64 mojo::ApplicationConnection* connection) { |
| 63 connection->AddService(this); | 65 connection->AddService(this); |
| 64 return true; | 66 return true; |
| 65 } | 67 } |
| 66 | 68 |
| 67 void FontServiceApp::Create(mojo::ApplicationConnection* connection, | 69 void FontServiceApp::Create(mojo::ApplicationConnection* connection, |
| 68 mojo::InterfaceRequest<FontService> request) { | 70 mojo::InterfaceRequest<FontService> request) { |
| 69 bindings_.AddBinding(this, request.Pass()); | 71 bindings_.AddBinding(this, request.Pass()); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 int count = paths_.count(); | 116 int count = paths_.count(); |
| 115 for (int i = 0; i < count; ++i) { | 117 for (int i = 0; i < count; ++i) { |
| 116 if (path == *paths_[i]) | 118 if (path == *paths_[i]) |
| 117 return i; | 119 return i; |
| 118 } | 120 } |
| 119 *paths_.append() = new SkString(path); | 121 *paths_.append() = new SkString(path); |
| 120 return count; | 122 return count; |
| 121 } | 123 } |
| 122 | 124 |
| 123 } // namespace font_service | 125 } // namespace font_service |
| OLD | NEW |