| 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 "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 5 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 6 | 6 |
| 7 #include "chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h" | 7 #include "chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h" |
| 8 #include "chrome/browser/renderer_host/pepper/pepper_talk_host.h" |
| 8 #include "content/public/browser/browser_ppapi_host.h" | 9 #include "content/public/browser/browser_ppapi_host.h" |
| 9 #include "ppapi/host/ppapi_host.h" | 10 #include "ppapi/host/ppapi_host.h" |
| 10 #include "ppapi/host/resource_host.h" | 11 #include "ppapi/host/resource_host.h" |
| 11 #include "ppapi/proxy/ppapi_messages.h" | 12 #include "ppapi/proxy/ppapi_messages.h" |
| 12 #include "ppapi/shared_impl/ppapi_permissions.h" | 13 #include "ppapi/shared_impl/ppapi_permissions.h" |
| 13 | 14 |
| 14 using ppapi::host::ResourceHost; | 15 using ppapi::host::ResourceHost; |
| 15 | 16 |
| 16 namespace chrome { | 17 namespace chrome { |
| 17 | 18 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 34 if (!host_->IsValidInstance(instance)) | 35 if (!host_->IsValidInstance(instance)) |
| 35 return scoped_ptr<ResourceHost>(); | 36 return scoped_ptr<ResourceHost>(); |
| 36 | 37 |
| 37 // Private interfaces. | 38 // Private interfaces. |
| 38 if (host_->GetPpapiHost()->permissions().HasPermission( | 39 if (host_->GetPpapiHost()->permissions().HasPermission( |
| 39 ppapi::PERMISSION_PRIVATE)) { | 40 ppapi::PERMISSION_PRIVATE)) { |
| 40 switch (message.type()) { | 41 switch (message.type()) { |
| 41 case PpapiHostMsg_FlashDeviceID_Create::ID: | 42 case PpapiHostMsg_FlashDeviceID_Create::ID: |
| 42 return scoped_ptr<ResourceHost>(new PepperFlashDeviceIDHost( | 43 return scoped_ptr<ResourceHost>(new PepperFlashDeviceIDHost( |
| 43 host_, instance, params.pp_resource())); | 44 host_, instance, params.pp_resource())); |
| 45 case PpapiHostMsg_Talk_Create::ID: |
| 46 return scoped_ptr<ResourceHost>(new PepperTalkHost( |
| 47 host_, instance, params.pp_resource())); |
| 44 } | 48 } |
| 45 } | 49 } |
| 46 return scoped_ptr<ResourceHost>(); | 50 return scoped_ptr<ResourceHost>(); |
| 47 } | 51 } |
| 48 | 52 |
| 49 } // namespace chrome | 53 } // namespace chrome |
| OLD | NEW |