| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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/window_manager/window_manager_impl.h" | |
| 6 | |
| 7 #include "components/window_manager/window_manager_app.h" | |
| 8 | |
| 9 namespace window_manager { | |
| 10 | |
| 11 WindowManagerImpl::WindowManagerImpl(WindowManagerApp* window_manager, | |
| 12 bool from_vm) | |
| 13 : window_manager_(window_manager), from_vm_(from_vm), binding_(this) { | |
| 14 window_manager_->AddConnection(this); | |
| 15 binding_.set_error_handler(this); | |
| 16 } | |
| 17 | |
| 18 WindowManagerImpl::~WindowManagerImpl() { | |
| 19 window_manager_->RemoveConnection(this); | |
| 20 } | |
| 21 | |
| 22 void WindowManagerImpl::Bind( | |
| 23 mojo::ScopedMessagePipeHandle window_manager_pipe) { | |
| 24 binding_.Bind(window_manager_pipe.Pass()); | |
| 25 } | |
| 26 | |
| 27 void WindowManagerImpl::Embed( | |
| 28 const mojo::String& url, | |
| 29 mojo::InterfaceRequest<mojo::ServiceProvider> services, | |
| 30 mojo::ServiceProviderPtr exposed_services) { | |
| 31 window_manager_->Embed(url, services.Pass(), exposed_services.Pass()); | |
| 32 } | |
| 33 | |
| 34 void WindowManagerImpl::OnConnectionError() { | |
| 35 delete this; | |
| 36 } | |
| 37 | |
| 38 } // namespace window_manager | |
| OLD | NEW |