OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface
.h" | 65 #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface
.h" |
66 #include "ui/base/l10n/l10n_util_mac.h" | 66 #include "ui/base/l10n/l10n_util_mac.h" |
67 #endif | 67 #endif |
68 | 68 |
69 #if defined(OS_POSIX) | 69 #if defined(OS_POSIX) |
70 #include <locale.h> | 70 #include <locale.h> |
71 #include <signal.h> | 71 #include <signal.h> |
72 #endif | 72 #endif |
73 | 73 |
74 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 74 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
75 #include "chrome/common/nacl_fork_delegate_linux.h" | 75 #include "chrome/app/nacl_fork_delegate_linux.h" |
76 #endif | 76 #endif |
77 | 77 |
78 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
79 #include "base/sys_info.h" | 79 #include "base/sys_info.h" |
80 #include "chrome/browser/chromeos/boot_times_loader.h" | 80 #include "chrome/browser/chromeos/boot_times_loader.h" |
81 #endif | 81 #endif |
82 | 82 |
83 #if defined(TOOLKIT_USES_GTK) | 83 #if defined(TOOLKIT_USES_GTK) |
84 #include <gdk/gdk.h> | 84 #include <gdk/gdk.h> |
85 #include <glib.h> | 85 #include <glib.h> |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 } | 697 } |
698 | 698 |
699 bool ChromeMainDelegate::DelaySandboxInitialization( | 699 bool ChromeMainDelegate::DelaySandboxInitialization( |
700 const std::string& process_type) { | 700 const std::string& process_type) { |
701 // NaClLoader does this in NaClMainPlatformDelegate::EnableSandbox(). | 701 // NaClLoader does this in NaClMainPlatformDelegate::EnableSandbox(). |
702 // No sandbox needed for relauncher. | 702 // No sandbox needed for relauncher. |
703 return process_type == switches::kNaClLoaderProcess || | 703 return process_type == switches::kNaClLoaderProcess || |
704 process_type == switches::kRelauncherProcess; | 704 process_type == switches::kRelauncherProcess; |
705 } | 705 } |
706 #elif defined(OS_POSIX) | 706 #elif defined(OS_POSIX) |
707 ZygoteForkDelegate* ChromeMainDelegate::ZygoteStarting() { | 707 content::ZygoteForkDelegate* ChromeMainDelegate::ZygoteStarting() { |
708 // Each Renderer we spawn will re-attempt initialization of the media | 708 // Each Renderer we spawn will re-attempt initialization of the media |
709 // libraries, at which point failure will be detected and handled, so | 709 // libraries, at which point failure will be detected and handled, so |
710 // we do not need to cope with initialization failures here. | 710 // we do not need to cope with initialization failures here. |
711 FilePath media_path; | 711 FilePath media_path; |
712 if (PathService::Get(chrome::DIR_MEDIA_LIBS, &media_path)) | 712 if (PathService::Get(chrome::DIR_MEDIA_LIBS, &media_path)) |
713 media::InitializeMediaLibrary(media_path); | 713 media::InitializeMediaLibrary(media_path); |
714 #if defined(DISABLE_NACL) | 714 #if defined(DISABLE_NACL) |
715 return NULL; | 715 return NULL; |
716 #else | 716 #else |
717 return new NaClForkDelegate(); | 717 return new NaClForkDelegate(); |
(...skipping 13 matching lines...) Expand all Loading... |
731 | 731 |
732 #if defined(USE_LINUX_BREAKPAD) | 732 #if defined(USE_LINUX_BREAKPAD) |
733 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets | 733 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets |
734 // this up for the browser process in a different manner. | 734 // this up for the browser process in a different manner. |
735 InitCrashReporter(); | 735 InitCrashReporter(); |
736 #endif | 736 #endif |
737 | 737 |
738 InitializeChromeContentClient(process_type); | 738 InitializeChromeContentClient(process_type); |
739 } | 739 } |
740 #endif // OS_MACOSX | 740 #endif // OS_MACOSX |
OLD | NEW |