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

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

Issue 505243003: pdf: Move PepperPDFHost into the pdf component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf-component
Patch Set: tot-merge 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
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_pdf_host.h"
14 #include "chrome/renderer/pepper/pepper_uma_host.h" 13 #include "chrome/renderer/pepper/pepper_uma_host.h"
14 #include "components/pdf/renderer/pepper_pdf_host.h"
15 #include "content/public/renderer/renderer_ppapi_host.h" 15 #include "content/public/renderer/renderer_ppapi_host.h"
16 #include "ppapi/host/ppapi_host.h" 16 #include "ppapi/host/ppapi_host.h"
17 #include "ppapi/host/resource_host.h" 17 #include "ppapi/host/resource_host.h"
18 #include "ppapi/proxy/ppapi_message_utils.h"
18 #include "ppapi/proxy/ppapi_messages.h" 19 #include "ppapi/proxy/ppapi_messages.h"
19 #include "ppapi/proxy/ppapi_message_utils.h"
20 #include "ppapi/shared_impl/ppapi_permissions.h" 20 #include "ppapi/shared_impl/ppapi_permissions.h"
21 21
22 using ppapi::host::ResourceHost; 22 using ppapi::host::ResourceHost;
23 23
24 ChromeRendererPepperHostFactory::ChromeRendererPepperHostFactory( 24 ChromeRendererPepperHostFactory::ChromeRendererPepperHostFactory(
25 content::RendererPpapiHost* host) 25 content::RendererPpapiHost* host)
26 : host_(host) {} 26 : host_(host) {}
27 27
28 ChromeRendererPepperHostFactory::~ChromeRendererPepperHostFactory() {} 28 ChromeRendererPepperHostFactory::~ChromeRendererPepperHostFactory() {}
29 29
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return scoped_ptr<ResourceHost>(new PepperFlashDRMRendererHost( 83 return scoped_ptr<ResourceHost>(new PepperFlashDRMRendererHost(
84 host_, instance, params.pp_resource())); 84 host_, instance, params.pp_resource()));
85 } 85 }
86 } 86 }
87 87
88 if (host_->GetPpapiHost()->permissions().HasPermission( 88 if (host_->GetPpapiHost()->permissions().HasPermission(
89 ppapi::PERMISSION_PRIVATE)) { 89 ppapi::PERMISSION_PRIVATE)) {
90 switch (message.type()) { 90 switch (message.type()) {
91 case PpapiHostMsg_PDF_Create::ID: { 91 case PpapiHostMsg_PDF_Create::ID: {
92 return scoped_ptr<ResourceHost>( 92 return scoped_ptr<ResourceHost>(
93 new PepperPDFHost(host_, instance, params.pp_resource())); 93 new pdf::PepperPDFHost(host_, instance, params.pp_resource()));
94 } 94 }
95 } 95 }
96 } 96 }
97 97
98 // Permissions for the following interfaces will be checked at the 98 // Permissions for the following interfaces will be checked at the
99 // time of the corresponding instance's method calls. Currently these 99 // time of the corresponding instance's method calls. Currently these
100 // interfaces are available only for whitelisted apps which may not have 100 // interfaces are available only for whitelisted apps which may not have
101 // access to the other private interfaces. 101 // access to the other private interfaces.
102 switch (message.type()) { 102 switch (message.type()) {
103 case PpapiHostMsg_UMA_Create::ID: { 103 case PpapiHostMsg_UMA_Create::ID: {
104 return scoped_ptr<ResourceHost>( 104 return scoped_ptr<ResourceHost>(
105 new PepperUMAHost(host_, instance, params.pp_resource())); 105 new PepperUMAHost(host_, instance, params.pp_resource()));
106 } 106 }
107 } 107 }
108 108
109 return scoped_ptr<ResourceHost>(); 109 return scoped_ptr<ResourceHost>();
110 } 110 }
OLDNEW
« no previous file with comments | « chrome/renderer/pepper/chrome_pdf_print_client.cc ('k') | chrome/renderer/pepper/pepper_pdf_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698