| 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 <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 { switches::kPpapiPluginProcess, PpapiPluginMain }, | 357 { switches::kPpapiPluginProcess, PpapiPluginMain }, |
| 358 { switches::kUtilityProcess, UtilityMain }, | 358 { switches::kUtilityProcess, UtilityMain }, |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 scoped_ptr<ZygoteForkDelegate> zygote_fork_delegate; | 361 scoped_ptr<ZygoteForkDelegate> zygote_fork_delegate; |
| 362 if (delegate) { | 362 if (delegate) { |
| 363 zygote_fork_delegate.reset(delegate->ZygoteStarting()); | 363 zygote_fork_delegate.reset(delegate->ZygoteStarting()); |
| 364 // Each Renderer we spawn will re-attempt initialization of the media | 364 // Each Renderer we spawn will re-attempt initialization of the media |
| 365 // libraries, at which point failure will be detected and handled, so | 365 // libraries, at which point failure will be detected and handled, so |
| 366 // we do not need to cope with initialization failures here. | 366 // we do not need to cope with initialization failures here. |
| 367 FilePath media_path; | 367 base::FilePath media_path; |
| 368 if (PathService::Get(DIR_MEDIA_LIBS, &media_path)) | 368 if (PathService::Get(DIR_MEDIA_LIBS, &media_path)) |
| 369 media::InitializeMediaLibrary(media_path); | 369 media::InitializeMediaLibrary(media_path); |
| 370 } | 370 } |
| 371 | 371 |
| 372 // This function call can return multiple times, once per fork(). | 372 // This function call can return multiple times, once per fork(). |
| 373 if (!ZygoteMain(main_function_params, zygote_fork_delegate.get())) | 373 if (!ZygoteMain(main_function_params, zygote_fork_delegate.get())) |
| 374 return 1; | 374 return 1; |
| 375 | 375 |
| 376 if (delegate) delegate->ZygoteForked(); | 376 if (delegate) delegate->ZygoteForked(); |
| 377 | 377 |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 812 |
| 813 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 813 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 814 }; | 814 }; |
| 815 | 815 |
| 816 // static | 816 // static |
| 817 ContentMainRunner* ContentMainRunner::Create() { | 817 ContentMainRunner* ContentMainRunner::Create() { |
| 818 return new ContentMainRunnerImpl(); | 818 return new ContentMainRunnerImpl(); |
| 819 } | 819 } |
| 820 | 820 |
| 821 } // namespace content | 821 } // namespace content |
| OLD | NEW |