diff options
author | rockot <rockot@chromium.org> | 2014-11-06 10:50:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-06 18:50:26 +0000 |
commit | 3813023bde420950c60d9d12a8610510b76da337 (patch) | |
tree | c4c1a71be980404150fce8f9848ae4ac831fb0c8 /extensions/shell/utility | |
parent | ba4eca9bf6691e4ed55eee55a0bcac1a932b7688 (diff) | |
download | chromium_src-3813023bde420950c60d9d12a8610510b76da337.zip chromium_src-3813023bde420950c60d9d12a8610510b76da337.tar.gz chromium_src-3813023bde420950c60d9d12a8610510b76da337.tar.bz2 |
Add rudimentary UpdateService to app_shell
It can download a CRX from the web store using an ID given at the
command line.
This wires up utility process support for app_shell and establishes
a base for factoring additional extensions utility IPCs out of
//chrome in the near future.
BUG=398671
TBR=asargent@chromium.org for cloned dependency on omaha_query_params
Review URL: https://codereview.chromium.org/693233003
Cr-Commit-Position: refs/heads/master@{#303055}
Diffstat (limited to 'extensions/shell/utility')
-rw-r--r-- | extensions/shell/utility/DEPS | 3 | ||||
-rw-r--r-- | extensions/shell/utility/shell_content_utility_client.cc | 23 | ||||
-rw-r--r-- | extensions/shell/utility/shell_content_utility_client.h | 28 |
3 files changed, 54 insertions, 0 deletions
diff --git a/extensions/shell/utility/DEPS b/extensions/shell/utility/DEPS new file mode 100644 index 0000000..8ad521e --- /dev/null +++ b/extensions/shell/utility/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+content/public/utility", +] diff --git a/extensions/shell/utility/shell_content_utility_client.cc b/extensions/shell/utility/shell_content_utility_client.cc new file mode 100644 index 0000000..5fe8c57 --- /dev/null +++ b/extensions/shell/utility/shell_content_utility_client.cc @@ -0,0 +1,23 @@ +// Copyright 2014 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. + +#include "extensions/shell/utility/shell_content_utility_client.h" + +namespace extensions { + +ShellContentUtilityClient::ShellContentUtilityClient() { +} + +ShellContentUtilityClient::~ShellContentUtilityClient() { +} + +void ShellContentUtilityClient::UtilityThreadStarted() { + UtilityHandler::UtilityThreadStarted(); +} + +bool ShellContentUtilityClient::OnMessageReceived(const IPC::Message& message) { + return utility_handler_.OnMessageReceived(message); +} + +} // namespace extensions diff --git a/extensions/shell/utility/shell_content_utility_client.h b/extensions/shell/utility/shell_content_utility_client.h new file mode 100644 index 0000000..c987427 --- /dev/null +++ b/extensions/shell/utility/shell_content_utility_client.h @@ -0,0 +1,28 @@ +// Copyright 2014 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 EXTENSIONS_SHELL_UTILITY_SHELL_CONTENT_UTILITY_CLIENT_H_ +#define EXTENSIONS_SHELL_UTILITY_SHELL_CONTENT_UTILITY_CLIENT_H_ + +#include "content/public/utility/content_utility_client.h" +#include "extensions/utility/utility_handler.h" + +namespace extensions { + +class ShellContentUtilityClient : public content::ContentUtilityClient { + public: + ShellContentUtilityClient(); + ~ShellContentUtilityClient() override; + + // content::ContentUtilityClient: + void UtilityThreadStarted() override; + bool OnMessageReceived(const IPC::Message& message) override; + + private: + UtilityHandler utility_handler_; +}; + +} // namespace extensions + +#endif // EXTENSIONS_SHELL_UTILITY_SHELL_CONTENT_UTILITY_CLIENT_H_ |