diff options
author | ben <ben@chromium.org> | 2016-02-08 17:43:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-09 01:44:42 +0000 |
commit | d3a4bc09b9692bf6165aa9390d057830466743a5 (patch) | |
tree | b846d0e4328a781ffb6aad420cfcfcc037627cc6 /mojo/shell/public/cpp/lib/content_handler_factory.cc | |
parent | 03ab577189f899ca7562a8c1328ead855c15051b (diff) | |
download | chromium_src-d3a4bc09b9692bf6165aa9390d057830466743a5.zip chromium_src-d3a4bc09b9692bf6165aa9390d057830466743a5.tar.gz chromium_src-d3a4bc09b9692bf6165aa9390d057830466743a5.tar.bz2 |
ApplicationImpl->ShellConnection
mojom::Application->mojom::ShellClient
R=rockot@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1675153002
Cr-Commit-Position: refs/heads/master@{#374259}
Diffstat (limited to 'mojo/shell/public/cpp/lib/content_handler_factory.cc')
-rw-r--r-- | mojo/shell/public/cpp/lib/content_handler_factory.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/mojo/shell/public/cpp/lib/content_handler_factory.cc b/mojo/shell/public/cpp/lib/content_handler_factory.cc index 156faf0..74b788c 100644 --- a/mojo/shell/public/cpp/lib/content_handler_factory.cc +++ b/mojo/shell/public/cpp/lib/content_handler_factory.cc @@ -29,13 +29,13 @@ class ApplicationThread : public base::PlatformThread::Delegate { scoped_refptr<base::SingleThreadTaskRunner> handler_thread, const base::Callback<void(ApplicationThread*)>& termination_callback, ContentHandlerFactory::Delegate* handler_delegate, - InterfaceRequest<shell::mojom::Application> application_request, + InterfaceRequest<shell::mojom::ShellClient> request, URLResponsePtr response, const Callback<void()>& destruct_callback) : handler_thread_(handler_thread), termination_callback_(termination_callback), handler_delegate_(handler_delegate), - application_request_(std::move(application_request)), + request_(std::move(request)), response_(std::move(response)), destruct_callback_(destruct_callback) {} @@ -45,7 +45,7 @@ class ApplicationThread : public base::PlatformThread::Delegate { private: void ThreadMain() override { - handler_delegate_->RunApplication(std::move(application_request_), + handler_delegate_->RunApplication(std::move(request_), std::move(response_)); handler_thread_->PostTask(FROM_HERE, base::Bind(termination_callback_, this)); @@ -54,7 +54,7 @@ class ApplicationThread : public base::PlatformThread::Delegate { scoped_refptr<base::SingleThreadTaskRunner> handler_thread_; base::Callback<void(ApplicationThread*)> termination_callback_; ContentHandlerFactory::Delegate* handler_delegate_; - InterfaceRequest<shell::mojom::Application> application_request_; + InterfaceRequest<shell::mojom::ShellClient> request_; URLResponsePtr response_; Callback<void()> destruct_callback_; @@ -82,15 +82,14 @@ class ContentHandlerImpl : public shell::mojom::ContentHandler { private: // Overridden from ContentHandler: - void StartApplication( - InterfaceRequest<shell::mojom::Application> application_request, - URLResponsePtr response, - const Callback<void()>& destruct_callback) override { + void StartApplication(InterfaceRequest<shell::mojom::ShellClient> request, + URLResponsePtr response, + const Callback<void()>& destruct_callback) override { ApplicationThread* thread = new ApplicationThread(base::ThreadTaskRunnerHandle::Get(), base::Bind(&ContentHandlerImpl::OnThreadEnd, weak_factory_.GetWeakPtr()), - delegate_, std::move(application_request), + delegate_, std::move(request), std::move(response), destruct_callback); base::PlatformThreadHandle handle; bool launched = base::PlatformThread::Create(0, thread, &handle); @@ -124,11 +123,11 @@ ContentHandlerFactory::~ContentHandlerFactory() { } void ContentHandlerFactory::ManagedDelegate::RunApplication( - InterfaceRequest<shell::mojom::Application> application_request, + InterfaceRequest<shell::mojom::ShellClient> request, URLResponsePtr response) { base::MessageLoop loop(common::MessagePumpMojo::Create()); - auto application = this->CreateApplication(std::move(application_request), - std::move(response)); + auto application = + this->CreateApplication(std::move(request), std::move(response)); if (application) loop.Run(); } |