OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 #include "content/public/renderer/content_renderer_client.h" | 64 #include "content/public/renderer/content_renderer_client.h" |
65 #include "content/public/utility/content_utility_client.h" | 65 #include "content/public/utility/content_utility_client.h" |
66 #include "content/renderer/in_process_renderer_thread.h" | 66 #include "content/renderer/in_process_renderer_thread.h" |
67 #include "content/utility/in_process_utility_thread.h" | 67 #include "content/utility/in_process_utility_thread.h" |
68 #include "ipc/ipc_descriptors.h" | 68 #include "ipc/ipc_descriptors.h" |
69 #include "media/base/media.h" | 69 #include "media/base/media.h" |
70 #include "ppapi/features/features.h" | 70 #include "ppapi/features/features.h" |
71 #include "ui/base/ui_base_paths.h" | 71 #include "ui/base/ui_base_paths.h" |
72 #include "ui/base/ui_base_switches.h" | 72 #include "ui/base/ui_base_switches.h" |
73 | 73 |
74 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 74 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) && \ |
| 75 !defined(CHROME_MULTIPLE_DLL_BROWSER) |
75 #include "gin/v8_initializer.h" | 76 #include "gin/v8_initializer.h" |
76 #endif | 77 #endif |
77 | 78 |
78 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
79 #include <malloc.h> | 80 #include <malloc.h> |
80 #include <cstring> | 81 #include <cstring> |
81 | 82 |
82 #include "base/trace_event/trace_event_etw_export_win.h" | 83 #include "base/trace_event/trace_event_etw_export_win.h" |
83 #include "base/win/process_startup_helper.h" | 84 #include "base/win/process_startup_helper.h" |
84 #include "sandbox/win/src/sandbox_types.h" | 85 #include "sandbox/win/src/sandbox_types.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 gin::V8Initializer::LoadV8Snapshot(); | 726 gin::V8Initializer::LoadV8Snapshot(); |
726 } | 727 } |
727 if (v8_natives_fd != -1) { | 728 if (v8_natives_fd != -1) { |
728 auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor); | 729 auto v8_natives_region = g_fds->GetRegion(kV8NativesDataDescriptor); |
729 gin::V8Initializer::LoadV8NativesFromFD( | 730 gin::V8Initializer::LoadV8NativesFromFD( |
730 v8_natives_fd, v8_natives_region.offset, v8_natives_region.size); | 731 v8_natives_fd, v8_natives_region.offset, v8_natives_region.size); |
731 } else { | 732 } else { |
732 gin::V8Initializer::LoadV8Natives(); | 733 gin::V8Initializer::LoadV8Natives(); |
733 } | 734 } |
734 #else | 735 #else |
| 736 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
735 gin::V8Initializer::LoadV8Snapshot(); | 737 gin::V8Initializer::LoadV8Snapshot(); |
736 gin::V8Initializer::LoadV8Natives(); | 738 gin::V8Initializer::LoadV8Natives(); |
| 739 #endif // !CHROME_MULTIPLE_DLL_BROWSER |
737 #endif // OS_POSIX && !OS_MACOSX | 740 #endif // OS_POSIX && !OS_MACOSX |
738 #endif // V8_USE_EXTERNAL_STARTUP_DATA | 741 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
739 | 742 |
740 if (delegate_) | 743 if (delegate_) |
741 delegate_->PreSandboxStartup(); | 744 delegate_->PreSandboxStartup(); |
742 | 745 |
743 if (!process_type.empty()) | 746 if (!process_type.empty()) |
744 CommonSubprocessInit(process_type); | 747 CommonSubprocessInit(process_type); |
745 | 748 |
746 #if defined(OS_WIN) | 749 #if defined(OS_WIN) |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 | 856 |
854 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 857 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
855 }; | 858 }; |
856 | 859 |
857 // static | 860 // static |
858 ContentMainRunner* ContentMainRunner::Create() { | 861 ContentMainRunner* ContentMainRunner::Create() { |
859 return new ContentMainRunnerImpl(); | 862 return new ContentMainRunnerImpl(); |
860 } | 863 } |
861 | 864 |
862 } // namespace content | 865 } // namespace content |
OLD | NEW |