Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Side by Side Diff: content/common/mojo/current_thread_loader.cc

Issue 1871223003: Use ShellClientFactory interface to load mojo:profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « content/common/mojo/current_thread_loader.h ('k') | content/common/mojo/embedded_application_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698