| Index: sky/viewer/sky_viewer_base.h
|
| diff --git a/sky/viewer/sky_viewer_base.h b/sky/viewer/sky_viewer_base.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d4d27a87d31c498303d4036d1394176e959fcaaa
|
| --- /dev/null
|
| +++ b/sky/viewer/sky_viewer_base.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SKY_VIEWER_SKY_VIEWER_BASE_H_
|
| +#define SKY_VIEWER_SKY_VIEWER_BASE_H_
|
| +
|
| +#include "mojo/common/tracing_impl.h"
|
| +#include "mojo/icu/icu.h"
|
| +#include "mojo/public/cpp/application/application_connection.h"
|
| +#include "mojo/public/cpp/application/application_delegate.h"
|
| +#include "mojo/public/cpp/application/application_impl.h"
|
| +#include "mojo/public/cpp/application/interface_factory_impl.h"
|
| +#include "mojo/services/content_handler/public/interfaces/content_handler.mojom.h"
|
| +#include "sky/services/platform/platform_impl.h"
|
| +
|
| +namespace sky {
|
| +
|
| +// An abstract class that handles most of the details of setting up an
|
| +// application that is intended to run Sky content. Subclasses must implement
|
| +// the mojo::InterfaceFactory<mojo::ContentHandler>::Create() method to
|
| +// specialize this class with the concrete content handler that they are using.
|
| +class SkyViewerBase : public mojo::ApplicationDelegate,
|
| + public mojo::InterfaceFactory<mojo::ContentHandler> {
|
| + public:
|
| + SkyViewerBase();
|
| +
|
| + ~SkyViewerBase() override;
|
| +
|
| + private:
|
| + // Overridden from ApplicationDelegate:
|
| + void Initialize(mojo::ApplicationImpl* app) override;
|
| +
|
| + bool ConfigureIncomingConnection(
|
| + mojo::ApplicationConnection* connection) override;
|
| +
|
| + scoped_ptr<PlatformImpl> platform_impl_;
|
| + mojo::TracingImpl tracing_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SkyViewerBase);
|
| +};
|
| +
|
| +} // namespace sky
|
| +
|
| +#endif // SKY_VIEWER_SKY_VIEWER_BASE_H_
|
|
|