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 "mojo/services/public/cpp/view_manager/view_manager_client_factory.h"
6
7#include "mojo/public/interfaces/application/shell.mojom.h"
8#include "mojo/services/public/cpp/view_manager/lib/view_manager_client_impl.h"
9
10namespace mojo {
11
12ViewManagerClientFactory::ViewManagerClientFactory(
13    Shell* shell,
14    ViewManagerDelegate* delegate)
15    : shell_(shell), delegate_(delegate) {
16}
17
18ViewManagerClientFactory::~ViewManagerClientFactory() {
19}
20
21// InterfaceFactory<ViewManagerClient> implementation.
22void ViewManagerClientFactory::Create(
23    ApplicationConnection* connection,
24    InterfaceRequest<ViewManagerClient> request) {
25  BindToRequest(new ViewManagerClientImpl(delegate_, shell_), &request);
26}
27
28}  // namespace mojo
29