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