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/frame_connection.h"
7 #include "mojo/application/public/cpp/application_connection.h"
8 #include "mojo/application/public/cpp/application_impl.h"
12 FrameConnection::FrameConnection() : application_connection_(nullptr) {
15 FrameConnection::~FrameConnection() {
18 void FrameConnection::Init(mojo::ApplicationImpl
* app
,
19 mojo::URLRequestPtr request
,
20 mojo::ViewManagerClientPtr
* view_manage_client
) {
21 DCHECK(!application_connection_
);
22 application_connection_
= app
->ConnectToApplication(request
.Pass());
23 application_connection_
->ConnectToService(view_manage_client
);
24 application_connection_
->ConnectToService(&frame_tree_client_
);
25 frame_tree_client_
.set_connection_error_handler([]() {
26 // TODO(sky): implement this.
31 } // namespace mandoline