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

Side by Side Diff: sky/viewer/sky_viewer_base.h

Issue 1083273003: Expose some sky_viewer plumbing to allow for reuse (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/viewer/sky_loader.cc ('k') | sky/viewer/sky_viewer_base.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 SKY_VIEWER_SKY_VIEWER_BASE_H_
6 #define SKY_VIEWER_SKY_VIEWER_BASE_H_
7
8 #include "mojo/common/tracing_impl.h"
9 #include "mojo/icu/icu.h"
10 #include "mojo/public/cpp/application/application_connection.h"
11 #include "mojo/public/cpp/application/application_delegate.h"
12 #include "mojo/public/cpp/application/application_impl.h"
13 #include "mojo/public/cpp/application/interface_factory_impl.h"
14 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom. h"
15 #include "sky/services/platform/platform_impl.h"
16
17 namespace sky {
18
19 // An abstract class that handles most of the details of setting up an
20 // application that is intended to run Sky content. Subclasses must implement
21 // the mojo::InterfaceFactory<mojo::ContentHandler>::Create() method to
22 // specialize this class with the concrete content handler that they are using.
23 class SkyViewerBase : public mojo::ApplicationDelegate,
24 public mojo::InterfaceFactory<mojo::ContentHandler> {
25 public:
26 SkyViewerBase();
27
28 ~SkyViewerBase() override;
29
30 private:
31 // Overridden from ApplicationDelegate:
32 void Initialize(mojo::ApplicationImpl* app) override;
33
34 bool ConfigureIncomingConnection(
35 mojo::ApplicationConnection* connection) override;
36
37 scoped_ptr<PlatformImpl> platform_impl_;
38 mojo::TracingImpl tracing_;
39
40 DISALLOW_COPY_AND_ASSIGN(SkyViewerBase);
41 };
42
43 } // namespace sky
44
45 #endif // SKY_VIEWER_SKY_VIEWER_BASE_H_
OLDNEW
« no previous file with comments | « sky/viewer/sky_loader.cc ('k') | sky/viewer/sky_viewer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698