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

Side by Side Diff: mojo/apps/js/standalone_main.cc

Issue 594603003: Infrastructure for reading V8's initial snapshot from external files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Ross' comments Created 6 years, 2 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
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/files/file_util.h" 5 #include "base/files/file_util.h"
6 #include "base/i18n/icu_util.h" 6 #include "base/i18n/icu_util.h"
7 #include "mojo/application/application_runner_chromium.h" 7 #include "mojo/application/application_runner_chromium.h"
8 #include "mojo/apps/js/application_delegate_impl.h" 8 #include "mojo/apps/js/application_delegate_impl.h"
9 #include "mojo/apps/js/js_app.h" 9 #include "mojo/apps/js/js_app.h"
10 #include "mojo/public/c/system/main.h" 10 #include "mojo/public/c/system/main.h"
11 #include "mojo/public/cpp/application/application_delegate.h" 11 #include "mojo/public/cpp/application/application_delegate.h"
12 #include "mojo/public/cpp/application/application_impl.h" 12 #include "mojo/public/cpp/application/application_impl.h"
13 13
14 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
15 #include "gin/public/isolate_holder.h"
16 #endif
17
14 namespace mojo { 18 namespace mojo {
15 namespace apps { 19 namespace apps {
16 20
17 class StandaloneJSApp : public JSApp { 21 class StandaloneJSApp : public JSApp {
18 public: 22 public:
19 StandaloneJSApp(ApplicationDelegateImpl* app_delegate_impl, 23 StandaloneJSApp(ApplicationDelegateImpl* app_delegate_impl,
20 const base::FilePath& path) 24 const base::FilePath& path)
21 : JSApp(app_delegate_impl), 25 : JSApp(app_delegate_impl),
22 path_(path) { 26 path_(path) {
23 } 27 }
(...skipping 18 matching lines...) Expand all
42 StartJSApp(js_app.Pass()); 46 StartJSApp(js_app.Pass());
43 } 47 }
44 } 48 }
45 }; 49 };
46 50
47 } // namespace apps 51 } // namespace apps
48 } // namespace mojo 52 } // namespace mojo
49 53
50 MojoResult MojoMain(MojoHandle shell_handle) { 54 MojoResult MojoMain(MojoHandle shell_handle) {
51 base::i18n::InitializeICU(); 55 base::i18n::InitializeICU();
56 #ifdef V8_USE_EXTERNAL_STARTUP_DATA
57 gin::IsolateHolder::LoadV8Snapshot();
58 #endif
52 mojo::ApplicationRunnerChromium runner( 59 mojo::ApplicationRunnerChromium runner(
53 new mojo::apps::StandaloneApplicationDelegateImpl()); 60 new mojo::apps::StandaloneApplicationDelegateImpl());
54 return runner.Run(shell_handle); 61 return runner.Run(shell_handle);
55 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698