| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
| 6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
| 7 | 7 |
| 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 #include <limits> | 11 #include <limits> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #if defined(OS_POSIX) | 14 #if defined(OS_POSIX) |
| 15 #include <utility> // for pair<> | 15 #include <utility> // for pair<> |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 #include "app/app_switches.h" | 18 #include "app/app_switches.h" |
| 19 #include "base/command_line.h" | 19 #include "base/command_line.h" |
| 20 #include "base/field_trial.h" | 20 #include "base/field_trial.h" |
| 21 #include "base/logging.h" | 21 #include "base/logging.h" |
| 22 #include "base/stl_util-inl.h" | 22 #include "base/stl_util-inl.h" |
| 23 #include "base/string_util.h" | 23 #include "base/string_util.h" |
| 24 #include "base/thread.h" | 24 #include "base/thread.h" |
| 25 #include "chrome/browser/browser_child_process_host.h" |
| 25 #include "chrome/browser/browser_process.h" | 26 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/browser/child_process_host.h" | |
| 27 #include "chrome/browser/child_process_security_policy.h" | 27 #include "chrome/browser/child_process_security_policy.h" |
| 28 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 28 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 29 #include "chrome/browser/extensions/extension_message_service.h" | 29 #include "chrome/browser/extensions/extension_message_service.h" |
| 30 #include "chrome/browser/extensions/extensions_service.h" | 30 #include "chrome/browser/extensions/extensions_service.h" |
| 31 #include "chrome/browser/extensions/user_script_master.h" | 31 #include "chrome/browser/extensions/user_script_master.h" |
| 32 #include "chrome/browser/gpu_process_host.h" | 32 #include "chrome/browser/gpu_process_host.h" |
| 33 #include "chrome/browser/history/history.h" | 33 #include "chrome/browser/history/history.h" |
| 34 #include "chrome/browser/io_thread.h" | 34 #include "chrome/browser/io_thread.h" |
| 35 #include "chrome/browser/plugin_service.h" | 35 #include "chrome/browser/plugin_service.h" |
| 36 #include "chrome/browser/profile.h" | 36 #include "chrome/browser/profile.h" |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 // If we run FieldTrials, we want to pass to their state to the renderer so | 464 // If we run FieldTrials, we want to pass to their state to the renderer so |
| 465 // that it can act in accordance with each state, or record histograms | 465 // that it can act in accordance with each state, or record histograms |
| 466 // relating to the FieldTrial states. | 466 // relating to the FieldTrial states. |
| 467 std::string field_trial_states; | 467 std::string field_trial_states; |
| 468 FieldTrialList::StatesToString(&field_trial_states); | 468 FieldTrialList::StatesToString(&field_trial_states); |
| 469 if (!field_trial_states.empty()) { | 469 if (!field_trial_states.empty()) { |
| 470 command_line->AppendSwitchWithValue(switches::kForceFieldTestNameAndValue, | 470 command_line->AppendSwitchWithValue(switches::kForceFieldTestNameAndValue, |
| 471 field_trial_states); | 471 field_trial_states); |
| 472 } | 472 } |
| 473 | 473 |
| 474 ChildProcessHost::SetCrashReporterCommandLine(command_line); | 474 BrowserChildProcessHost::SetCrashReporterCommandLine(command_line); |
| 475 | 475 |
| 476 FilePath user_data_dir = | 476 FilePath user_data_dir = |
| 477 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); | 477 browser_command_line.GetSwitchValuePath(switches::kUserDataDir); |
| 478 | 478 |
| 479 if (!user_data_dir.empty()) | 479 if (!user_data_dir.empty()) |
| 480 command_line->AppendSwitchWithValue(switches::kUserDataDir, | 480 command_line->AppendSwitchWithValue(switches::kUserDataDir, |
| 481 user_data_dir.value()); | 481 user_data_dir.value()); |
| 482 #if defined(OS_CHROMEOS) | 482 #if defined(OS_CHROMEOS) |
| 483 const std::string& profile = | 483 const std::string& profile = |
| 484 browser_command_line.GetSwitchValueASCII(switches::kProfile); | 484 browser_command_line.GetSwitchValueASCII(switches::kProfile); |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 IPC::InvalidPlatformFileForTransit(), | 1065 IPC::InvalidPlatformFileForTransit(), |
| 1066 std::vector<std::string>(), | 1066 std::vector<std::string>(), |
| 1067 std::string(), | 1067 std::string(), |
| 1068 false)); | 1068 false)); |
| 1069 } | 1069 } |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { | 1072 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { |
| 1073 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); | 1073 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); |
| 1074 } | 1074 } |
| OLD | NEW |