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

Side by Side Diff: chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc

Issue 375253002: [Chrome] Support NumCopies print preset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/pepper/pepper_printing_renderer_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 "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h" 5 #include "chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h" 8 #include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h"
9 #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" 9 #include "chrome/renderer/pepper/pepper_flash_font_file_host.h"
10 #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h" 10 #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h"
11 #include "chrome/renderer/pepper/pepper_flash_menu_host.h" 11 #include "chrome/renderer/pepper/pepper_flash_menu_host.h"
12 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h" 12 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h"
13 #include "chrome/renderer/pepper/pepper_printing_renderer_host.h"
13 #include "chrome/renderer/pepper/pepper_uma_host.h" 14 #include "chrome/renderer/pepper/pepper_uma_host.h"
14 #include "components/pdf/renderer/pepper_pdf_host.h" 15 #include "components/pdf/renderer/pepper_pdf_host.h"
15 #include "content/public/renderer/renderer_ppapi_host.h" 16 #include "content/public/renderer/renderer_ppapi_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_message_utils.h" 19 #include "ppapi/proxy/ppapi_message_utils.h"
19 #include "ppapi/proxy/ppapi_messages.h" 20 #include "ppapi/proxy/ppapi_messages.h"
20 #include "ppapi/shared_impl/ppapi_permissions.h" 21 #include "ppapi/shared_impl/ppapi_permissions.h"
21 22
22 using ppapi::host::ResourceHost; 23 using ppapi::host::ResourceHost;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 86 }
86 } 87 }
87 88
88 if (host_->GetPpapiHost()->permissions().HasPermission( 89 if (host_->GetPpapiHost()->permissions().HasPermission(
89 ppapi::PERMISSION_PRIVATE)) { 90 ppapi::PERMISSION_PRIVATE)) {
90 switch (message.type()) { 91 switch (message.type()) {
91 case PpapiHostMsg_PDF_Create::ID: { 92 case PpapiHostMsg_PDF_Create::ID: {
92 return scoped_ptr<ResourceHost>( 93 return scoped_ptr<ResourceHost>(
93 new pdf::PepperPDFHost(host_, instance, params.pp_resource())); 94 new pdf::PepperPDFHost(host_, instance, params.pp_resource()));
94 } 95 }
96 case PpapiHostMsg_PrintHost_Create::ID: {
97 return scoped_ptr<ResourceHost>(new PepperPrintingRendererHost(
98 host_, instance, params.pp_resource()));
99 }
95 } 100 }
96 } 101 }
97 102
98 // Permissions for the following interfaces will be checked at the 103 // Permissions for the following interfaces will be checked at the
99 // time of the corresponding instance's method calls. Currently these 104 // time of the corresponding instance's method calls. Currently these
100 // interfaces are available only for whitelisted apps which may not have 105 // interfaces are available only for whitelisted apps which may not have
101 // access to the other private interfaces. 106 // access to the other private interfaces.
102 switch (message.type()) { 107 switch (message.type()) {
103 case PpapiHostMsg_UMA_Create::ID: { 108 case PpapiHostMsg_UMA_Create::ID: {
104 return scoped_ptr<ResourceHost>( 109 return scoped_ptr<ResourceHost>(
105 new PepperUMAHost(host_, instance, params.pp_resource())); 110 new PepperUMAHost(host_, instance, params.pp_resource()));
106 } 111 }
107 } 112 }
108 113
109 return scoped_ptr<ResourceHost>(); 114 return scoped_ptr<ResourceHost>();
110 } 115 }
OLDNEW
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/pepper/pepper_printing_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698