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

Unified Diff: content/renderer/pepper/pepper_file_system_host.cc

Issue 48743008: Pepper: specify the security origin when enumerating media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_file_system_host.cc
diff --git a/content/renderer/pepper/pepper_file_system_host.cc b/content/renderer/pepper/pepper_file_system_host.cc
index 1944ee3662c747f28e3ce70a306ae10b5e2b1a5c..17869d4a193ea9b698ccc9ed2d53d04ab0f76cda 100644
--- a/content/renderer/pepper/pepper_file_system_host.cc
+++ b/content/renderer/pepper/pepper_file_system_host.cc
@@ -17,9 +17,7 @@
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/file_type_conversion.h"
#include "third_party/WebKit/public/web/WebDocument.h"
-#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
-#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "webkit/common/fileapi/file_system_util.h"
@@ -131,17 +129,15 @@ int32_t PepperFileSystemHost::OnHostMsgOpen(
return PP_ERROR_FAILED;
}
- PepperPluginInstance* plugin_instance =
- renderer_ppapi_host_->GetPluginInstance(pp_instance());
- if (!plugin_instance)
+ GURL document_url = renderer_ppapi_host_->GetDocumentURL(pp_instance());
+ if (!document_url.is_valid())
return PP_ERROR_FAILED;
FileSystemDispatcher* file_system_dispatcher =
ChildThread::current()->file_system_dispatcher();
reply_context_ = context->MakeReplyMessageContext();
file_system_dispatcher->OpenFileSystem(
- GURL(plugin_instance->GetContainer()->element().document().url()).
- GetOrigin(),
+ document_url.GetOrigin(),
file_system_type,
base::Bind(&PepperFileSystemHost::DidOpenFileSystem,
weak_factory_.GetWeakPtr()),

Powered by Google App Engine
This is Rietveld 408576698