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/browser/plugin_process_host.h" | 5 #include "content/browser/plugin_process_host.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #elif defined(OS_POSIX) | 9 #elif defined(OS_POSIX) |
10 #include <utility> // for pair<> | 10 #include <utility> // for pair<> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 cmd_line->AppendSwitchPath(switches::kPluginPath, info.path); | 179 cmd_line->AppendSwitchPath(switches::kPluginPath, info.path); |
180 | 180 |
181 // Propagate the following switches to the plugin command line (along with | 181 // Propagate the following switches to the plugin command line (along with |
182 // any associated values) if present in the browser command line | 182 // any associated values) if present in the browser command line |
183 static const char* const kSwitchNames[] = { | 183 static const char* const kSwitchNames[] = { |
184 switches::kDisableBreakpad, | 184 switches::kDisableBreakpad, |
185 #if defined(OS_MACOSX) | 185 #if defined(OS_MACOSX) |
186 switches::kDisableCompositedCoreAnimationPlugins, | 186 switches::kDisableCompositedCoreAnimationPlugins, |
187 switches::kDisableCoreAnimationPlugins, | 187 switches::kDisableCoreAnimationPlugins, |
188 #endif | 188 #endif |
189 switches::kDisableLogging, | |
190 switches::kEnableDCHECK, | |
191 switches::kEnableLogging, | |
192 #if defined(OS_MACOSX) | 189 #if defined(OS_MACOSX) |
piman
2012/10/17 06:10:25
nit: collapse the 2 #ifdef OS_MACOSX blocks
qiankun
2012/10/17 09:47:37
Done.
| |
193 switches::kEnableSandboxLogging, | 190 switches::kEnableSandboxLogging, |
194 #endif | 191 #endif |
195 switches::kEnableStatsTable, | 192 switches::kEnableStatsTable, |
196 switches::kFullMemoryCrashReport, | 193 switches::kFullMemoryCrashReport, |
197 switches::kLoggingLevel, | 194 switches::kLoggingLevel, |
198 switches::kLogPluginMessages, | 195 switches::kLogPluginMessages, |
199 switches::kNoSandbox, | 196 switches::kNoSandbox, |
200 switches::kPluginStartupDialog, | 197 switches::kPluginStartupDialog, |
201 switches::kTestSandbox, | 198 switches::kTestSandbox, |
202 switches::kTraceStartup, | 199 switches::kTraceStartup, |
203 switches::kUseGL, | 200 switches::kUseGL, |
204 switches::kUserAgent, | 201 switches::kUserAgent, |
205 switches::kV, | |
206 }; | 202 }; |
207 | 203 |
208 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 204 cmd_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
209 arraysize(kSwitchNames)); | 205 arraysize(kSwitchNames)); |
210 | 206 |
211 GpuDataManagerImpl::GetInstance()->AppendPluginCommandLine(cmd_line); | 207 GpuDataManagerImpl::GetInstance()->AppendPluginCommandLine(cmd_line); |
212 | 208 |
213 // If specified, prepend a launcher program to the command line. | 209 // If specified, prepend a launcher program to the command line. |
214 if (!plugin_launcher.empty()) | 210 if (!plugin_launcher.empty()) |
215 cmd_line->PrependWrapper(plugin_launcher); | 211 cmd_line->PrependWrapper(plugin_launcher); |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
409 } | 405 } |
410 | 406 |
411 void PluginProcessHost::OnChannelCreated( | 407 void PluginProcessHost::OnChannelCreated( |
412 const IPC::ChannelHandle& channel_handle) { | 408 const IPC::ChannelHandle& channel_handle) { |
413 Client* client = sent_requests_.front(); | 409 Client* client = sent_requests_.front(); |
414 | 410 |
415 if (client) | 411 if (client) |
416 client->OnChannelOpened(channel_handle); | 412 client->OnChannelOpened(channel_handle); |
417 sent_requests_.pop_front(); | 413 sent_requests_.pop_front(); |
418 } | 414 } |
OLD | NEW |