Chromium Code Reviews| Index: content/renderer/pepper/content_renderer_pepper_host_factory.cc |
| diff --git a/content/renderer/pepper/content_renderer_pepper_host_factory.cc b/content/renderer/pepper/content_renderer_pepper_host_factory.cc |
| index 538fd9b285cb592f18739d7da3728c26b865ed35..ea93073a19440d8709759d121cc7517091707070 100644 |
| --- a/content/renderer/pepper/content_renderer_pepper_host_factory.cc |
| +++ b/content/renderer/pepper/content_renderer_pepper_host_factory.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/logging.h" |
| #include "content/renderer/pepper/pepper_file_chooser_host.h" |
| +#include "content/renderer/pepper/pepper_graphics_2d_host.h" |
| #include "content/renderer/pepper/renderer_ppapi_host_impl.h" |
| #include "ppapi/host/resource_host.h" |
| #include "ppapi/proxy/ppapi_messages.h" |
| @@ -45,6 +46,16 @@ scoped_ptr<ResourceHost> ContentRendererPepperHostFactory::CreateResourceHost( |
| case PpapiHostMsg_FileChooser_Create::ID: |
| return scoped_ptr<ResourceHost>(new PepperFileChooserHost( |
| host_, instance, params.pp_resource())); |
| + case PpapiHostMsg_Graphics2D_Create::ID: |
|
brettw
2012/10/02 21:18:57
You'll need {} around the contents of this or else
victorhsieh
2012/10/02 22:15:03
Done.
|
| + PpapiHostMsg_Graphics2D_Create::Schema::Param msg_params; |
| + if (!PpapiHostMsg_Graphics2D_Create::Read(&message, &msg_params)) { |
| + LOG(ERROR) << "Failed to parse message"; |
|
brettw
2012/10/02 21:18:57
I'd use NOTREACHED() instead here.
victorhsieh
2012/10/02 22:15:03
Done.
|
| + return scoped_ptr<ResourceHost>(); |
| + } |
| + return scoped_ptr<ResourceHost>( |
| + PepperGraphics2DHost::Create(host_, instance, params.pp_resource(), |
| + msg_params.a /* PP_Size */, |
| + msg_params.b /* PP_Bool */)); |
| } |
| } |
| return scoped_ptr<ResourceHost>(); |