| OLD | NEW | 
|---|
| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 231       DartTimelineController::EnableAll(); | 231       DartTimelineController::EnableAll(); | 
| 232     } | 232     } | 
| 233     if (!success) { | 233     if (!success) { | 
| 234       LOG(ERROR) << "Dart VM Initialization failed"; | 234       LOG(ERROR) << "Dart VM Initialization failed"; | 
| 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->GetConnectionURL()); | 241     bool strict = HasStrictQueryParam(connection->GetServiceProviderImpl() | 
|  | 242                                           .connection_context() | 
|  | 243                                           .connection_url); | 
| 242     if (default_strict_ || strict) { | 244     if (default_strict_ || strict) { | 
| 243       connection->AddService(&strict_content_handler_factory_); | 245       connection->AddService(&strict_content_handler_factory_); | 
| 244     } else { | 246     } else { | 
| 245       connection->AddService(&content_handler_factory_); | 247       connection->AddService(&content_handler_factory_); | 
| 246     } | 248     } | 
| 247     return true; | 249     return true; | 
| 248   } | 250   } | 
| 249 | 251 | 
| 250   mojo::TracingImpl tracing_; | 252   mojo::TracingImpl tracing_; | 
| 251   DartContentHandler content_handler_; | 253   DartContentHandler content_handler_; | 
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 322                     pause_isolates_on_exit)); | 324                     pause_isolates_on_exit)); | 
| 323   } | 325   } | 
| 324 } | 326 } | 
| 325 | 327 | 
| 326 }  // namespace dart | 328 }  // namespace dart | 
| 327 | 329 | 
| 328 MojoResult MojoMain(MojoHandle application_request) { | 330 MojoResult MojoMain(MojoHandle application_request) { | 
| 329   mojo::ApplicationRunnerChromium runner(new dart::DartContentHandlerApp); | 331   mojo::ApplicationRunnerChromium runner(new dart::DartContentHandlerApp); | 
| 330   return runner.Run(application_request); | 332   return runner.Run(application_request); | 
| 331 } | 333 } | 
| OLD | NEW | 
|---|