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

Side by Side Diff: services/dart/content_handler_main.cc

Issue 1979683002: ApplicationConnection devolution, part 2.4. (Closed) Base URL: https://github.com/domokit/mojo.git@work795_app_conn_devo_2.3-x-work794_app_conn_devo_2.2
Patch Set: so much doh Created 4 years, 7 months 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.cc ('k') | services/java_handler/java_handler.cc » ('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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } 235 }
236 } 236 }
237 237
238 // Overridden from ApplicationDelegate: 238 // Overridden from ApplicationDelegate:
239 bool ConfigureIncomingConnection( 239 bool ConfigureIncomingConnection(
240 mojo::ApplicationConnection* connection) override { 240 mojo::ApplicationConnection* connection) override {
241 bool strict = HasStrictQueryParam(connection->GetServiceProviderImpl() 241 bool strict = HasStrictQueryParam(connection->GetServiceProviderImpl()
242 .connection_context() 242 .connection_context()
243 .connection_url); 243 .connection_url);
244 if (default_strict_ || strict) { 244 if (default_strict_ || strict) {
245 connection->AddService(&strict_content_handler_factory_); 245 connection->GetServiceProviderImpl().AddService<mojo::ContentHandler>(
246 strict_content_handler_factory_.GetInterfaceRequestHandler());
246 } else { 247 } else {
247 connection->AddService(&content_handler_factory_); 248 connection->GetServiceProviderImpl().AddService<mojo::ContentHandler>(
249 content_handler_factory_.GetInterfaceRequestHandler());
248 } 250 }
249 return true; 251 return true;
250 } 252 }
251 253
252 mojo::TracingImpl tracing_; 254 mojo::TracingImpl tracing_;
253 DartContentHandler content_handler_; 255 DartContentHandler content_handler_;
254 DartContentHandler strict_content_handler_; 256 DartContentHandler strict_content_handler_;
255 mojo::ContentHandlerFactory content_handler_factory_; 257 mojo::ContentHandlerFactory content_handler_factory_;
256 mojo::ContentHandlerFactory strict_content_handler_factory_; 258 mojo::ContentHandlerFactory strict_content_handler_factory_;
257 mojo::URLResponseDiskCachePtr url_response_disk_cache_; 259 mojo::URLResponseDiskCachePtr url_response_disk_cache_;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 pause_isolates_on_exit)); 326 pause_isolates_on_exit));
325 } 327 }
326 } 328 }
327 329
328 } // namespace dart 330 } // namespace dart
329 331
330 MojoResult MojoMain(MojoHandle application_request) { 332 MojoResult MojoMain(MojoHandle application_request) {
331 mojo::ApplicationRunnerChromium runner(new dart::DartContentHandlerApp); 333 mojo::ApplicationRunnerChromium runner(new dart::DartContentHandlerApp);
332 return runner.Run(application_request); 334 return runner.Run(application_request);
333 } 335 }
OLDNEW
« no previous file with comments | « mojo/application/content_handler_factory.cc ('k') | services/java_handler/java_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698