Don't preload rarely seen large images
[chromium-blink-merge.git] / components / html_viewer / content_handler_impl.cc
blobf858aa6de0efda3e4cc530920f2511498e737e33
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/content_handler_impl.h"
7 #include "components/html_viewer/html_document_application_delegate.h"
9 namespace html_viewer {
11 ContentHandlerImpl::ContentHandlerImpl(
12 GlobalState* global_state,
13 mojo::ApplicationImpl* app,
14 mojo::InterfaceRequest<mojo::ContentHandler> request)
15 : global_state_(global_state), app_(app), binding_(this, request.Pass()) {
18 ContentHandlerImpl::~ContentHandlerImpl() {
21 void ContentHandlerImpl::StartApplication(
22 mojo::InterfaceRequest<mojo::Application> request,
23 mojo::URLResponsePtr response) {
24 // HTMLDocumentApplicationDelegate deletes itself.
25 new HTMLDocumentApplicationDelegate(
26 request.Pass(), response.Pass(), global_state_,
27 app_->app_lifetime_helper()->CreateAppRefCount());
30 } // namespace html_viewer