Don't preload rarely seen large images
[chromium-blink-merge.git] / components / html_viewer / test_html_viewer_impl.cc
blobd4039590f8a4596705b76854e83e70daf06cad50
1 // Copyright 2014 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/test_html_viewer_impl.h"
7 #include "third_party/WebKit/public/platform/WebString.h"
8 #include "third_party/WebKit/public/web/WebDocument.h"
9 #include "third_party/WebKit/public/web/WebFrame.h"
11 using blink::WebDocument;
12 using blink::WebFrame;
14 namespace html_viewer {
16 TestHTMLViewerImpl::TestHTMLViewerImpl(
17 blink::WebFrame* web_frame,
18 mojo::InterfaceRequest<TestHTMLViewer> request)
19 : web_frame_(web_frame), binding_(this, request.Pass()) {
22 TestHTMLViewerImpl::~TestHTMLViewerImpl() {
25 void TestHTMLViewerImpl::GetContentAsText(
26 const GetContentAsTextCallback& callback) {
27 callback.Run(web_frame_->document().contentAsTextForTesting().utf8());
30 } // namespace html_viewer