Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / html_viewer / html_viewer.h
blobba8af6a11b845c877001cf6fb03e50ab67bddcee
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.
5 #ifndef COMPONENTS_HTML_VIEWER_HTML_VIEWER_H_
6 #define COMPONENTS_HTML_VIEWER_HTML_VIEWER_H_
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "mojo/application/public/cpp/application_delegate.h"
11 #include "mojo/application/public/cpp/interface_factory_impl.h"
12 #include "mojo/application/public/interfaces/content_handler.mojom.h"
14 namespace html_viewer {
16 class GlobalState;
18 class HTMLViewer : public mojo::ApplicationDelegate,
19 public mojo::InterfaceFactory<mojo::ContentHandler> {
20 public:
21 HTMLViewer();
22 ~HTMLViewer() override;
24 protected:
25 GlobalState* global_state() const { return global_state_.get(); }
26 mojo::ApplicationImpl* app() const { return app_; }
28 // Overridden from ApplicationDelegate:
29 void Initialize(mojo::ApplicationImpl* app) override;
31 private:
32 // Overridden from ApplicationDelegate:
33 bool ConfigureIncomingConnection(
34 mojo::ApplicationConnection* connection) override;
36 // Overridden from InterfaceFactory<ContentHandler>
37 void Create(mojo::ApplicationConnection* connection,
38 mojo::InterfaceRequest<mojo::ContentHandler> request) override;
40 scoped_ptr<GlobalState> global_state_;
41 mojo::ApplicationImpl* app_;
43 DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
46 } // namespace html_viewer
48 #endif // COMPONENTS_HTML_VIEWER_HTML_VIEWER_H_