summaryrefslogtreecommitdiffstats
path: root/mojo/shell/shell_application_loader.cc
blob: 0370a986817baebf4a2999e82ee2db73bba44ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "mojo/shell/shell_application_loader.h"

#include <utility>

#include "mojo/application/public/cpp/application_impl.h"
#include "mojo/shell/shell_application_delegate.h"

namespace mojo {
namespace shell {

ShellApplicationLoader::ShellApplicationLoader(ApplicationManager* manager)
    : manager_(manager) {}
ShellApplicationLoader::~ShellApplicationLoader() {}

void ShellApplicationLoader::Load(
    const GURL& url,
    InterfaceRequest<Application> application_request) {
  DCHECK(application_request.is_pending());
  app_.reset(new ApplicationImpl(new ShellApplicationDelegate(manager_),
                                 std::move(application_request)));
}

}  // namespace shell
}  // namespace mojo