From e4c17c961d145bb6c4c945e1d7be4eea702abecf Mon Sep 17 00:00:00 2001 From: matgic78 Date: Sun, 22 Nov 2009 11:46:44 +0100 Subject: ClickToFlash : first step For now, no config and only working when there is only one flash in the page --- src/clicktoflash.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/clicktoflash.h (limited to 'src/clicktoflash.h') diff --git a/src/clicktoflash.h b/src/clicktoflash.h new file mode 100644 index 00000000..382c6001 --- /dev/null +++ b/src/clicktoflash.h @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2009, Benjamin C. Meyer + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Benjamin Meyer nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef CLICKTOFLASH_H +#define CLICKTOFLASH_H + +#include +#include + +class WebPluginFactory; + +class ClickToFlash : public QWidget +{ + Q_OBJECT +public: + ClickToFlash(const WebPluginFactory *factory, QWidget *parent = 0); + +signals: + void signalLoadClickToFlash(bool); + +private slots: + /*void configure(); + void addToWhitelist(); + void removeFromWhitelist(); + void showContextMenu(); + void loadAll();*/ + void load(bool loadAll = false); + +private: + const WebPluginFactory *m_factory; +}; + +#endif // CLICKTOFLASH_H + -- cgit v1.2.1