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/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 #include "content/public/renderer/content_renderer_client.h" | 10 #include "content/public/renderer/content_renderer_client.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 using ppapi::host::ResourceHost; | 33 using ppapi::host::ResourceHost; |
34 using ppapi::proxy::SerializedTrueTypeFontDesc; | 34 using ppapi::proxy::SerializedTrueTypeFontDesc; |
35 using ppapi::UnpackMessage; | 35 using ppapi::UnpackMessage; |
36 | 36 |
37 namespace content { | 37 namespace content { |
38 namespace { | 38 namespace { |
39 | 39 |
40 bool CanUseMediaStreamAPI(const RendererPpapiHost* host, | 40 bool CanUseMediaStreamAPI(const RendererPpapiHost* host, |
41 PP_Instance instance) { | 41 PP_Instance instance) { |
42 WebKit::WebPluginContainer* container = | 42 blink::WebPluginContainer* container = |
43 host->GetContainerForInstance(instance); | 43 host->GetContainerForInstance(instance); |
44 if (!container) | 44 if (!container) |
45 return false; | 45 return false; |
46 | 46 |
47 GURL document_url = container->element().document().url(); | 47 GURL document_url = container->element().document().url(); |
48 ContentRendererClient* content_renderer_client = | 48 ContentRendererClient* content_renderer_client = |
49 GetContentClient()->renderer(); | 49 GetContentClient()->renderer(); |
50 return content_renderer_client->AllowPepperMediaStreamAPI(document_url); | 50 return content_renderer_client->AllowPepperMediaStreamAPI(document_url); |
51 } | 51 } |
52 | 52 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 return scoped_ptr<ResourceHost>(); | 170 return scoped_ptr<ResourceHost>(); |
171 } | 171 } |
172 | 172 |
173 const ppapi::PpapiPermissions& | 173 const ppapi::PpapiPermissions& |
174 ContentRendererPepperHostFactory::GetPermissions() const { | 174 ContentRendererPepperHostFactory::GetPermissions() const { |
175 return host_->GetPpapiHost()->permissions(); | 175 return host_->GetPpapiHost()->permissions(); |
176 } | 176 } |
177 | 177 |
178 } // namespace content | 178 } // namespace content |
OLD | NEW |