diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2021-02-04 14:48:52 +0100 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2021-03-06 08:28:04 +0100 |
commit | 8f56ea6806d9a72d4b705da5f6f90fa5a6873567 (patch) | |
tree | d4f5d01cde73e34973990ae5a5f3cb271516db15 /src/core/web_contents_view_qt.h | |
parent | 84104b7d100553c1550c525759ef6fb4446c31be (diff) |
Show PDF viewer in a guest view
This is the basic support of guest views, implemented based
on Chrome.
- Embed PDF as a child frame instead of navigating to its
extension WebUI. Keep the original URL (pointing to the file) to
extend functionality of PDF viewer with URL parameters.
- Make RenderWidgetHostInputEventRouter to work and modify most of
the event forwarding logic to use that. This way WebEngine supports
pages with multiple RenderWidgetHost and guest views can be
interactive with user input.
[ChangeLog] PDF files are opened as embedded objects, WebEngine
will not navigate the content away from the requested file to
present it. PDF viewer can accept URL parameters (e.g. to control
zooming or fitting to view). Also, PDF viewer is interactive
when displayed in a subframe.
Task-number: QTBUG-80463
Task-number: QTBUG-86152
Task-number: QTBUG-90712
Change-Id: Ib1591fbd9a594891cdeace8e9dae0d3cc21a9f8e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_contents_view_qt.h')
-rw-r--r-- | src/core/web_contents_view_qt.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h index d2f82dfad..da0c5d20c 100644 --- a/src/core/web_contents_view_qt.h +++ b/src/core/web_contents_view_qt.h @@ -44,6 +44,7 @@ #include "content/browser/web_contents/web_contents_view.h" #include "api/qtwebenginecoreglobal_p.h" +#include "web_contents_adapter_client.h" namespace content { class WebContents; @@ -120,6 +121,8 @@ public: void LostFocus(content::RenderWidgetHostImpl *render_widget_host) override; void TakeFocus(bool reverse) override; + static WebEngineContextMenuData buildContextMenuData(const content::ContextMenuParams ¶ms); + private: content::WebContents *m_webContents; WebContentsAdapterClient *m_client; |