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 17962002: Merge 208513 "PPAPI: Move PPB_NetworkProxy out of Dev" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1547/src/
Patch Set: Created 7 years, 5 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 | native_client_sdk/src/build_tools/sdk_files.list » ('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_file_ref_host.h" 9 #include "content/browser/renderer_host/pepper/pepper_file_ref_host.h"
10 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h " 10 #include "content/browser/renderer_host/pepper/pepper_file_system_browser_host.h "
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 NOTREACHED(); 57 NOTREACHED();
58 return scoped_ptr<ResourceHost>(); 58 return scoped_ptr<ResourceHost>();
59 } 59 }
60 return scoped_ptr<ResourceHost>(new PepperFileSystemBrowserHost( 60 return scoped_ptr<ResourceHost>(new PepperFileSystemBrowserHost(
61 host_, instance, params.pp_resource(), file_system_type)); 61 host_, instance, params.pp_resource(), file_system_type));
62 } 62 }
63 case PpapiHostMsg_Gamepad_Create::ID: { 63 case PpapiHostMsg_Gamepad_Create::ID: {
64 return scoped_ptr<ResourceHost>(new PepperGamepadHost( 64 return scoped_ptr<ResourceHost>(new PepperGamepadHost(
65 host_, instance, params.pp_resource())); 65 host_, instance, params.pp_resource()));
66 } 66 }
67 case PpapiHostMsg_NetworkProxy_Create::ID: {
68 return scoped_ptr<ResourceHost>(new PepperNetworkProxyHost(
69 host_, instance, params.pp_resource()));
70 }
67 case PpapiHostMsg_HostResolver_Create::ID: { 71 case PpapiHostMsg_HostResolver_Create::ID: {
68 scoped_refptr<ResourceMessageFilter> host_resolver( 72 scoped_refptr<ResourceMessageFilter> host_resolver(
69 new PepperHostResolverMessageFilter(host_, instance, false)); 73 new PepperHostResolverMessageFilter(host_, instance, false));
70 return scoped_ptr<ResourceHost>(new MessageFilterHost( 74 return scoped_ptr<ResourceHost>(new MessageFilterHost(
71 host_->GetPpapiHost(), instance, params.pp_resource(), 75 host_->GetPpapiHost(), instance, params.pp_resource(),
72 host_resolver)); 76 host_resolver));
73 } 77 }
74 case PpapiHostMsg_FileRef_CreateInternal::ID: { 78 case PpapiHostMsg_FileRef_CreateInternal::ID: {
75 PP_Resource file_system; 79 PP_Resource file_system;
76 std::string internal_path; 80 std::string internal_path;
77 if (!UnpackMessage<PpapiHostMsg_FileRef_CreateInternal>( 81 if (!UnpackMessage<PpapiHostMsg_FileRef_CreateInternal>(
78 message, &file_system, &internal_path)) { 82 message, &file_system, &internal_path)) {
79 NOTREACHED(); 83 NOTREACHED();
80 return scoped_ptr<ResourceHost>(); 84 return scoped_ptr<ResourceHost>();
81 } 85 }
82 return scoped_ptr<ResourceHost>(new PepperFileRefHost( 86 return scoped_ptr<ResourceHost>(new PepperFileRefHost(
83 host_, instance, params.pp_resource(), file_system, internal_path)); 87 host_, instance, params.pp_resource(), file_system, internal_path));
84 } 88 }
85 case PpapiHostMsg_UDPSocket_Create::ID: { 89 case PpapiHostMsg_UDPSocket_Create::ID: {
86 scoped_refptr<ResourceMessageFilter> udp_socket( 90 scoped_refptr<ResourceMessageFilter> udp_socket(
87 new PepperUDPSocketMessageFilter(host_, instance, false)); 91 new PepperUDPSocketMessageFilter(host_, instance, false));
88 return scoped_ptr<ResourceHost>(new MessageFilterHost( 92 return scoped_ptr<ResourceHost>(new MessageFilterHost(
89 host_->GetPpapiHost(), instance, params.pp_resource(), udp_socket)); 93 host_->GetPpapiHost(), instance, params.pp_resource(), udp_socket));
90 } 94 }
91 } 95 }
92 96
93 // Dev interfaces. 97 // Dev interfaces.
94 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) { 98 if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV)) {
95 switch (message.type()) { 99 switch (message.type()) {
96 case PpapiHostMsg_NetworkProxy_Create::ID: {
97 return scoped_ptr<ResourceHost>(new PepperNetworkProxyHost(
98 host_, instance, params.pp_resource()));
99 }
100 case PpapiHostMsg_Printing_Create::ID: { 100 case PpapiHostMsg_Printing_Create::ID: {
101 scoped_ptr<PepperPrintSettingsManager> manager( 101 scoped_ptr<PepperPrintSettingsManager> manager(
102 new PepperPrintSettingsManagerImpl()); 102 new PepperPrintSettingsManagerImpl());
103 return scoped_ptr<ResourceHost>(new PepperPrintingHost( 103 return scoped_ptr<ResourceHost>(new PepperPrintingHost(
104 host_->GetPpapiHost(), instance, 104 host_->GetPpapiHost(), instance,
105 params.pp_resource(), manager.Pass())); 105 params.pp_resource(), manager.Pass()));
106 } 106 }
107 case PpapiHostMsg_TrueTypeFontSingleton_Create::ID: { 107 case PpapiHostMsg_TrueTypeFontSingleton_Create::ID: {
108 return scoped_ptr<ResourceHost>(new PepperTrueTypeFontListHost( 108 return scoped_ptr<ResourceHost>(new PepperTrueTypeFontListHost(
109 host_, instance, params.pp_resource())); 109 host_, instance, params.pp_resource()));
110 } 110 }
111 } 111 }
112 } 112 }
113 113
114 // Private interfaces. 114 // Private interfaces.
115 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { 115 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 return scoped_ptr<ResourceHost>(); 155 return scoped_ptr<ResourceHost>();
156 } 156 }
157 157
158 const ppapi::PpapiPermissions& 158 const ppapi::PpapiPermissions&
159 ContentBrowserPepperHostFactory::GetPermissions() const { 159 ContentBrowserPepperHostFactory::GetPermissions() const {
160 return host_->GetPpapiHost()->permissions(); 160 return host_->GetPpapiHost()->permissions();
161 } 161 }
162 162
163 } // namespace content 163 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/sdk_files.list » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698