Don't preload rarely seen large images
[chromium-blink-merge.git] / components / html_viewer / html_viewer.cc
blob8e4dff39f10bffb7dc4b1e4754e87763cf891ccf
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 #include "components/html_viewer/html_viewer.h"
7 #include "components/html_viewer/content_handler_impl.h"
8 #include "components/html_viewer/global_state.h"
9 #include "mojo/application/public/cpp/application_connection.h"
12 namespace html_viewer {
14 HTMLViewer::HTMLViewer() : app_(nullptr) {
17 HTMLViewer::~HTMLViewer() {
20 void HTMLViewer::Initialize(mojo::ApplicationImpl* app) {
21 app_ = app;
22 global_state_.reset(new GlobalState(app));
25 bool HTMLViewer::ConfigureIncomingConnection(
26 mojo::ApplicationConnection* connection) {
27 connection->AddService(this);
28 return true;
31 void HTMLViewer::Create(
32 mojo::ApplicationConnection* connection,
33 mojo::InterfaceRequest<mojo::ContentHandler> request) {
34 new ContentHandlerImpl(global_state_.get(), app_, request.Pass());
37 } // namespace html_viewer