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