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

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

Issue 2420253002: Rename shell namespace to service_manager (Closed)
Patch Set: . Created 4 years, 2 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
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 #ifndef COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ 5 #ifndef COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_
6 #define COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ 6 #define COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/font_service/public/interfaces/font_service.mojom.h" 12 #include "components/font_service/public/interfaces/font_service.mojom.h"
13 #include "mojo/public/cpp/bindings/binding_set.h" 13 #include "mojo/public/cpp/bindings/binding_set.h"
14 #include "services/service_manager/public/cpp/interface_factory.h" 14 #include "services/service_manager/public/cpp/interface_factory.h"
15 #include "services/service_manager/public/cpp/service.h" 15 #include "services/service_manager/public/cpp/service.h"
16 #include "services/tracing/public/cpp/provider.h" 16 #include "services/tracing/public/cpp/provider.h"
17 #include "skia/ext/skia_utils_base.h" 17 #include "skia/ext/skia_utils_base.h"
18 18
19 namespace font_service { 19 namespace font_service {
20 20
21 class FontServiceApp : public shell::Service, 21 class FontServiceApp
22 public shell::InterfaceFactory<mojom::FontService>, 22 : public service_manager::Service,
23 public mojom::FontService { 23 public service_manager::InterfaceFactory<mojom::FontService>,
24 public mojom::FontService {
24 public: 25 public:
25 FontServiceApp(); 26 FontServiceApp();
26 ~FontServiceApp() override; 27 ~FontServiceApp() override;
27 28
28 private: 29 private:
29 // shell::Service: 30 // service_manager::Service:
30 void OnStart(const shell::Identity& identity) override; 31 void OnStart(const service_manager::Identity& identity) override;
31 bool OnConnect(const shell::Identity& remote_identity, 32 bool OnConnect(const service_manager::Identity& remote_identity,
32 shell::InterfaceRegistry* registry) override; 33 service_manager::InterfaceRegistry* registry) override;
33 34
34 // shell::InterfaceFactory<mojom::FontService>: 35 // service_manager::InterfaceFactory<mojom::FontService>:
35 void Create(const shell::Identity& remote_identity, 36 void Create(const service_manager::Identity& remote_identity,
36 mojo::InterfaceRequest<mojom::FontService> request) override; 37 mojo::InterfaceRequest<mojom::FontService> request) override;
37 38
38 // FontService: 39 // FontService:
39 void MatchFamilyName(const mojo::String& family_name, 40 void MatchFamilyName(const mojo::String& family_name,
40 mojom::TypefaceStylePtr requested_style, 41 mojom::TypefaceStylePtr requested_style,
41 const MatchFamilyNameCallback& callback) override; 42 const MatchFamilyNameCallback& callback) override;
42 void OpenStream(uint32_t id_number, 43 void OpenStream(uint32_t id_number,
43 const OpenStreamCallback& callback) override; 44 const OpenStreamCallback& callback) override;
44 45
45 int FindOrAddPath(const SkString& path); 46 int FindOrAddPath(const SkString& path);
46 47
47 mojo::BindingSet<mojom::FontService> bindings_; 48 mojo::BindingSet<mojom::FontService> bindings_;
48 49
49 tracing::Provider tracing_; 50 tracing::Provider tracing_;
50 51
51 // We don't want to leak paths to our callers; we thus enumerate the paths of 52 // We don't want to leak paths to our callers; we thus enumerate the paths of
52 // fonts. 53 // fonts.
53 std::vector<SkString> paths_; 54 std::vector<SkString> paths_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(FontServiceApp); 56 DISALLOW_COPY_AND_ASSIGN(FontServiceApp);
56 }; 57 };
57 58
58 } // namespace font_service 59 } // namespace font_service
59 60
60 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_ 61 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_
OLDNEW
« no previous file with comments | « components/filesystem/public/cpp/prefs/pref_service_factory.cc ('k') | components/font_service/font_service_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698