summaryrefslogtreecommitdiffstats
path: root/mojo/shell/background
diff options
context:
space:
mode:
authorben <ben@chromium.org>2016-02-29 12:29:23 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-29 20:30:58 +0000
commitfae4191499da0ca65ac02965f14736b44bf2f310 (patch)
treed5b2f028f3ad046988dadac588a86e3ccc1ec828 /mojo/shell/background
parent464f3f6f123abc8e60168431042bd2745a0dae58 (diff)
downloadchromium_src-fae4191499da0ca65ac02965f14736b44bf2f310.zip
chromium_src-fae4191499da0ca65ac02965f14736b44bf2f310.tar.gz
chromium_src-fae4191499da0ca65ac02965f14736b44bf2f310.tar.bz2
Rename ApplicationLoader->Loader, cleanup headers
TBR=sky@chromium.org BUG= Review URL: https://codereview.chromium.org/1750673002 Cr-Commit-Position: refs/heads/master@{#378260}
Diffstat (limited to 'mojo/shell/background')
-rw-r--r--mojo/shell/background/background_shell.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/mojo/shell/background/background_shell.cc b/mojo/shell/background/background_shell.cc
index fd5366b..e53d7f9 100644
--- a/mojo/shell/background/background_shell.cc
+++ b/mojo/shell/background/background_shell.cc
@@ -13,10 +13,9 @@
#include "base/threading/simple_thread.h"
#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/services/package_manager/package_manager.h"
-#include "mojo/shell/application_loader.h"
#include "mojo/shell/application_manager.h"
-#include "mojo/shell/capability_filter.h"
#include "mojo/shell/connect_params.h"
+#include "mojo/shell/loader.h"
#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/public/cpp/shell_connection.h"
#include "mojo/shell/standalone/context.h"
@@ -29,18 +28,16 @@ scoped_ptr<base::MessagePump> CreateMessagePumpMojo() {
return make_scoped_ptr(new common::MessagePumpMojo);
}
-// Used to obtain the ShellClientRequest for an application. When
-// ApplicationLoader::Load() is called a callback is run with the
-// ShellClientRequest.
-class BackgroundApplicationLoader : public ApplicationLoader {
+// Used to obtain the ShellClientRequest for an application. When Loader::Load()
+// is called a callback is run with the ShellClientRequest.
+class BackgroundLoader : public Loader {
public:
using Callback = base::Callback<void(mojom::ShellClientRequest)>;
- explicit BackgroundApplicationLoader(const Callback& callback)
- : callback_(callback) {}
- ~BackgroundApplicationLoader() override {}
+ explicit BackgroundLoader(const Callback& callback) : callback_(callback) {}
+ ~BackgroundLoader() override {}
- // ApplicationLoader:
+ // Loader:
void Load(const std::string& name,
mojom::ShellClientRequest request) override {
DCHECK(!callback_.is_null()); // Callback should only be run once.
@@ -52,7 +49,7 @@ class BackgroundApplicationLoader : public ApplicationLoader {
private:
Callback callback_;
- DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationLoader);
+ DISALLOW_COPY_AND_ASSIGN(BackgroundLoader);
};
class MojoMessageLoop : public base::MessageLoop {
@@ -86,7 +83,7 @@ class BackgroundShell::MojoThread : public base::SimpleThread {
// Ownership of |loader| passes to ApplicationManager.
const std::string name = params->target().name();
- BackgroundApplicationLoader* loader = new BackgroundApplicationLoader(
+ BackgroundLoader* loader = new BackgroundLoader(
base::Bind(&MojoThread::OnGotApplicationRequest, base::Unretained(this),
name, signal, request));
context_->application_manager()->SetLoaderForName(make_scoped_ptr(loader),