| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mandoline/tab/frame_connection.h" | 5 #include "mandoline/tab/frame_connection.h" |
| 6 | 6 |
| 7 #include "mojo/application/public/cpp/application_connection.h" | 7 #include "mojo/application/public/cpp/application_connection.h" |
| 8 #include "mojo/application/public/cpp/application_impl.h" | 8 #include "mojo/application/public/cpp/application_impl.h" |
| 9 | 9 |
| 10 namespace mandoline { | 10 namespace mandoline { |
| 11 | 11 |
| 12 FrameConnection::FrameConnection() : application_connection_(nullptr) { | 12 FrameConnection::FrameConnection() : application_connection_(nullptr) { |
| 13 } | 13 } |
| 14 | 14 |
| 15 FrameConnection::~FrameConnection() { | 15 FrameConnection::~FrameConnection() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 void FrameConnection::Init(mojo::ApplicationImpl* app, | 18 void FrameConnection::Init(mojo::ApplicationImpl* app, |
| 19 mojo::URLRequestPtr request, | 19 mojo::URLRequestPtr request, |
| 20 mojo::ViewManagerClientPtr* view_manage_client) { | 20 mojo::ViewManagerClientPtr* view_manage_client) { |
| 21 DCHECK(!application_connection_); | 21 DCHECK(!application_connection_); |
| 22 application_connection_ = app->ConnectToApplication(request.Pass()); | 22 application_connection_ = app->ConnectToApplication(request.Pass()); |
| 23 application_connection_->ConnectToService(view_manage_client); | 23 application_connection_->ConnectToService(view_manage_client); |
| 24 application_connection_->ConnectToService(&frame_tree_client_); | 24 application_connection_->ConnectToService(&frame_tree_client_); |
| 25 frame_tree_client_.set_connection_error_handler([]() { |
| 26 // TODO(sky): implement this. |
| 27 NOTIMPLEMENTED(); |
| 28 }); |
| 25 } | 29 } |
| 26 | 30 |
| 27 } // namespace mandoline | 31 } // namespace mandoline |
| OLD | NEW |