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

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

Issue 11016007: Implement host side of sync EnumerateVideoCaptureDevices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months 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
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/pepper/pepper_flash_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/content_renderer_pepper_host_factory.h" 5 #include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/renderer/pepper/pepper_file_chooser_host.h" 8 #include "content/renderer/pepper/pepper_file_chooser_host.h"
9 #include "content/renderer/pepper/pepper_flash_host.h"
9 #include "content/renderer/pepper/pepper_websocket_host.h" 10 #include "content/renderer/pepper/pepper_websocket_host.h"
10 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 11 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
11 #include "ppapi/host/resource_host.h" 12 #include "ppapi/host/resource_host.h"
12 #include "ppapi/proxy/ppapi_messages.h" 13 #include "ppapi/proxy/ppapi_messages.h"
13 14
14 using ppapi::host::ResourceHost; 15 using ppapi::host::ResourceHost;
15 16
16 namespace content { 17 namespace content {
17 18
18 ContentRendererPepperHostFactory::ContentRendererPepperHostFactory( 19 ContentRendererPepperHostFactory::ContentRendererPepperHostFactory(
(...skipping 29 matching lines...) Expand all
48 // TODO(brettw) put back this dev check! This was removed to fix issue 138902 49 // TODO(brettw) put back this dev check! This was removed to fix issue 138902
49 // where the permissions for bundled Flash (but not Flash that you specify 50 // where the permissions for bundled Flash (but not Flash that you specify
50 // on the command line, making it difficult to test) are incorrect. 51 // on the command line, making it difficult to test) are incorrect.
51 /*if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV))*/ { 52 /*if (GetPermissions().HasPermission(ppapi::PERMISSION_DEV))*/ {
52 switch (message.type()) { 53 switch (message.type()) {
53 case PpapiHostMsg_FileChooser_Create::ID: 54 case PpapiHostMsg_FileChooser_Create::ID:
54 return scoped_ptr<ResourceHost>(new PepperFileChooserHost( 55 return scoped_ptr<ResourceHost>(new PepperFileChooserHost(
55 host_, instance, params.pp_resource())); 56 host_, instance, params.pp_resource()));
56 } 57 }
57 } 58 }
59
60 // Resources for Flash interfaces.
61 if (GetPermissions().HasPermission(ppapi::PERMISSION_FLASH)) {
62 switch (message.type()) {
63 case PpapiHostMsg_Flash_Create::ID:
64 return scoped_ptr<ResourceHost>(new PepperFlashHost(
65 host_, instance, params.pp_resource()));
66 }
67 }
68
58 return scoped_ptr<ResourceHost>(); 69 return scoped_ptr<ResourceHost>();
59 } 70 }
60 71
61 const ppapi::PpapiPermissions& 72 const ppapi::PpapiPermissions&
62 ContentRendererPepperHostFactory::GetPermissions() const { 73 ContentRendererPepperHostFactory::GetPermissions() const {
63 return host_->GetPpapiHost()->permissions(); 74 return host_->GetPpapiHost()->permissions();
64 } 75 }
65 76
66 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/pepper/pepper_flash_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698