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 12 matching lines...) Expand all Loading... |
23 #include "chrome/common/chrome_paths_internal.h" | 23 #include "chrome/common/chrome_paths_internal.h" |
24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
25 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
26 #include "chrome/common/logging_chrome.h" | 26 #include "chrome/common/logging_chrome.h" |
27 #include "chrome/common/profiling.h" | 27 #include "chrome/common/profiling.h" |
28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
29 #include "chrome/plugin/chrome_content_plugin_client.h" | 29 #include "chrome/plugin/chrome_content_plugin_client.h" |
30 #include "chrome/renderer/chrome_content_renderer_client.h" | 30 #include "chrome/renderer/chrome_content_renderer_client.h" |
31 #include "chrome/utility/chrome_content_utility_client.h" | 31 #include "chrome/utility/chrome_content_utility_client.h" |
32 #include "content/app/content_main.h" | 32 #include "content/app/content_main.h" |
33 #include "content/browser/renderer_host/render_process_host.h" | |
34 #include "content/common/content_counters.h" | 33 #include "content/common/content_counters.h" |
35 #include "content/public/app/content_main_delegate.h" | 34 #include "content/public/app/content_main_delegate.h" |
| 35 #include "content/public/browser/render_process_host.h" |
36 #include "content/public/common/content_client.h" | 36 #include "content/public/common/content_client.h" |
37 #include "content/public/common/content_paths.h" | 37 #include "content/public/common/content_paths.h" |
38 #include "content/public/common/content_switches.h" | 38 #include "content/public/common/content_switches.h" |
39 #include "media/base/media.h" | 39 #include "media/base/media.h" |
40 #include "ui/base/resource/resource_bundle.h" | 40 #include "ui/base/resource/resource_bundle.h" |
41 #include "ui/base/ui_base_switches.h" | 41 #include "ui/base/ui_base_switches.h" |
42 | 42 |
43 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
44 #include <algorithm> | 44 #include <algorithm> |
45 #include <atlbase.h> | 45 #include <atlbase.h> |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 EnableHeapProfiler(command_line); | 563 EnableHeapProfiler(command_line); |
564 | 564 |
565 // Enable Message Loop related state asap. | 565 // Enable Message Loop related state asap. |
566 if (command_line.HasSwitch(switches::kMessageLoopHistogrammer)) | 566 if (command_line.HasSwitch(switches::kMessageLoopHistogrammer)) |
567 MessageLoop::EnableHistogrammer(true); | 567 MessageLoop::EnableHistogrammer(true); |
568 | 568 |
569 // Single-process is an unsupported and not fully tested mode, so | 569 // Single-process is an unsupported and not fully tested mode, so |
570 // don't enable it for official Chrome builds. | 570 // don't enable it for official Chrome builds. |
571 #if !defined(GOOGLE_CHROME_BUILD) | 571 #if !defined(GOOGLE_CHROME_BUILD) |
572 if (command_line.HasSwitch(switches::kSingleProcess)) { | 572 if (command_line.HasSwitch(switches::kSingleProcess)) { |
573 RenderProcessHost::set_run_renderer_in_process(true); | 573 content::RenderProcessHost::set_run_renderer_in_process(true); |
574 #if defined(OS_MACOSX) | 574 #if defined(OS_MACOSX) |
575 // TODO(port-mac): This is from renderer_main_platform_delegate.cc. | 575 // TODO(port-mac): This is from renderer_main_platform_delegate.cc. |
576 // shess tried to refactor things appropriately, but it sprawled out | 576 // shess tried to refactor things appropriately, but it sprawled out |
577 // of control because different platforms needed different styles of | 577 // of control because different platforms needed different styles of |
578 // initialization. Try again once we understand the process | 578 // initialization. Try again once we understand the process |
579 // architecture needed and where it should live. | 579 // architecture needed and where it should live. |
580 InitWebCoreSystemInterface(); | 580 InitWebCoreSystemInterface(); |
581 #endif | 581 #endif |
582 | 582 |
583 InitializeChromeContentRendererClient(); | 583 InitializeChromeContentRendererClient(); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |