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

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

Issue 11053003: Migrate Graphics2D to new design. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: temp dependencies Created 8 years, 1 month 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/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/graphics_2d_resource.h"
17 #include "ppapi/proxy/ppapi_messages.h" 18 #include "ppapi/proxy/ppapi_messages.h"
18 #include "ppapi/proxy/printing_resource.h" 19 #include "ppapi/proxy/printing_resource.h"
19 #include "ppapi/proxy/url_request_info_resource.h" 20 #include "ppapi/proxy/url_request_info_resource.h"
20 #include "ppapi/proxy/websocket_resource.h" 21 #include "ppapi/proxy/websocket_resource.h"
21 #include "ppapi/shared_impl/ppapi_globals.h" 22 #include "ppapi/shared_impl/ppapi_globals.h"
22 #include "ppapi/shared_impl/ppapi_permissions.h" 23 #include "ppapi/shared_impl/ppapi_permissions.h"
23 #include "ppapi/shared_impl/resource_tracker.h" 24 #include "ppapi/shared_impl/resource_tracker.h"
24 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 25 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
25 26
26 // Note that the code in the creation functions in this file should generally 27 // Note that the code in the creation functions in this file should generally
(...skipping 16 matching lines...) Expand all
43 44
44 PP_Resource PepperInProcessResourceCreation::CreateFileChooser( 45 PP_Resource PepperInProcessResourceCreation::CreateFileChooser(
45 PP_Instance instance, 46 PP_Instance instance,
46 PP_FileChooserMode_Dev mode, 47 PP_FileChooserMode_Dev mode,
47 const char* accept_types) { 48 const char* accept_types) {
48 return (new ppapi::proxy::FileChooserResource( 49 return (new ppapi::proxy::FileChooserResource(
49 host_impl_->in_process_router()->GetPluginConnection(), 50 host_impl_->in_process_router()->GetPluginConnection(),
50 instance, mode, accept_types))->GetReference(); 51 instance, mode, accept_types))->GetReference();
51 } 52 }
52 53
54 PP_Resource PepperInProcessResourceCreation::CreateGraphics2D(
55 PP_Instance instance,
56 const PP_Size& size,
57 PP_Bool is_always_opaque) {
58 return (new ppapi::proxy::Graphics2DResource(
59 host_impl_->in_process_router()->GetPluginConnection(),
60 instance, size, is_always_opaque))->GetReference();
61 }
62
53 PP_Resource PepperInProcessResourceCreation::CreatePrinting( 63 PP_Resource PepperInProcessResourceCreation::CreatePrinting(
54 PP_Instance instance) { 64 PP_Instance instance) {
55 return (new ppapi::proxy::PrintingResource( 65 return (new ppapi::proxy::PrintingResource(
56 host_impl_->in_process_router()->GetPluginConnection(), 66 host_impl_->in_process_router()->GetPluginConnection(),
57 instance))->GetReference(); 67 instance))->GetReference();
58 } 68 }
59 69
60 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo( 70 PP_Resource PepperInProcessResourceCreation::CreateURLRequestInfo(
61 PP_Instance instance, 71 PP_Instance instance,
62 const ::ppapi::URLRequestInfoData& data) { 72 const ::ppapi::URLRequestInfoData& data) {
63 return (new ppapi::proxy::URLRequestInfoResource( 73 return (new ppapi::proxy::URLRequestInfoResource(
64 host_impl_->in_process_router()->GetPluginConnection(), 74 host_impl_->in_process_router()->GetPluginConnection(),
65 instance, data))->GetReference(); 75 instance, data))->GetReference();
66 } 76 }
67 77
68 PP_Resource PepperInProcessResourceCreation::CreateWebSocket( 78 PP_Resource PepperInProcessResourceCreation::CreateWebSocket(
69 PP_Instance instance) { 79 PP_Instance instance) {
70 return (new ppapi::proxy::WebSocketResource( 80 return (new ppapi::proxy::WebSocketResource(
71 host_impl_->in_process_router()->GetPluginConnection(), 81 host_impl_->in_process_router()->GetPluginConnection(),
72 instance))->GetReference(); 82 instance))->GetReference();
73 } 83 }
74 84
75 } // namespace content 85 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698