| OLD | NEW |
| (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_ |
| OLD | NEW |