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

Unified Diff: content/common/mojo/static_loader.h

Issue 1889253002: Remove uses of shell::Loader from content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/mojo/embedded_application_runner.cc ('k') | content/common/mojo/static_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/static_loader.h
diff --git a/content/common/mojo/static_loader.h b/content/common/mojo/static_loader.h
deleted file mode 100644
index fc2319403e83f37c4435e94d14f8a4479d7804f3..0000000000000000000000000000000000000000
--- a/content/common/mojo/static_loader.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// 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.
-
-#ifndef CONTENT_COMMON_MOJO_STATIC_APPLICATION_LOADER_H_
-#define CONTENT_COMMON_MOJO_STATIC_APPLICATION_LOADER_H_
-
-#include <list>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "services/shell/loader.h"
-
-namespace base {
-class SimpleThread;
-}
-
-namespace shell {
-class ShellClient;
-}
-
-namespace content {
-
-// An Loader which loads a single type of app from a given
-// shell::ShellClientFactory. A Load() request is fulfilled by creating an
-// instance of the app on a new thread. Only one instance of the app will run at
-// a time. Any Load requests received while the app is running will be dropped.
-class StaticLoader : public shell::Loader {
- public:
- using ApplicationFactory =
- base::Callback<std::unique_ptr<shell::ShellClient>()>;
-
- // Constructs a static loader for |factory|.
- explicit StaticLoader(const ApplicationFactory& factory);
-
- // Constructs a static loader for |factory| with a closure that will be called
- // when the loaded application quits.
- StaticLoader(const ApplicationFactory& factory,
- const base::Closure& quit_callback);
-
- ~StaticLoader() override;
-
- // shell::Loader:
- void Load(const std::string& name,
- shell::mojom::ShellClientRequest request) override;
-
- private:
- void StopAppThread();
-
- // The factory used t create new instances of the application delegate.
- ApplicationFactory factory_;
-
- // If not null, this is run when the loaded application quits.
- base::Closure quit_callback_;
-
- // Thread for the application if currently running.
- std::unique_ptr<base::SimpleThread> thread_;
-
- base::WeakPtrFactory<StaticLoader> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(StaticLoader);
-};
-
-} // namespace content
-
-#endif // CONTENT_COMMON_MOJO_STATIC_APPLICATION_LOADER_H_
« no previous file with comments | « content/common/mojo/embedded_application_runner.cc ('k') | content/common/mojo/static_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698