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

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

Issue 1432123002: Switch to direct write font proxy and remove the font cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dwfontsplit
Patch Set: Move functions into anon namespace and minor renames. Created 5 years 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
OLDNEW
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
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 PROCESS_TYPE_PPAPI_PLUGIN, this)); 288 PROCESS_TYPE_PPAPI_PLUGIN, this));
288 289
289 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, 290 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name,
290 info.path, profile_data_directory, 291 info.path, profile_data_directory,
291 false /* in_process */, 292 false /* in_process */,
292 false /* external_plugin */)); 293 false /* external_plugin */));
293 294
294 filter_ = new PepperMessageFilter(); 295 filter_ = new PepperMessageFilter();
295 process_->AddFilter(filter_.get()); 296 process_->AddFilter(filter_.get());
296 process_->GetHost()->AddFilter(host_impl_->message_filter().get()); 297 process_->GetHost()->AddFilter(host_impl_->message_filter().get());
298 #if defined(OS_WIN)
299 process_->AddFilter(new DWriteFontProxyMessageFilter());
300 #endif
297 301
298 GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get()); 302 GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get());
299 303
300 // Only request network status updates if the plugin has dev permissions. 304 // Only request network status updates if the plugin has dev permissions.
301 if (permissions_.HasPermission(ppapi::PERMISSION_DEV)) 305 if (permissions_.HasPermission(ppapi::PERMISSION_DEV))
302 network_observer_.reset(new PluginNetworkObserver(this)); 306 network_observer_.reset(new PluginNetworkObserver(this));
303 } 307 }
304 308
305 PpapiPluginProcessHost::PpapiPluginProcessHost() 309 PpapiPluginProcessHost::PpapiPluginProcessHost()
306 : is_broker_(true) { 310 : is_broker_(true) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // sent_requests_ queue should be the one that the plugin just created. 515 // sent_requests_ queue should be the one that the plugin just created.
512 Client* client = sent_requests_.front(); 516 Client* client = sent_requests_.front();
513 sent_requests_.pop(); 517 sent_requests_.pop();
514 518
515 const ChildProcessData& data = process_->GetData(); 519 const ChildProcessData& data = process_->GetData();
516 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), 520 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle),
517 data.id); 521 data.id);
518 } 522 }
519 523
520 } // namespace content 524 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698