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

Unified Diff: mojo/shell/public/cpp/lib/shell_client_factory.cc

Issue 1706063002: Eliminate ShellClientFactoryConnection & just have the ApplicationManager do it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@factory
Patch Set: . Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/public/cpp/lib/connection_impl.cc ('k') | mojo/shell/public/interfaces/shell.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/public/cpp/lib/shell_client_factory.cc
diff --git a/mojo/shell/public/cpp/lib/shell_client_factory.cc b/mojo/shell/public/cpp/lib/shell_client_factory.cc
index 14a3e796997230f2edfbf143a5d7c3ae416c72fa..eb634748ddb3554df5121ef55fdac54e29ad8bc8 100644
--- a/mojo/shell/public/cpp/lib/shell_client_factory.cc
+++ b/mojo/shell/public/cpp/lib/shell_client_factory.cc
@@ -32,18 +32,14 @@ class ApplicationThread : public base::PlatformThread::Delegate {
const base::Callback<void(ApplicationThread*)>& termination_callback,
ShellClientFactory::Delegate* handler_delegate,
InterfaceRequest<shell::mojom::ShellClient> request,
- const GURL& url,
- const Callback<void()>& destruct_callback)
+ const GURL& url)
: handler_thread_(handler_thread),
termination_callback_(termination_callback),
handler_delegate_(handler_delegate),
request_(std::move(request)),
- url_(url),
- destruct_callback_(destruct_callback) {}
+ url_(url) {}
- ~ApplicationThread() override {
- destruct_callback_.Run();
- }
+ ~ApplicationThread() override {}
private:
void ThreadMain() override {
@@ -57,7 +53,6 @@ class ApplicationThread : public base::PlatformThread::Delegate {
ShellClientFactory::Delegate* handler_delegate_;
InterfaceRequest<shell::mojom::ShellClient> request_;
GURL url_;
- Callback<void()> destruct_callback_;
DISALLOW_COPY_AND_ASSIGN(ApplicationThread);
};
@@ -84,14 +79,12 @@ class ShellClientFactoryImpl : public shell::mojom::ShellClientFactory {
private:
// Overridden from shell::mojom::ShellClientFactory:
void CreateShellClient(shell::mojom::ShellClientRequest request,
- const String& url,
- const Callback<void()>& destruct_callback) override {
+ const String& url) override {
ApplicationThread* thread =
new ApplicationThread(base::ThreadTaskRunnerHandle::Get(),
base::Bind(&ShellClientFactoryImpl::OnThreadEnd,
weak_factory_.GetWeakPtr()),
- delegate_, std::move(request), url.To<GURL>(),
- destruct_callback);
+ delegate_, std::move(request), url.To<GURL>());
base::PlatformThreadHandle handle;
bool launched = base::PlatformThread::Create(0, thread, &handle);
DCHECK(launched);
« no previous file with comments | « mojo/shell/public/cpp/lib/connection_impl.cc ('k') | mojo/shell/public/interfaces/shell.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698