| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <iostream> | 5 #include <iostream> |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/process/memory.h" | 13 #include "base/process/memory.h" |
| 14 #include "dart/runtime/include/dart_api.h" | |
| 15 #include "mojo/dart/dart_snapshotter/vm.h" | 14 #include "mojo/dart/dart_snapshotter/vm.h" |
| 16 #include "mojo/edk/embedder/embedder.h" | 15 #include "mojo/edk/embedder/embedder.h" |
| 17 #include "mojo/edk/embedder/simple_platform_support.h" | 16 #include "mojo/edk/embedder/simple_platform_support.h" |
| 17 #include "mojo/public/third_party/dart/runtime/include/dart_api.h" |
| 18 #include "tonic/dart_error.h" | 18 #include "tonic/dart_error.h" |
| 19 #include "tonic/dart_isolate_scope.h" | 19 #include "tonic/dart_isolate_scope.h" |
| 20 #include "tonic/dart_library_loader.h" | 20 #include "tonic/dart_library_loader.h" |
| 21 #include "tonic/dart_library_provider_files.h" | 21 #include "tonic/dart_library_provider_files.h" |
| 22 #include "tonic/dart_script_loader_sync.h" | 22 #include "tonic/dart_script_loader_sync.h" |
| 23 #include "tonic/dart_state.h" | 23 #include "tonic/dart_state.h" |
| 24 | 24 |
| 25 const char kHelp[] = "help"; | 25 const char kHelp[] = "help"; |
| 26 const char kPackageRoot[] = "package-root"; | 26 const char kPackageRoot[] = "package-root"; |
| 27 const char kSnapshot[] = "snapshot"; | 27 const char kSnapshot[] = "snapshot"; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 // Load script. | 92 // Load script. |
| 93 tonic::DartScriptLoaderSync::LoadScript(args[0], | 93 tonic::DartScriptLoaderSync::LoadScript(args[0], |
| 94 isolate_data->library_provider()); | 94 isolate_data->library_provider()); |
| 95 | 95 |
| 96 // Write snapshot. | 96 // Write snapshot. |
| 97 WriteSnapshot(command_line.GetSwitchValuePath(kSnapshot)); | 97 WriteSnapshot(command_line.GetSwitchValuePath(kSnapshot)); |
| 98 | 98 |
| 99 return 0; | 99 return 0; |
| 100 } | 100 } |
| OLD | NEW |