Index: content/renderer/pepper/renderer_ppapi_host_impl.cc |
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.cc b/content/renderer/pepper/renderer_ppapi_host_impl.cc |
index 32bf18f46d4756c202029adbe1d56ca29e360584..0e4274a98999ab1dcdd1e347c03deef5b57dc656 100644 |
--- a/content/renderer/pepper/renderer_ppapi_host_impl.cc |
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.cc |
@@ -11,6 +11,7 @@ |
#include "base/process/process_handle.h" |
#include "base/single_thread_task_runner.h" |
#include "base/threading/thread_task_runner_handle.h" |
+#include "content/public/common/origin_util.h" |
#include "content/renderer/pepper/fullscreen_container.h" |
#include "content/renderer/pepper/host_globals.h" |
#include "content/renderer/pepper/pepper_browser_connection.h" |
@@ -278,6 +279,14 @@ GURL RendererPpapiHostImpl::GetDocumentURL(PP_Instance pp_instance) const { |
return instance->document_url(); |
} |
+bool RendererPpapiHostImpl::IsSecureContext(PP_Instance pp_instance) const { |
+ PepperPluginInstanceImpl* instance = GetAndValidateInstance(pp_instance); |
+ if (!instance) |
+ return false; |
+ return instance->GetContainer()->GetDocument().IsSecureContext() && |
+ content::IsOriginSecure(instance->GetPluginURL()); |
+} |
+ |
PepperPluginInstanceImpl* RendererPpapiHostImpl::GetAndValidateInstance( |
PP_Instance pp_instance) const { |
PepperPluginInstanceImpl* instance = |