| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #include "components/web_view/web_view_application_delegate.h" | |
| 6 | |
| 7 #include <utility> | |
| 8 | |
| 9 #include "components/web_view/web_view_impl.h" | |
| 10 #include "mojo/shell/public/cpp/connection.h" | |
| 11 | |
| 12 namespace web_view { | |
| 13 | |
| 14 WebViewApplicationDelegate::WebViewApplicationDelegate() : shell_(nullptr) {} | |
| 15 WebViewApplicationDelegate::~WebViewApplicationDelegate() {} | |
| 16 | |
| 17 void WebViewApplicationDelegate::Initialize(mojo::Shell* shell, | |
| 18 const std::string& url, | |
| 19 uint32_t id) { | |
| 20 shell_ = shell; | |
| 21 tracing_.Initialize(shell, url); | |
| 22 } | |
| 23 | |
| 24 bool WebViewApplicationDelegate::AcceptConnection( | |
| 25 mojo::Connection* connection) { | |
| 26 connection->AddService<mojom::WebViewFactory>(this); | |
| 27 return true; | |
| 28 } | |
| 29 | |
| 30 void WebViewApplicationDelegate::CreateWebView( | |
| 31 mojom::WebViewClientPtr client, | |
| 32 mojo::InterfaceRequest<mojom::WebView> web_view) { | |
| 33 new WebViewImpl(shell_, std::move(client), std::move(web_view)); | |
| 34 } | |
| 35 | |
| 36 void WebViewApplicationDelegate::Create( | |
| 37 mojo::Connection* connection, | |
| 38 mojo::InterfaceRequest<mojom::WebViewFactory> request) { | |
| 39 factory_bindings_.AddBinding(this, std::move(request)); | |
| 40 } | |
| 41 | |
| 42 } // namespace web_view | |
| OLD | NEW |