Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/browser/renderer_host/pepper/content_browser_pepper_host_facto ry.h" | 5 #include "content/browser/renderer_host/pepper/content_browser_pepper_host_facto ry.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" | 7 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h" |
| 8 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" | 8 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h" |
| 9 #include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h" | |
| 10 #include "content/browser/renderer_host/pepper/pepper_printing_host.h" | |
| 9 #include "ppapi/host/resource_host.h" | 11 #include "ppapi/host/resource_host.h" |
| 10 #include "ppapi/proxy/ppapi_messages.h" | 12 #include "ppapi/proxy/ppapi_messages.h" |
| 11 | 13 |
| 12 using ppapi::host::ResourceHost; | 14 using ppapi::host::ResourceHost; |
| 13 | 15 |
| 14 namespace content { | 16 namespace content { |
| 15 | 17 |
| 16 ContentBrowserPepperHostFactory::ContentBrowserPepperHostFactory( | 18 ContentBrowserPepperHostFactory::ContentBrowserPepperHostFactory( |
| 17 BrowserPpapiHostImpl* host) | 19 BrowserPpapiHostImpl* host) |
| 18 : host_(host) { | 20 : host_(host) { |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 30 | 32 |
| 31 // Make sure the plugin is giving us a valid instance for this resource. | 33 // Make sure the plugin is giving us a valid instance for this resource. |
| 32 if (!host_->IsValidInstance(instance)) | 34 if (!host_->IsValidInstance(instance)) |
| 33 return scoped_ptr<ResourceHost>(); | 35 return scoped_ptr<ResourceHost>(); |
| 34 | 36 |
| 35 // Public interfaces with no permissions required. | 37 // Public interfaces with no permissions required. |
| 36 switch (message.type()) { | 38 switch (message.type()) { |
| 37 case PpapiHostMsg_Gamepad_Create::ID: | 39 case PpapiHostMsg_Gamepad_Create::ID: |
| 38 return scoped_ptr<ResourceHost>(new PepperGamepadHost( | 40 return scoped_ptr<ResourceHost>(new PepperGamepadHost( |
| 39 host_, instance, params.pp_resource())); | 41 host_, instance, params.pp_resource())); |
| 42 case PpapiHostMsg_Printing_Create::ID: | |
| 43 scoped_ptr<PepperPrintSettingsManager> manager( | |
|
brettw
2012/09/18 21:41:38
Since you have a local var, I think you need a {}
raymes
2012/09/18 23:43:57
Done.
| |
| 44 new PepperPrintSettingsManagerImpl()); | |
| 45 return scoped_ptr<ResourceHost>(new PepperPrintingHost( | |
| 46 host_->GetPpapiHost(), instance, | |
| 47 params.pp_resource(), manager.Pass())); | |
| 40 } | 48 } |
| 41 return scoped_ptr<ResourceHost>(); | 49 return scoped_ptr<ResourceHost>(); |
| 42 } | 50 } |
| 43 | 51 |
| 44 } // namespace content | 52 } // namespace content |
| OLD | NEW |