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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/public/common/pepper_plugin_info.h" | 24 #include "content/public/common/pepper_plugin_info.h" |
25 #include "content/public/common/process_type.h" | 25 #include "content/public/common/process_type.h" |
26 #include "content/public/common/sandbox_type.h" | 26 #include "content/public/common/sandbox_type.h" |
27 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 27 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
28 #include "ipc/ipc_switches.h" | 28 #include "ipc/ipc_switches.h" |
29 #include "net/base/network_change_notifier.h" | 29 #include "net/base/network_change_notifier.h" |
30 #include "ppapi/proxy/ppapi_messages.h" | 30 #include "ppapi/proxy/ppapi_messages.h" |
31 #include "ui/base/ui_base_switches.h" | 31 #include "ui/base/ui_base_switches.h" |
32 | 32 |
33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 34 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
34 #include "content/common/sandbox_win.h" | 35 #include "content/common/sandbox_win.h" |
35 #include "sandbox/win/src/process_mitigations.h" | 36 #include "sandbox/win/src/process_mitigations.h" |
36 #include "sandbox/win/src/sandbox_policy.h" | 37 #include "sandbox/win/src/sandbox_policy.h" |
37 #include "ui/gfx/win/dpi.h" | 38 #include "ui/gfx/win/dpi.h" |
38 #endif | 39 #endif |
39 | 40 |
40 namespace content { | 41 namespace content { |
41 | 42 |
42 // NOTE: changes to this class need to be reviewed by the security team. | 43 // NOTE: changes to this class need to be reviewed by the security team. |
43 class PpapiPluginSandboxedProcessLauncherDelegate | 44 class PpapiPluginSandboxedProcessLauncherDelegate |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 PROCESS_TYPE_PPAPI_PLUGIN, this)); | 287 PROCESS_TYPE_PPAPI_PLUGIN, this)); |
287 | 288 |
288 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, | 289 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, |
289 info.path, profile_data_directory, | 290 info.path, profile_data_directory, |
290 false /* in_process */, | 291 false /* in_process */, |
291 false /* external_plugin */)); | 292 false /* external_plugin */)); |
292 | 293 |
293 filter_ = new PepperMessageFilter(); | 294 filter_ = new PepperMessageFilter(); |
294 process_->AddFilter(filter_.get()); | 295 process_->AddFilter(filter_.get()); |
295 process_->GetHost()->AddFilter(host_impl_->message_filter().get()); | 296 process_->GetHost()->AddFilter(host_impl_->message_filter().get()); |
| 297 #if defined(OS_WIN) |
| 298 process_->AddFilter(new DWriteFontProxyMessageFilter()); |
| 299 #endif |
296 | 300 |
297 GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get()); | 301 GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get()); |
298 | 302 |
299 // Only request network status updates if the plugin has dev permissions. | 303 // Only request network status updates if the plugin has dev permissions. |
300 if (permissions_.HasPermission(ppapi::PERMISSION_DEV)) | 304 if (permissions_.HasPermission(ppapi::PERMISSION_DEV)) |
301 network_observer_.reset(new PluginNetworkObserver(this)); | 305 network_observer_.reset(new PluginNetworkObserver(this)); |
302 } | 306 } |
303 | 307 |
304 PpapiPluginProcessHost::PpapiPluginProcessHost() | 308 PpapiPluginProcessHost::PpapiPluginProcessHost() |
305 : is_broker_(true) { | 309 : is_broker_(true) { |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 // sent_requests_ queue should be the one that the plugin just created. | 514 // sent_requests_ queue should be the one that the plugin just created. |
511 Client* client = sent_requests_.front(); | 515 Client* client = sent_requests_.front(); |
512 sent_requests_.pop(); | 516 sent_requests_.pop(); |
513 | 517 |
514 const ChildProcessData& data = process_->GetData(); | 518 const ChildProcessData& data = process_->GetData(); |
515 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 519 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
516 data.id); | 520 data.id); |
517 } | 521 } |
518 | 522 |
519 } // namespace content | 523 } // namespace content |
OLD | NEW |