diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/pepper_plugin_delegate.h | 4 | ||||
-rw-r--r-- | webkit/glue/plugins/pepper_private.cc | 6 | ||||
-rw-r--r-- | webkit/glue/plugins/ppb_private.h | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/webkit/glue/plugins/pepper_plugin_delegate.h b/webkit/glue/plugins/pepper_plugin_delegate.h index 6173af7..f080f34 100644 --- a/webkit/glue/plugins/pepper_plugin_delegate.h +++ b/webkit/glue/plugins/pepper_plugin_delegate.h @@ -216,8 +216,8 @@ class PluginDelegate { virtual void DidStartLoading() = 0; virtual void DidStopLoading() = 0; - // Disables the given UI command item (i.e. print/copy). - virtual void DisableCommand(int command_id) = 0; + // Sets restrictions on how the content can be used (i.e. no print/copy). + virtual void SetContentRestriction(int restrictions) = 0; }; } // namespace pepper diff --git a/webkit/glue/plugins/pepper_private.cc b/webkit/glue/plugins/pepper_private.cc index de4d180..ae4db34 100644 --- a/webkit/glue/plugins/pepper_private.cc +++ b/webkit/glue/plugins/pepper_private.cc @@ -241,11 +241,11 @@ void DidStopLoading(PP_Instance instance_id) { instance->delegate()->DidStopLoading(); } -void DisableCommand(PP_Instance instance_id, int command_id) { +void SetContentRestriction(PP_Instance instance_id, int restrictions) { PluginInstance* instance = ResourceTracker::Get()->GetInstance(instance_id); if (!instance) return; - instance->delegate()->DisableCommand(command_id); + instance->delegate()->SetContentRestriction(restrictions); } const PPB_Private ppb_private = { @@ -256,7 +256,7 @@ const PPB_Private ppb_private = { &SearchString, &DidStartLoading, &DidStopLoading, - &DisableCommand + &SetContentRestriction }; } // namespace diff --git a/webkit/glue/plugins/ppb_private.h b/webkit/glue/plugins/ppb_private.h index 9f8b93c..a60194c 100644 --- a/webkit/glue/plugins/ppb_private.h +++ b/webkit/glue/plugins/ppb_private.h @@ -118,8 +118,9 @@ struct PPB_Private { void (*DidStartLoading)(PP_Instance instance); void (*DidStopLoading)(PP_Instance instance); - // Disables the given command (i.e. print/copy). - void (*DisableCommand)(PP_Instance instance, int command_id); + // Sets content restriction for a full-page plugin (i.e. can't copy/print). + // The value is a bitfield of ContentRestriction enums. + void (*SetContentRestriction)(PP_Instance instance, int restrictions); }; #endif // WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_ |