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

Unified Diff: content/browser/renderer_host/pepper/pepper_message_filter.cc

Issue 10831045: Add PP_FlashLSORestrictions to the list of settings supported by the Flash_GetSetting Pepper API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: brett Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_message_filter.h ('k') | content/common/pepper_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/pepper/pepper_message_filter.cc
diff --git a/content/browser/renderer_host/pepper/pepper_message_filter.cc b/content/browser/renderer_host/pepper/pepper_message_filter.cc
index 924176379ca38cfb751c9042ecd9c094fd42309c..bced66ba56a0de7646b90d7616328aa5ec06e45a 100644
--- a/content/browser/renderer_host/pepper/pepper_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_message_filter.cc
@@ -182,6 +182,8 @@ if (process_type_ == PLUGIN) {
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlash_UpdateActivity, OnUpdateActivity)
IPC_MESSAGE_HANDLER(PepperMsg_GetDeviceID, OnGetDeviceID)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFlashDeviceID_Get, OnGetDeviceIDAsync)
+ IPC_MESSAGE_HANDLER(PepperMsg_GetLocalDataRestrictions,
+ OnGetLocalDataRestrictions)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -714,6 +716,26 @@ void PepperMessageFilter::OnGetDeviceIDAsync(int32_t routing_id,
result));
}
+void PepperMessageFilter::OnGetLocalDataRestrictions(
+ const GURL& document_url,
+ const GURL& plugin_url,
+ PP_FlashLSORestrictions* restrictions) {
+ content::ContentBrowserClient* client =
+ content::GetContentClient()->browser();
+ if (!client->AllowPluginLocalDataAccess(document_url, plugin_url,
+ resource_context_)) {
+ *restrictions = PP_FLASHLSORESTRICTIONS_BLOCK;
+ return;
+ }
+
+ if (client->AllowPluginLocalDataSessionOnly(plugin_url, resource_context_)) {
+ *restrictions = PP_FLASHLSORESTRICTIONS_IN_MEMORY;
+ return;
+ }
+
+ *restrictions = PP_FLASHLSORESTRICTIONS_NONE;
+}
+
void PepperMessageFilter::GetFontFamiliesComplete(
IPC::Message* reply_msg,
scoped_ptr<base::ListValue> result) {
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_message_filter.h ('k') | content/common/pepper_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698