Update V8 to version 4.6.35.
[chromium-blink-merge.git] / components / html_viewer / html_viewer.cc
bloba4545928403aaf149cbd8bfe24d5f42bf06f55ba
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"
11 namespace html_viewer {
13 HTMLViewer::HTMLViewer() : app_(nullptr) {
16 HTMLViewer::~HTMLViewer() {
19 void HTMLViewer::Initialize(mojo::ApplicationImpl* app) {
20 app_ = app;
21 global_state_.reset(new GlobalState(app));
24 bool HTMLViewer::ConfigureIncomingConnection(
25 mojo::ApplicationConnection* connection) {
26 connection->AddService(this);
27 return true;
30 void HTMLViewer::Create(
31 mojo::ApplicationConnection* connection,
32 mojo::InterfaceRequest<mojo::ContentHandler> request) {
33 new ContentHandlerImpl(global_state_.get(), app_, request.Pass());
36 } // namespace html_viewer