summaryrefslogtreecommitdiffstats
path: root/components/font_service
diff options
context:
space:
mode:
authorrockot <rockot@chromium.org>2016-03-14 16:38:28 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-14 23:40:38 +0000
commitd5669c5cce5e182f29a4387807cda0c74e8265eb (patch)
tree40ca09f1547e7ec5e5afbb193854cdd27d52b1b3 /components/font_service
parent1afe4c3c566b3270b346c86f7698086e85b93730 (diff)
downloadchromium_src-d5669c5cce5e182f29a4387807cda0c74e8265eb.zip
chromium_src-d5669c5cce5e182f29a4387807cda0c74e8265eb.tar.gz
chromium_src-d5669c5cce5e182f29a4387807cda0c74e8265eb.tar.bz2
Change primordial pipes to ShellClient
Changes shell client startup pipes to be ShellClient instead of ShellClientFactory. This simplifies a lot of startup code. Due to this change, apps must now take responsibility for shutting themselves down when they feel it's appropriate. For now, all relevant apps are force-exited to mimic the old behavior. Once apptests are deleted, we should expose a clean quit closure to apps so they have something to run when they want to quit. Hard-exiting the process is definitely not the right thing to do. BUG= Review URL: https://codereview.chromium.org/1801963002 Cr-Commit-Position: refs/heads/master@{#381114}
Diffstat (limited to 'components/font_service')
-rw-r--r--components/font_service/font_service_app.cc4
-rw-r--r--components/font_service/font_service_app.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/components/font_service/font_service_app.cc b/components/font_service/font_service_app.cc
index 6e73b99..5942cb1 100644
--- a/components/font_service/font_service_app.cc
+++ b/components/font_service/font_service_app.cc
@@ -69,6 +69,10 @@ bool FontServiceApp::AcceptConnection(mojo::Connection* connection) {
return true;
}
+void FontServiceApp::ShellConnectionLost() {
+ _exit(1);
+}
+
void FontServiceApp::Create(mojo::Connection* connection,
mojo::InterfaceRequest<FontService> request) {
bindings_.AddBinding(this, std::move(request));
diff --git a/components/font_service/font_service_app.h b/components/font_service/font_service_app.h
index 957f231..b7537da 100644
--- a/components/font_service/font_service_app.h
+++ b/components/font_service/font_service_app.h
@@ -30,6 +30,7 @@ class FontServiceApp : public mojo::ShellClient,
void Initialize(mojo::Connector* connector, const mojo::Identity& identity,
uint32_t id) override;
bool AcceptConnection(mojo::Connection* connection) override;
+ void ShellConnectionLost() override;
// mojo::InterfaceFactory<FontService>:
void Create(mojo::Connection* connection,