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 "mandoline/tab/web_view_application_delegate.h"
7 #include "mandoline/tab/web_view_impl.h"
8 #include "mojo/application/public/cpp/application_connection.h"
12 WebViewApplicationDelegate::WebViewApplicationDelegate() : app_(nullptr) {}
13 WebViewApplicationDelegate::~WebViewApplicationDelegate() {}
15 void WebViewApplicationDelegate::Initialize(mojo::ApplicationImpl
* app
) {
19 bool WebViewApplicationDelegate::ConfigureIncomingConnection(
20 mojo::ApplicationConnection
* connection
) {
21 connection
->AddService
<mojom::WebViewFactory
>(this);
25 void WebViewApplicationDelegate::CreateWebView(
26 mojom::WebViewClientPtr client
,
27 mojo::InterfaceRequest
<mojom::WebView
> web_view
) {
28 new WebViewImpl(app_
, client
.Pass(), web_view
.Pass());
31 void WebViewApplicationDelegate::Create(
32 mojo::ApplicationConnection
* connection
,
33 mojo::InterfaceRequest
<mojom::WebViewFactory
> request
) {
34 factory_bindings_
.AddBinding(this, request
.Pass());
37 } // namespace web_view