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.h

Issue 1276163002: Revert of Sandbox html_viewer on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/DEPS ('k') | components/font_service/font_service_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_
6 #define COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_
7
8 #include "components/font_service/public/interfaces/font_service.mojom.h"
9 #include "mojo/application/public/cpp/application_delegate.h"
10 #include "mojo/application/public/cpp/interface_factory.h"
11 #include "mojo/common/weak_binding_set.h"
12 #include "skia/ext/skia_utils_base.h"
13
14 namespace font_service {
15
16 class FontServiceApp : public mojo::ApplicationDelegate,
17 public mojo::InterfaceFactory<FontService>,
18 public FontService {
19 public:
20 FontServiceApp();
21 ~FontServiceApp() override;
22
23 private:
24 // ApplicationDelegate:
25 void Initialize(mojo::ApplicationImpl* app) override;
26 bool ConfigureIncomingConnection(
27 mojo::ApplicationConnection* connection) override;
28
29 // mojo::InterfaceFactory<FontService>:
30 void Create(mojo::ApplicationConnection* connection,
31 mojo::InterfaceRequest<FontService> request) override;
32
33 // FontService:
34 void MatchFamilyName(const mojo::String& family_name,
35 TypefaceStyle requested_style,
36 const MatchFamilyNameCallback& callback) override;
37 void OpenStream(uint32_t id_number,
38 const OpenStreamCallback& callback) override;
39
40 int FindOrAddPath(const SkString& path);
41
42 mojo::WeakBindingSet<FontService> bindings_;
43
44 // We don't want to leak paths to our callers; we thus enumerate the paths of
45 // fonts.
46 SkTDArray<SkString*> paths_;
47
48 DISALLOW_COPY_AND_ASSIGN(FontServiceApp);
49 };
50
51 } // namespace font_service
52
53 #endif // COMPONENTS_FONT_SERVICE_FONT_SERVICE_APP_H_
OLDNEW
« no previous file with comments | « components/font_service/DEPS ('k') | components/font_service/font_service_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698