diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-04-03 12:34:04 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-04-05 15:14:59 +0000 |
commit | a5ced3ad19e2ada6a0ed5a48de21d2879ba2f333 (patch) | |
tree | 38081c0f605fcdfed63482b72c6c8a2a06d6beba /src/core/browser_message_filter_qt.h | |
parent | 0aca80b0a29aa64536653a56aa87f626acc47189 (diff) |
Use cookie-access rights for webcontent settings
This ties the indexed-db, DOM storage and filesystem access to
cookie rights as they can all do the same cookies. A previous
patch did the same for workers, but we were missing this
class to complete the logic.
Change-Id: I5ea894b6c631bcf25439759174866d260b91b71a
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/core/browser_message_filter_qt.h')
-rw-r--r-- | src/core/browser_message_filter_qt.h | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/src/core/browser_message_filter_qt.h b/src/core/browser_message_filter_qt.h index 9ad9a0e6e..c05da7944 100644 --- a/src/core/browser_message_filter_qt.h +++ b/src/core/browser_message_filter_qt.h @@ -40,16 +40,20 @@ #ifndef BROWSER_MESSAGE_FILTER_QT_H #define BROWSER_MESSAGE_FILTER_QT_H +#include "base/callback.h" #include "content/public/browser/browser_message_filter.h" #include "content/public/common/webplugininfo.h" #include "media/media_features.h" +class GURL; +class Profile; + namespace QtWebEngineCore { class BrowserMessageFilterQt : public content::BrowserMessageFilter { public: - BrowserMessageFilterQt(int render_process_id); + BrowserMessageFilterQt(int render_process_id, Profile *profile); private: bool OnMessageReceived(const IPC::Message& message) override; @@ -65,6 +69,45 @@ private: const std::string& mime_type, base::Optional<std::vector<content::WebPluginMimeType::Param>> *opt_additional_params); #endif + + void OnAllowDatabase(int render_frame_id, + const GURL &origin_url, + const GURL &top_origin_url, + const base::string16& name, + const base::string16& display_name, + bool *allowed); + + void OnAllowDOMStorage(int render_frame_id, + const GURL &origin_url, + const GURL &top_origin_url, + bool local, + bool *allowed); + + void OnAllowIndexedDB(int render_frame_id, + const GURL &origin_url, + const GURL &top_origin_url, + const base::string16 &name, + bool *allowed); + + void OnRequestFileSystemAccessSync(int render_frame_id, + const GURL &origin_url, + const GURL &top_origin_url, + IPC::Message *message); + void OnRequestFileSystemAccessAsync(int render_frame_id, + int request_id, + const GURL &origin_url, + const GURL &top_origin_url); + void OnRequestFileSystemAccessSyncResponse(IPC::Message *reply_msg, + bool allowed); + void OnRequestFileSystemAccessAsyncResponse(int render_frame_id, + int request_id, + bool allowed); + void OnRequestFileSystemAccess(int render_frame_id, + const GURL &origin_url, + const GURL &top_origin_url, + base::Callback<void(bool)> callback); + + Profile *m_profile; }; } // namespace QtWebEngineCore |