summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 21:50:16 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-02 21:50:16 +0000
commitea628e3833a438a6114d369209a2be3ab1436d80 (patch)
tree19fd1bdac6bb36edb1007011963114ab5aece452 /webkit
parentecf5a6df0184eb0ceb9d21000a3b20293f29f1ee (diff)
downloadchromium_src-ea628e3833a438a6114d369209a2be3ab1436d80.zip
chromium_src-ea628e3833a438a6114d369209a2be3ab1436d80.tar.gz
chromium_src-ea628e3833a438a6114d369209a2be3ab1436d80.tar.bz2
Add PP_FlashLSORestrictions to the list of settings supported by the Flash_GetSetting Pepper API.
BUG=132410 Review URL: https://chromiumcodereview.appspot.com/10831045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149711 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc6
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h3
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h6
-rw-r--r--webkit/plugins/ppapi/ppb_flash_impl.cc18
4 files changed, 30 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index 2fce82c..298ddc9 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -460,5 +460,11 @@ std::string MockPluginDelegate::GetDeviceID() {
return std::string();
}
+PP_FlashLSORestrictions MockPluginDelegate::GetLocalDataRestrictions(
+ const GURL& document_url,
+ const GURL& plugin_url) {
+ return PP_FLASHLSORESTRICTIONS_NONE;
+}
+
} // namespace ppapi
} // namespace webkit
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index 8cfa317..3fa4677 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -204,6 +204,9 @@ class MockPluginDelegate : public PluginDelegate {
const EnumerateDevicesCallback& callback);
virtual webkit_glue::ClipboardClient* CreateClipboardClient() const;
virtual std::string GetDeviceID();
+ virtual PP_FlashLSORestrictions GetLocalDataRestrictions(
+ const GURL& document_url,
+ const GURL& plugin_url);
};
} // namespace ppapi
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index 3428db3..ab237a3 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -25,6 +25,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/private/ppb_flash.h"
#include "ppapi/shared_impl/dir_contents.h"
#include "ui/gfx/size.h"
#include "webkit/fileapi/file_system_types.h"
@@ -664,6 +665,11 @@ class PluginDelegate {
// Returns a Device ID
virtual std::string GetDeviceID() = 0;
+
+ // Returns restrictions on local data handled by the plug-in.
+ virtual PP_FlashLSORestrictions GetLocalDataRestrictions(
+ const GURL& document_url,
+ const GURL& plugin_url) = 0;
};
} // namespace ppapi
diff --git a/webkit/plugins/ppapi/ppb_flash_impl.cc b/webkit/plugins/ppapi/ppb_flash_impl.cc
index ef95290..7b7a74a 100644
--- a/webkit/plugins/ppapi/ppb_flash_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_impl.cc
@@ -27,6 +27,9 @@
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/core/SkTemplates.h"
#include "third_party/skia/include/core/SkTypeface.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/clipboard_client.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
@@ -249,9 +252,18 @@ int32_t PPB_Flash_Impl::GetSettingInt(PP_Instance instance,
}
PP_Var PPB_Flash_Impl::GetSetting(PP_Instance instance,
- PP_FlashSetting setting) {
- // No current settings are supported in-process.
- return PP_MakeUndefined();
+ PP_FlashSetting setting) {
+ switch(setting) {
+ case PP_FLASHSETTING_LSORESTRICTIONS: {
+ return PP_MakeInt32(
+ instance_->delegate()->GetLocalDataRestrictions(
+ instance_->container()->element().document().url(),
+ instance_->plugin_url()));
+ }
+ default:
+ // No other settings are supported in-process.
+ return PP_MakeUndefined();
+ }
}
PP_Bool PPB_Flash_Impl::SetCrashData(PP_Instance instance,