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

Side by Side Diff: mojo/application/content_handler_factory.cc

Issue 793243002: Restructure public side of content_handler service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « mojo/application/content_handler_factory.h ('k') | mojo/application_manager/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/application/content_handler_factory.h" 5 #include "mojo/application/content_handler_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 #include "mojo/application/application_runner_chromium.h" 13 #include "mojo/application/application_runner_chromium.h"
14 #include "mojo/common/message_pump_mojo.h" 14 #include "mojo/common/message_pump_mojo.h"
15 #include "mojo/public/cpp/application/application_connection.h" 15 #include "mojo/public/cpp/application/application_connection.h"
16 #include "mojo/public/cpp/application/application_delegate.h" 16 #include "mojo/public/cpp/application/application_delegate.h"
17 #include "mojo/public/cpp/application/application_impl.h" 17 #include "mojo/public/cpp/application/application_impl.h"
18 #include "mojo/public/cpp/application/interface_factory_impl.h" 18 #include "mojo/public/cpp/application/interface_factory_impl.h"
19 #include "mojo/public/cpp/bindings/interface_impl.h" 19 #include "mojo/public/cpp/bindings/interface_impl.h"
20 #include "mojo/services/public/interfaces/content_handler/content_handler.mojom. h" 20 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom. h"
21 21
22 namespace mojo { 22 namespace mojo {
23 23
24 namespace { 24 namespace {
25 25
26 class ApplicationThread : public base::PlatformThread::Delegate { 26 class ApplicationThread : public base::PlatformThread::Delegate {
27 public: 27 public:
28 ApplicationThread( 28 ApplicationThread(
29 scoped_refptr<base::MessageLoopProxy> handler_thread, 29 scoped_refptr<base::MessageLoopProxy> handler_thread,
30 const base::Callback<void(ApplicationThread*)>& termination_callback, 30 const base::Callback<void(ApplicationThread*)>& termination_callback,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 auto application = this->CreateApplication(shell.Pass(), response.Pass()); 117 auto application = this->CreateApplication(shell.Pass(), response.Pass());
118 loop.Run(); 118 loop.Run();
119 } 119 }
120 120
121 void ContentHandlerFactory::Create(ApplicationConnection* connection, 121 void ContentHandlerFactory::Create(ApplicationConnection* connection,
122 InterfaceRequest<ContentHandler> request) { 122 InterfaceRequest<ContentHandler> request) {
123 BindToRequest(new ContentHandlerImpl(delegate_), &request); 123 BindToRequest(new ContentHandlerImpl(delegate_), &request);
124 } 124 }
125 125
126 } // namespace mojo 126 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/application/content_handler_factory.h ('k') | mojo/application_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698