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

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

Issue 10544089: Implement the file chooser as a new resource "host" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 "content/renderer/pepper/content_renderer_pepper_host_factory.h" 7 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
8 #include "ipc/ipc_message.h" 8 #include "ipc/ipc_message.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 #include "ppapi/host/ppapi_host.h" 10 #include "ppapi/host/ppapi_host.h"
11 #include "ppapi/proxy/file_chooser_resource.h"
11 #include "ppapi/proxy/ppapi_messages.h" 12 #include "ppapi/proxy/ppapi_messages.h"
12 #include "ppapi/shared_impl/ppapi_globals.h" 13 #include "ppapi/shared_impl/ppapi_globals.h"
13 #include "ppapi/shared_impl/resource_tracker.h" 14 #include "ppapi/shared_impl/resource_tracker.h"
14 15
15 // Note that the code in the creation functions in this file should generall be 16 // Note that the code in the creation functions in this file should generall be
16 // the same as that in pepper/proxy/resource_creation_proxy.cc. See 17 // the same as that in pepper/proxy/resource_creation_proxy.cc. See
17 // pepper_in_process_resource_creation.h for what this file is for. 18 // pepper_in_process_resource_creation.h for what this file is for.
18 19
19 namespace content { 20 namespace content {
20 21
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 webkit::ppapi::PluginInstance* instance) 95 webkit::ppapi::PluginInstance* instance)
95 : ResourceCreationImpl(instance), 96 : ResourceCreationImpl(instance),
96 host_to_plugin_router_(new HostToPluginRouter), 97 host_to_plugin_router_(new HostToPluginRouter),
97 plugin_to_host_router_( 98 plugin_to_host_router_(
98 new PluginToHostRouter(render_view, host_to_plugin_router_.get())) { 99 new PluginToHostRouter(render_view, host_to_plugin_router_.get())) {
99 } 100 }
100 101
101 PepperInProcessResourceCreation::~PepperInProcessResourceCreation() { 102 PepperInProcessResourceCreation::~PepperInProcessResourceCreation() {
102 } 103 }
103 104
105 PP_Resource PepperInProcessResourceCreation::CreateFileChooser(
106 PP_Instance instance,
107 PP_FileChooserMode_Dev mode,
108 const char* accept_types) {
109 return (new ppapi::proxy::FileChooserResource(
110 plugin_to_host_router_.get(),
111 instance, mode, accept_types))->GetReference();
112 }
113
104 } // namespace content 114 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698