Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: content/browser/plugin_process_host.cc

Issue 7104144: Get rid of the following dependencies from content: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_child_process_host.cc ('k') | content/browser/plugin_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "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<>
11 #endif 11 #endif
12 12
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/file_path.h" 16 #include "base/file_path.h"
17 #include "base/file_util.h" 17 #include "base/file_util.h"
18 #include "base/logging.h" 18 #include "base/logging.h"
19 #include "base/path_service.h" 19 #include "base/path_service.h"
20 #include "base/string_util.h" 20 #include "base/string_util.h"
21 #include "base/utf_string_conversions.h" 21 #include "base/utf_string_conversions.h"
22 #include "chrome/common/chrome_paths.h"
23 #include "chrome/common/logging_chrome.h"
24 #include "content/browser/browser_thread.h" 22 #include "content/browser/browser_thread.h"
25 #include "content/browser/content_browser_client.h" 23 #include "content/browser/content_browser_client.h"
26 #include "content/browser/resolve_proxy_msg_helper.h" 24 #include "content/browser/resolve_proxy_msg_helper.h"
27 #include "content/browser/plugin_service.h" 25 #include "content/browser/plugin_service.h"
28 #include "content/browser/renderer_host/resource_dispatcher_host.h" 26 #include "content/browser/renderer_host/resource_dispatcher_host.h"
29 #include "content/browser/renderer_host/resource_message_filter.h" 27 #include "content/browser/renderer_host/resource_message_filter.h"
30 #include "content/common/content_switches.h" 28 #include "content/common/content_switches.h"
31 #include "content/common/plugin_messages.h" 29 #include "content/common/plugin_messages.h"
32 #include "content/common/resource_messages.h" 30 #include "content/common/resource_messages.h"
33 #include "ipc/ipc_switches.h" 31 #include "ipc/ipc_switches.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 FilePath exe_path = GetChildPath(plugin_launcher.empty()); 169 FilePath exe_path = GetChildPath(plugin_launcher.empty());
172 if (exe_path.empty()) 170 if (exe_path.empty())
173 return false; 171 return false;
174 172
175 CommandLine* cmd_line = new CommandLine(exe_path); 173 CommandLine* cmd_line = new CommandLine(exe_path);
176 // Put the process type and plugin path first so they're easier to see 174 // Put the process type and plugin path first so they're easier to see
177 // in process listings using native process management tools. 175 // in process listings using native process management tools.
178 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kPluginProcess); 176 cmd_line->AppendSwitchASCII(switches::kProcessType, switches::kPluginProcess);
179 cmd_line->AppendSwitchPath(switches::kPluginPath, info.path); 177 cmd_line->AppendSwitchPath(switches::kPluginPath, info.path);
180 178
181 if (logging::DialogsAreSuppressed())
182 cmd_line->AppendSwitch(switches::kNoErrorDialogs);
183
184 // Propagate the following switches to the plugin command line (along with 179 // Propagate the following switches to the plugin command line (along with
185 // any associated values) if present in the browser command line 180 // any associated values) if present in the browser command line
186 static const char* const kSwitchNames[] = { 181 static const char* const kSwitchNames[] = {
187 switches::kDisableBreakpad, 182 switches::kDisableBreakpad,
188 switches::kDisableLogging, 183 switches::kDisableLogging,
189 switches::kEnableDCHECK, 184 switches::kEnableDCHECK,
190 switches::kEnableLogging, 185 switches::kEnableLogging,
191 switches::kEnableStatsTable, 186 switches::kEnableStatsTable,
192 switches::kFullMemoryCrashReport, 187 switches::kFullMemoryCrashReport,
193 switches::kLoggingLevel, 188 switches::kLoggingLevel,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 345 }
351 } 346 }
352 347
353 void PluginProcessHost::OnChannelCreated( 348 void PluginProcessHost::OnChannelCreated(
354 const IPC::ChannelHandle& channel_handle) { 349 const IPC::ChannelHandle& channel_handle) {
355 Client* client = sent_requests_.front(); 350 Client* client = sent_requests_.front();
356 351
357 client->OnChannelOpened(channel_handle); 352 client->OnChannelOpened(channel_handle);
358 sent_requests_.pop(); 353 sent_requests_.pop();
359 } 354 }
OLDNEW
« no previous file with comments | « content/browser/browser_child_process_host.cc ('k') | content/browser/plugin_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698