Don't preload rarely seen large images
[chromium-blink-merge.git] / components / html_viewer / html_viewer.h
blob1a7fd9a6a36ff68b8ac9dc0dcdf2c76bf91d2ed9
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 private:
25 // Overridden from ApplicationDelegate:
26 void Initialize(mojo::ApplicationImpl* app) override;
27 bool ConfigureIncomingConnection(
28 mojo::ApplicationConnection* connection) override;
30 // Overridden from InterfaceFactory<ContentHandler>
31 void Create(mojo::ApplicationConnection* connection,
32 mojo::InterfaceRequest<mojo::ContentHandler> request) override;
34 scoped_ptr<GlobalState> global_state_;
35 mojo::ApplicationImpl* app_;
37 DISALLOW_COPY_AND_ASSIGN(HTMLViewer);
40 } // namespace html_viewer
42 #endif // COMPONENTS_HTML_VIEWER_HTML_VIEWER_H_