diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-20 14:43:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-20 14:44:27 +0100 |
commit | 5668e73beb30b95abc6520b7432c54972ca3ab2c (patch) | |
tree | b9772e4ab6a6f92d655c0bacbb364ce3b2a4eb18 /include/avmedia | |
parent | ba1c6c94fce9fd20e224a265475e0b80576a2dd9 (diff) |
avmedia: Implement "block untrusted referer links" feature
See f0a9ca24fd4bf79cac908bf0d6fdb8905dc504db "rhbz#887420 Implement 'block
untrusted referer links' feature" for details. This adds some further /*TODO?*/
comments, and one known problem (marked /*TODO!*/) is that movies/sounds are not
blocked during a slideshow presentation.
Change-Id: Ib2d0c7e4f7b02c4bdec0d8a90cee5e7e1bee8325
Diffstat (limited to 'include/avmedia')
-rw-r--r-- | include/avmedia/mediaitem.hxx | 5 | ||||
-rw-r--r-- | include/avmedia/mediaplayer.hxx | 2 | ||||
-rw-r--r-- | include/avmedia/mediawindow.hxx | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx index 0e39e31870d5..7304e40095d4 100644 --- a/include/avmedia/mediaitem.hxx +++ b/include/avmedia/mediaitem.hxx @@ -106,11 +106,14 @@ public: ::com::sun::star::media::ZoomLevel getZoom() const; void setURL( const OUString& rURL, - const OUString& rTempURL); + const OUString& rTempURL, + const OUString& rReferer); const OUString& getURL() const; const OUString& getTempURL() const; + const OUString& getReferer() const; + private: struct Impl; diff --git a/include/avmedia/mediaplayer.hxx b/include/avmedia/mediaplayer.hxx index bd7706c64d8b..dbcbe6fc9ba3 100644 --- a/include/avmedia/mediaplayer.hxx +++ b/include/avmedia/mediaplayer.hxx @@ -46,7 +46,7 @@ public: MediaFloater( SfxBindings* pBindings, SfxChildWindow* pCW, Window* pParent ); ~MediaFloater(); - void setURL( const OUString& rURL, bool bPlayImmediately ); + void setURL( const OUString& rURL, const OUString& rReferer, bool bPlayImmediately ); void dispatchCurrentURL(); diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx index 74ef95da9f75..b2bca33302fe 100644 --- a/include/avmedia/mediawindow.hxx +++ b/include/avmedia/mediawindow.hxx @@ -57,7 +57,7 @@ namespace avmedia MediaWindow( Window* parent, bool bInternalMediaControl ); virtual ~MediaWindow(); - void setURL( const OUString& rURL ); + void setURL( const OUString& rURL, const OUString& rReferer ); const OUString& getURL() const; bool isValid() const; @@ -101,11 +101,11 @@ namespace avmedia static bool executeMediaURLDialog( Window* pParent, OUString& rURL, bool *const o_pbLink ); static void executeFormatErrorBox( Window* pParent ); - static bool isMediaURL( const OUString& rURL, bool bDeep = false, Size* pPreferredSizePixel = NULL ); + static bool isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep = false, Size* pPreferredSizePixel = NULL ); - static ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > createPlayer( const OUString& rURL ); + static ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > createPlayer( const OUString& rURL, const OUString& rReferer ); - static ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > grabFrame( const OUString& rURL, + static ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > grabFrame( const OUString& rURL, const OUString& rReferer, bool bAllowToCreateReplacementGraphic = false, double fMediaTime = AVMEDIA_FRAMEGRABBER_DEFAULTFRAME ); |