Don't preload rarely seen large images
[chromium-blink-merge.git] / components / html_viewer / content_handler_impl.h
blob2258c8dfc803ea8dc21e49549602c6ea71270d26
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_CONTENT_HANDLER_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_CONTENT_HANDLER_IMPL_H_
8 #include "base/macros.h"
9 #include "mojo/application/public/cpp/application_impl.h"
10 #include "mojo/application/public/interfaces/content_handler.mojom.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
13 namespace html_viewer {
15 class GlobalState;
17 class ContentHandlerImpl : public mojo::ContentHandler {
18 public:
19 ContentHandlerImpl(GlobalState* global_state,
20 mojo::ApplicationImpl* app,
21 mojo::InterfaceRequest<ContentHandler> request);
22 ~ContentHandlerImpl() override;
24 private:
25 // Overridden from ContentHandler:
26 void StartApplication(mojo::InterfaceRequest<mojo::Application> request,
27 mojo::URLResponsePtr response) override;
29 GlobalState* global_state_;
30 mojo::ApplicationImpl* app_;
31 mojo::StrongBinding<mojo::ContentHandler> binding_;
33 DISALLOW_COPY_AND_ASSIGN(ContentHandlerImpl);
36 } // namespace html_viewer
38 #endif // COMPONENTS_HTML_VIEWER_CONTENT_HANDLER_IMPL_H_