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

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

Issue 7791005: Stop using the default profile's proxy service for plugin proxy requests, and instead use the ass... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix test Created 9 years, 3 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
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/base_switches.h" 15 #include "base/base_switches.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/file_path.h" 17 #include "base/file_path.h"
18 #include "base/file_util.h" 18 #include "base/file_util.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "base/string_util.h" 21 #include "base/string_util.h"
22 #include "base/utf_string_conversions.h" 22 #include "base/utf_string_conversions.h"
23 #include "content/browser/browser_thread.h" 23 #include "content/browser/browser_thread.h"
24 #include "content/browser/content_browser_client.h" 24 #include "content/browser/content_browser_client.h"
25 #include "content/browser/resolve_proxy_msg_helper.h"
26 #include "content/browser/plugin_service.h" 25 #include "content/browser/plugin_service.h"
27 #include "content/browser/renderer_host/resource_dispatcher_host.h" 26 #include "content/browser/renderer_host/resource_dispatcher_host.h"
28 #include "content/browser/renderer_host/resource_message_filter.h" 27 #include "content/browser/renderer_host/resource_message_filter.h"
29 #include "content/common/content_switches.h" 28 #include "content/common/content_switches.h"
30 #include "content/common/plugin_messages.h" 29 #include "content/common/plugin_messages.h"
31 #include "content/common/resource_messages.h" 30 #include "content/common/resource_messages.h"
32 #include "ipc/ipc_switches.h" 31 #include "ipc/ipc_switches.h"
33 #include "ui/base/ui_base_switches.h" 32 #include "ui/base/ui_base_switches.h"
34 #include "ui/gfx/native_widget_types.h" 33 #include "ui/gfx/native_widget_types.h"
35 #include "ui/gfx/gl/gl_switches.h" 34 #include "ui/gfx/gl/gl_switches.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 #endif 257 #endif
259 cmd_line); 258 cmd_line);
260 259
261 // The plugin needs to be shutdown gracefully, i.e. NP_Shutdown needs to be 260 // The plugin needs to be shutdown gracefully, i.e. NP_Shutdown needs to be
262 // called on the plugin. The plugin process exits when it receives the 261 // called on the plugin. The plugin process exits when it receives the
263 // OnChannelError notification indicating that the browser plugin channel has 262 // OnChannelError notification indicating that the browser plugin channel has
264 // been destroyed. 263 // been destroyed.
265 SetTerminateChildOnShutdown(false); 264 SetTerminateChildOnShutdown(false);
266 265
267 content::GetContentClient()->browser()->PluginProcessHostCreated(this); 266 content::GetContentClient()->browser()->PluginProcessHostCreated(this);
268 AddFilter(new ResolveProxyMsgHelper(NULL));
269 267
270 return true; 268 return true;
271 } 269 }
272 270
273 void PluginProcessHost::ForceShutdown() { 271 void PluginProcessHost::ForceShutdown() {
274 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 272 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
275 Send(new PluginProcessMsg_NotifyRenderersOfPendingShutdown()); 273 Send(new PluginProcessMsg_NotifyRenderersOfPendingShutdown());
276 BrowserChildProcessHost::ForceShutdown(); 274 BrowserChildProcessHost::ForceShutdown();
277 } 275 }
278 276
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 365 }
368 } 366 }
369 367
370 void PluginProcessHost::OnChannelCreated( 368 void PluginProcessHost::OnChannelCreated(
371 const IPC::ChannelHandle& channel_handle) { 369 const IPC::ChannelHandle& channel_handle) {
372 Client* client = sent_requests_.front(); 370 Client* client = sent_requests_.front();
373 371
374 client->OnChannelOpened(channel_handle); 372 client->OnChannelOpened(channel_handle);
375 sent_requests_.pop(); 373 sent_requests_.pop();
376 } 374 }
OLDNEW
« no previous file with comments | « chrome_frame/renderer_glue.cc ('k') | content/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698