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/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 "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "content/renderer/pepper/pepper_audio_input_host.h" | 9 #include "content/renderer/pepper/pepper_audio_input_host.h" |
| 10 #include "content/renderer/pepper/pepper_file_chooser_host.h" | 10 #include "content/renderer/pepper/pepper_file_chooser_host.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 host_, instance, params.pp_resource()); | 108 host_, instance, params.pp_resource()); |
| 109 if (!host->Init()) { | 109 if (!host->Init()) { |
| 110 delete host; | 110 delete host; |
| 111 return scoped_ptr<ResourceHost>(); | 111 return scoped_ptr<ResourceHost>(); |
| 112 } | 112 } |
| 113 return scoped_ptr<ResourceHost>(host); | 113 return scoped_ptr<ResourceHost>(host); |
| 114 } | 114 } |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 #if defined(ENABLE_WEBRTC) | |
| 118 // Private interfaces. | 119 // Private interfaces. |
| 119 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { | 120 if (GetPermissions().HasPermission(ppapi::PERMISSION_PRIVATE)) { |
| 120 switch (message.type()) { | 121 switch (message.type()) { |
| 121 case PpapiHostMsg_VideoDestination_Create::ID: | 122 case PpapiHostMsg_VideoDestination_Create::ID: |
| 122 return scoped_ptr<ResourceHost>(new PepperVideoDestinationHost( | 123 return scoped_ptr<ResourceHost>(new PepperVideoDestinationHost( |
| 123 host_, instance, params.pp_resource())); | 124 host_, instance, params.pp_resource())); |
| 124 case PpapiHostMsg_VideoSource_Create::ID: | 125 case PpapiHostMsg_VideoSource_Create::ID: |
| 125 return scoped_ptr<ResourceHost>(new PepperVideoSourceHost( | 126 return scoped_ptr<ResourceHost>(new PepperVideoSourceHost( |
| 126 host_, instance, params.pp_resource())); | 127 host_, instance, params.pp_resource())); |
| 127 } | 128 } |
| 128 } | 129 } |
| 130 #endif | |
|
bbudge
2013/05/07 18:00:55
It would be better if the #if only affected the we
Ronghua Wu (Left Chromium)
2013/05/07 18:03:48
What about make that change when we actually have
| |
| 129 | 131 |
| 130 return scoped_ptr<ResourceHost>(); | 132 return scoped_ptr<ResourceHost>(); |
| 131 } | 133 } |
| 132 | 134 |
| 133 const ppapi::PpapiPermissions& | 135 const ppapi::PpapiPermissions& |
| 134 ContentRendererPepperHostFactory::GetPermissions() const { | 136 ContentRendererPepperHostFactory::GetPermissions() const { |
| 135 return host_->GetPpapiHost()->permissions(); | 137 return host_->GetPpapiHost()->permissions(); |
| 136 } | 138 } |
| 137 | 139 |
| 138 } // namespace content | 140 } // namespace content |
| OLD | NEW |