OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 "content/common/mojo/current_thread_loader.h" |
| 6 |
| 7 namespace content { |
| 8 |
| 9 CurrentThreadLoader::CurrentThreadLoader(const ApplicationFactory& factory) |
| 10 : factory_(factory) {} |
| 11 |
| 12 CurrentThreadLoader::~CurrentThreadLoader() {} |
| 13 |
| 14 void CurrentThreadLoader::Load(const std::string& name, |
| 15 mojo::shell::mojom::ShellClientRequest request) { |
| 16 if (!shell_client_) { |
| 17 shell_client_ = factory_.Run(); |
| 18 factory_ = ApplicationFactory(); |
| 19 } |
| 20 |
| 21 connections_.push_back(make_scoped_ptr( |
| 22 new mojo::ShellConnection(shell_client_.get(), std::move(request)))); |
| 23 } |
| 24 |
| 25 } // namespace content |
OLD | NEW |