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

Side by Side Diff: content/renderer/pepper/pepper_in_process_resource_creation.cc

Issue 14188019: CRX FileSystem Pepper private API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 "content/renderer/pepper/pepper_in_process_resource_creation.h" 5 #include "content/renderer/pepper/pepper_in_process_resource_creation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "content/renderer/pepper/pepper_in_process_router.h" 11 #include "content/renderer/pepper/pepper_in_process_router.h"
12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
13 #include "content/renderer/render_view_impl.h" 13 #include "content/renderer/render_view_impl.h"
14 #include "ipc/ipc_message.h" 14 #include "ipc/ipc_message.h"
15 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
16 #include "ppapi/host/ppapi_host.h" 16 #include "ppapi/host/ppapi_host.h"
17 #include "ppapi/proxy/browser_font_resource_trusted.h" 17 #include "ppapi/proxy/browser_font_resource_trusted.h"
18 #include "ppapi/proxy/ext_crx_file_system_private_resource.h"
18 #include "ppapi/proxy/file_chooser_resource.h" 19 #include "ppapi/proxy/file_chooser_resource.h"
19 #include "ppapi/proxy/file_io_resource.h" 20 #include "ppapi/proxy/file_io_resource.h"
20 #include "ppapi/proxy/file_system_resource.h" 21 #include "ppapi/proxy/file_system_resource.h"
21 #include "ppapi/proxy/graphics_2d_resource.h" 22 #include "ppapi/proxy/graphics_2d_resource.h"
22 #include "ppapi/proxy/ppapi_messages.h" 23 #include "ppapi/proxy/ppapi_messages.h"
23 #include "ppapi/proxy/printing_resource.h" 24 #include "ppapi/proxy/printing_resource.h"
24 #include "ppapi/proxy/url_request_info_resource.h" 25 #include "ppapi/proxy/url_request_info_resource.h"
25 #include "ppapi/proxy/url_response_info_resource.h" 26 #include "ppapi/proxy/url_response_info_resource.h"
26 #include "ppapi/proxy/websocket_resource.h" 27 #include "ppapi/proxy/websocket_resource.h"
27 #include "ppapi/shared_impl/ppapi_globals.h" 28 #include "ppapi/shared_impl/ppapi_globals.h"
(...skipping 28 matching lines...) Expand all
56 return 0; 57 return 0;
57 ppapi::Preferences prefs( 58 ppapi::Preferences prefs(
58 host_impl_->GetRenderViewForInstance(instance)->GetWebkitPreferences()); 59 host_impl_->GetRenderViewForInstance(instance)->GetWebkitPreferences());
59 return (new ppapi::proxy::BrowserFontResource_Trusted( 60 return (new ppapi::proxy::BrowserFontResource_Trusted(
60 host_impl_->in_process_router()->GetPluginConnection(), 61 host_impl_->in_process_router()->GetPluginConnection(),
61 instance, 62 instance,
62 *description, 63 *description,
63 prefs))->GetReference(); 64 prefs))->GetReference();
64 } 65 }
65 66
67 PP_Resource PepperInProcessResourceCreation::CreateExtCrxFileSystemPrivate(
68 PP_Instance instance) {
69 return (new ppapi::proxy::ExtCrxFileSystemPrivateResource(
yzshen1 2013/04/30 19:31:19 Do we need to support in-process mode?
victorhsieh 2013/04/30 22:04:32 Probably not, but why not?
yzshen1 2013/05/01 17:45:10 The goal is to get rid of in-process mode eventual
victorhsieh 2013/05/02 18:59:06 Done.
yzshen1 2013/05/02 23:22:01 Please move this to resource_creation_impl. All th
victorhsieh 2013/05/03 17:26:58 Done.
70 host_impl_->in_process_router()->GetPluginConnection(),
71 instance))->GetReference();
72 }
73
66 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( 74 PP_Resource PepperInProcessResourceCreation::CreateFileChooser(
67 PP_Instance instance, 75 PP_Instance instance,
68 PP_FileChooserMode_Dev mode, 76 PP_FileChooserMode_Dev mode,
69 const PP_Var& accept_types) { 77 const PP_Var& accept_types) {
70 scoped_refptr<ppapi::StringVar> string_var = 78 scoped_refptr<ppapi::StringVar> string_var =
71 ppapi::StringVar::FromPPVar(accept_types); 79 ppapi::StringVar::FromPPVar(accept_types);
72 std::string str = string_var ? string_var->value() : std::string(); 80 std::string str = string_var ? string_var->value() : std::string();
73 return (new ppapi::proxy::FileChooserResource( 81 return (new ppapi::proxy::FileChooserResource(
74 host_impl_->in_process_router()->GetPluginConnection(), 82 host_impl_->in_process_router()->GetPluginConnection(),
75 instance, mode, str.c_str()))->GetReference(); 83 instance, mode, str.c_str()))->GetReference();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 138 }
131 139
132 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( 140 PP_Resource PepperInProcessResourceCreation::CreateWebSocket(
133 PP_Instance instance) { 141 PP_Instance instance) {
134 return (new ppapi::proxy::WebSocketResource( 142 return (new ppapi::proxy::WebSocketResource(
135 host_impl_->in_process_router()->GetPluginConnection(), 143 host_impl_->in_process_router()->GetPluginConnection(),
136 instance))->GetReference(); 144 instance))->GetReference();
137 } 145 }
138 146
139 } // namespace content 147 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698