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

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

Issue 11578038: Convert pepper font list to new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.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_flash_browser_host.h" 9 #include "content/browser/renderer_host/pepper/pepper_flash_browser_host.h"
9 #include "content/browser/renderer_host/pepper/pepper_flash_file_host.h" 10 #include "content/browser/renderer_host/pepper/pepper_flash_file_host.h"
10 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" 11 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h"
11 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" 12 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
12 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" 13 #include "content/browser/renderer_host/pepper/pepper_printing_host.h"
13 #include "ppapi/host/resource_host.h" 14 #include "ppapi/host/resource_host.h"
14 #include "ppapi/proxy/ppapi_messages.h" 15 #include "ppapi/proxy/ppapi_messages.h"
15 #include "ppapi/shared_impl/ppapi_permissions.h" 16 #include "ppapi/shared_impl/ppapi_permissions.h"
16 17
17 using ppapi::host::ResourceHost; 18 using ppapi::host::ResourceHost;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 case PpapiHostMsg_Printing_Create::ID: { 51 case PpapiHostMsg_Printing_Create::ID: {
51 scoped_ptr<PepperPrintSettingsManager> manager( 52 scoped_ptr<PepperPrintSettingsManager> manager(
52 new PepperPrintSettingsManagerImpl()); 53 new PepperPrintSettingsManagerImpl());
53 return scoped_ptr<ResourceHost>(new PepperPrintingHost( 54 return scoped_ptr<ResourceHost>(new PepperPrintingHost(
54 host_->GetPpapiHost(), instance, 55 host_->GetPpapiHost(), instance,
55 params.pp_resource(), manager.Pass())); 56 params.pp_resource(), manager.Pass()));
56 } 57 }
57 } 58 }
58 } 59 }
59 60
61 // Private interfaces.
62 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
63 switch (message.type()) {
64 case PpapiHostMsg_BrowserFontSingleton_Create::ID:
65 return scoped_ptr<ResourceHost>(new PepperBrowserFontSingletonHost(
66 host_, instance, params.pp_resource()));
67 }
68 }
69
60 // Flash interfaces. 70 // Flash interfaces.
61 if (GetPermissions().HasPermission(ppapi::PERMISSION_FLASH)) { 71 if (GetPermissions().HasPermission(ppapi::PERMISSION_FLASH)) {
62 switch (message.type()) { 72 switch (message.type()) {
63 case PpapiHostMsg_Flash_Create::ID: 73 case PpapiHostMsg_Flash_Create::ID:
64 return scoped_ptr<ResourceHost>(new PepperFlashBrowserHost( 74 return scoped_ptr<ResourceHost>(new PepperFlashBrowserHost(
65 host_, instance, params.pp_resource())); 75 host_, instance, params.pp_resource()));
66 case PpapiHostMsg_FlashFile_Create::ID: 76 case PpapiHostMsg_FlashFile_Create::ID:
67 return scoped_ptr<ResourceHost>(new PepperFlashFileHost( 77 return scoped_ptr<ResourceHost>(new PepperFlashFileHost(
68 host_, instance, params.pp_resource())); 78 host_, instance, params.pp_resource()));
69 } 79 }
70 } 80 }
71 81
72 return scoped_ptr<ResourceHost>(); 82 return scoped_ptr<ResourceHost>();
73 } 83 }
74 84
75 const ppapi::PpapiPermissions& 85 const ppapi::PpapiPermissions&
76 ContentBrowserPepperHostFactory::GetPermissions() const { 86 ContentBrowserPepperHostFactory::GetPermissions() const {
77 return host_->GetPpapiHost()->permissions(); 87 return host_->GetPpapiHost()->permissions();
78 } 88 }
79 89
80 } // namespace content 90 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698