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

Side by Side Diff: chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc

Issue 11359147: Convert the Pepper Talk API to use the new resource system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 "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
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
OLDNEW
« no previous file with comments | « chrome/browser/pepper_gtalk_message_filter.cc ('k') | chrome/browser/renderer_host/pepper/pepper_talk_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698