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

Side by Side Diff: content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_aura. Pango headers missing. Created 7 years, 9 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
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_truetype_font_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer_host/pepper/content_browser_pepper_host_facto ry.h" 5 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto ry.h"
6 6
7 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" 7 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
8 #include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_hos t.h" 8 #include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_hos t.h"
9 #include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter. h" 9 #include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter. h"
10 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" 10 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h"
11 #include "content/browser/renderer_host/pepper/pepper_host_resolver_private_mess age_filter.h" 11 #include "content/browser/renderer_host/pepper/pepper_host_resolver_private_mess age_filter.h"
12 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" 12 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
13 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" 13 #include "content/browser/renderer_host/pepper/pepper_printing_host.h"
14 #include "content/browser/renderer_host/pepper/pepper_truetype_font_list_host.h"
14 #include "content/browser/renderer_host/pepper/pepper_udp_socket_private_message _filter.h" 15 #include "content/browser/renderer_host/pepper/pepper_udp_socket_private_message _filter.h"
15 #include "ppapi/host/message_filter_host.h" 16 #include "ppapi/host/message_filter_host.h"
16 #include "ppapi/host/ppapi_host.h" 17 #include "ppapi/host/ppapi_host.h"
17 #include "ppapi/host/resource_host.h" 18 #include "ppapi/host/resource_host.h"
18 #include "ppapi/proxy/ppapi_messages.h" 19 #include "ppapi/proxy/ppapi_messages.h"
19 #include "ppapi/shared_impl/ppapi_permissions.h" 20 #include "ppapi/shared_impl/ppapi_permissions.h"
20 21
21 using ppapi::host::MessageFilterHost; 22 using ppapi::host::MessageFilterHost;
22 using ppapi::host::ResourceHost; 23 using ppapi::host::ResourceHost;
23 using ppapi::host::ResourceMessageFilter; 24 using ppapi::host::ResourceMessageFilter;
(...skipping 29 matching lines...) Expand all
53 // Dev interfaces. 54 // Dev interfaces.
54 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) { 55 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) {
55 switch (message.type()) { 56 switch (message.type()) {
56 case PpapiHostMsg_Printing_Create::ID: { 57 case PpapiHostMsg_Printing_Create::ID: {
57 scoped_ptr<PepperPrintSettingsManager> manager( 58 scoped_ptr<PepperPrintSettingsManager> manager(
58 new PepperPrintSettingsManagerImpl()); 59 new PepperPrintSettingsManagerImpl());
59 return scoped_ptr<ResourceHost>(new PepperPrintingHost( 60 return scoped_ptr<ResourceHost>(new PepperPrintingHost(
60 host_->GetPpapiHost(), instance, 61 host_->GetPpapiHost(), instance,
61 params.pp_resource(), manager.Pass())); 62 params.pp_resource(), manager.Pass()));
62 } 63 }
64 case PpapiHostMsg_TrueTypeFontSingleton_Create::ID: {
65 return scoped_ptr<ResourceHost>(new PepperTrueTypeFontListHost(
66 host_, instance, params.pp_resource()));
67 }
63 } 68 }
64 } 69 }
65 70
66 // Private interfaces. 71 // Private interfaces.
67 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { 72 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
68 switch (message.type()) { 73 switch (message.type()) {
69 case PpapiHostMsg_BrowserFontSingleton_Create::ID: 74 case PpapiHostMsg_BrowserFontSingleton_Create::ID:
70 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost( 75 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost(
71 host_, instance, params.pp_resource())); 76 host_, instance, params.pp_resource()));
72 } 77 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 111
107 return scoped_ptr<ResourceHost>(); 112 return scoped_ptr<ResourceHost>();
108 } 113 }
109 114
110 const ppapi::PpapiPermissions& 115 const ppapi::PpapiPermissions&
111 ContentBrowserPepperHostFactory::GetPermissions() const { 116 ContentBrowserPepperHostFactory::GetPermissions() const {
112 return host_->GetPpapiHost()->permissions(); 117 return host_->GetPpapiHost()->permissions();
113 } 118 }
114 119
115 } // namespace content 120 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_truetype_font_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698