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/ppapi_plugin_process_host.h" | 5 #include "content/browser/ppapi_plugin_process_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "content/browser/browser_child_process_host_impl.h" | 14 #include "content/browser/browser_child_process_host_impl.h" |
15 #include "content/browser/plugin_service_impl.h" | 15 #include "content/browser/plugin_service_impl.h" |
16 #include "content/browser/renderer_host/render_message_filter.h" | 16 #include "content/browser/renderer_host/render_message_filter.h" |
17 #include "content/common/child_process_host_impl.h" | 17 #include "content/common/child_process_host_impl.h" |
18 #include "content/common/child_process_messages.h" | 18 #include "content/common/child_process_messages.h" |
19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
20 #include "content/public/common/pepper_plugin_info.h" | 20 #include "content/public/common/pepper_plugin_info.h" |
21 #include "content/public/common/process_type.h" | 21 #include "content/public/common/process_type.h" |
22 #include "ipc/ipc_switches.h" | 22 #include "ipc/ipc_switches.h" |
23 #include "net/base/network_change_notifier.h" | 23 #include "net/base/network_change_notifier.h" |
24 #include "ppapi/proxy/ppapi_messages.h" | 24 #include "ppapi/proxy/ppapi_messages.h" |
| 25 #include "webkit/plugins/plugin_switches.h" |
25 | 26 |
26 using content::ChildProcessHost; | 27 using content::ChildProcessHost; |
27 using content::ChildProcessHostImpl; | 28 using content::ChildProcessHostImpl; |
28 | 29 |
29 class PpapiPluginProcessHost::PluginNetworkObserver | 30 class PpapiPluginProcessHost::PluginNetworkObserver |
30 : public net::NetworkChangeNotifier::IPAddressObserver, | 31 : public net::NetworkChangeNotifier::IPAddressObserver, |
31 public net::NetworkChangeNotifier::OnlineStateObserver { | 32 public net::NetworkChangeNotifier::OnlineStateObserver { |
32 public: | 33 public: |
33 explicit PluginNetworkObserver(PpapiPluginProcessHost* process_host) | 34 explicit PluginNetworkObserver(PpapiPluginProcessHost* process_host) |
34 : process_host_(process_host) { | 35 : process_host_(process_host) { |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 renderer_process, &renderers_plugin_handle, | 293 renderer_process, &renderers_plugin_handle, |
293 0, FALSE, DUPLICATE_SAME_ACCESS); | 294 0, FALSE, DUPLICATE_SAME_ACCESS); |
294 #elif defined(OS_POSIX) | 295 #elif defined(OS_POSIX) |
295 // Don't need to duplicate anything on POSIX since it's just a PID. | 296 // Don't need to duplicate anything on POSIX since it's just a PID. |
296 base::ProcessHandle renderers_plugin_handle = plugin_process; | 297 base::ProcessHandle renderers_plugin_handle = plugin_process; |
297 #endif | 298 #endif |
298 | 299 |
299 client->OnPpapiChannelOpened(renderers_plugin_handle, channel_handle, | 300 client->OnPpapiChannelOpened(renderers_plugin_handle, channel_handle, |
300 process_->GetData().id); | 301 process_->GetData().id); |
301 } | 302 } |
OLD | NEW |