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

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

Issue 10826026: Add a printing resource (as a new style resource) to fetch the default print settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "content/renderer/render_view_impl.h" 10 #include "content/renderer/render_view_impl.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 "ipc/ipc_message.h" 13 #include "ipc/ipc_message.h"
14 #include "ipc/ipc_message_macros.h" 14 #include "ipc/ipc_message_macros.h"
15 #include "ppapi/host/ppapi_host.h" 15 #include "ppapi/host/ppapi_host.h"
16 #include "ppapi/proxy/file_chooser_resource.h" 16 #include "ppapi/proxy/file_chooser_resource.h"
17 #include "ppapi/proxy/ppapi_messages.h" 17 #include "ppapi/proxy/ppapi_messages.h"
18 #include "ppapi/proxy/printing_resource.h"
18 #include "ppapi/shared_impl/ppapi_globals.h" 19 #include "ppapi/shared_impl/ppapi_globals.h"
19 #include "ppapi/shared_impl/ppapi_permissions.h" 20 #include "ppapi/shared_impl/ppapi_permissions.h"
20 #include "ppapi/shared_impl/resource_tracker.h" 21 #include "ppapi/shared_impl/resource_tracker.h"
21 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 22 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
22 23
23 // Note that the code in the creation functions in this file should generally 24 // Note that the code in the creation functions in this file should generally
24 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See 25 // be the same as that in ppapi/proxy/resource_creation_proxy.cc. See
25 // pepper_in_process_resource_creation.h for what this file is for. 26 // pepper_in_process_resource_creation.h for what this file is for.
26 27
27 namespace content { 28 namespace content {
(...skipping 12 matching lines...) Expand all
40 41
41 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( 42 PP_Resource PepperInProcessResourceCreation::CreateFileChooser(
42 PP_Instance instance, 43 PP_Instance instance,
43 PP_FileChooserMode_Dev mode, 44 PP_FileChooserMode_Dev mode,
44 const char* accept_types) { 45 const char* accept_types) {
45 return (new ppapi::proxy::FileChooserResource( 46 return (new ppapi::proxy::FileChooserResource(
46 host_impl_->in_process_router()->GetPluginConnection(), 47 host_impl_->in_process_router()->GetPluginConnection(),
47 instance, mode, accept_types))->GetReference(); 48 instance, mode, accept_types))->GetReference();
48 } 49 }
49 50
51 PP_Resource PepperInProcessResourceCreation::CreatePrinting(
52 PP_Instance instance) {
53 return (new ppapi::proxy::PrintingResource(
54 host_impl_->in_process_router()->GetPluginConnection(),
55 instance))->GetReference();
56 }
57
50 } // namespace content 58 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_in_process_resource_creation.h ('k') | ppapi/api/dev/ppb_printing_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698