diff options
Diffstat (limited to 'src/core/render_widget_host_view_qt.h')
-rw-r--r-- | src/core/render_widget_host_view_qt.h | 60 |
1 files changed, 21 insertions, 39 deletions
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index fac7efd14..68330a486 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtWebEngine module of the Qt Toolkit. ** @@ -10,15 +10,15 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 3 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPLv3 included in the -** packaging of this file. Please review the following information to +** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 3 requirements ** will be met: https://www.gnu.org/licenses/lgpl.html. ** @@ -26,7 +26,7 @@ ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 2.0 or later as published by the Free ** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to +** the packaging of this file. Please review the following information to ** ensure the GNU General Public License version 2.0 requirements will be ** met: http://www.gnu.org/licenses/gpl-2.0.html. ** @@ -44,6 +44,8 @@ #include "cc/resources/transferable_resource.h" #include "content/browser/accessibility/browser_accessibility_manager.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" +#include "content/common/gpu/gpu_messages.h" +#include "content/common/view_messages.h" #include "ui/events/gesture_detection/filtered_gesture_provider.h" #include <QMap> #include <QPoint> @@ -71,6 +73,8 @@ namespace content { class RenderWidgetHostImpl; } +namespace QtWebEngineCore { + struct MultipleMouseClickHelper { QPoint lastPressPosition; @@ -91,7 +95,6 @@ class RenderWidgetHostViewQt : public content::RenderWidgetHostViewBase , public ui::GestureProviderClient , public RenderWidgetHostViewQtDelegateClient - , public content::BrowserAccessibilityDelegate , public base::SupportsWeakPtr<RenderWidgetHostViewQt> #ifndef QT_NO_ACCESSIBILITY , public QAccessible::ActivationObserver @@ -110,6 +113,7 @@ public: virtual content::RenderWidgetHost* GetRenderWidgetHost() const Q_DECL_OVERRIDE; virtual void SetSize(const gfx::Size& size) Q_DECL_OVERRIDE; virtual void SetBounds(const gfx::Rect&) Q_DECL_OVERRIDE; + virtual gfx::Vector2dF GetLastScrollOffset() const Q_DECL_OVERRIDE; virtual gfx::Size GetPhysicalBackingSize() const Q_DECL_OVERRIDE; virtual gfx::NativeView GetNativeView() const Q_DECL_OVERRIDE; virtual gfx::NativeViewId GetNativeViewId() const Q_DECL_OVERRIDE; @@ -129,22 +133,16 @@ public: virtual void Blur() Q_DECL_OVERRIDE; virtual void UpdateCursor(const content::WebCursor&) Q_DECL_OVERRIDE; virtual void SetIsLoading(bool) Q_DECL_OVERRIDE; - virtual void TextInputStateChanged(const ViewHostMsg_TextInputState_Params& params) Q_DECL_OVERRIDE; + virtual void TextInputTypeChanged(ui::TextInputType type, ui::TextInputMode mode, bool can_compose_inline, int flags) Q_DECL_OVERRIDE; virtual void ImeCancelComposition() Q_DECL_OVERRIDE; virtual void ImeCompositionRangeChanged(const gfx::Range&, const std::vector<gfx::Rect>&) Q_DECL_OVERRIDE; virtual void RenderProcessGone(base::TerminationStatus, int) Q_DECL_OVERRIDE; virtual void Destroy() Q_DECL_OVERRIDE; virtual void SetTooltipText(const base::string16 &tooltip_text) Q_DECL_OVERRIDE; virtual void SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params&) Q_DECL_OVERRIDE; - virtual void ScrollOffsetChanged() Q_DECL_OVERRIDE; - virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& /* dst_size */, const base::Callback<void(bool, const SkBitmap&)>& callback, const SkBitmap::Config config) Q_DECL_OVERRIDE; + virtual void CopyFromCompositingSurface(const gfx::Rect& src_subrect, const gfx::Size& dst_size, content::CopyFromCompositingSurfaceCallback& callback, const SkColorType color_type) Q_DECL_OVERRIDE; virtual void CopyFromCompositingSurfaceToVideoFrame(const gfx::Rect& src_subrect, const scoped_refptr<media::VideoFrame>& target, const base::Callback<void(bool)>& callback) Q_DECL_OVERRIDE; virtual bool CanCopyToVideoFrame() const Q_DECL_OVERRIDE; - virtual void AcceleratedSurfaceInitialized(int host_id, int route_id) Q_DECL_OVERRIDE; - virtual void AcceleratedSurfaceBuffersSwapped(const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, int gpu_host_id) Q_DECL_OVERRIDE; - virtual void AcceleratedSurfacePostSubBuffer(const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params, int gpu_host_id) Q_DECL_OVERRIDE; - virtual void AcceleratedSurfaceSuspend() Q_DECL_OVERRIDE; - virtual void AcceleratedSurfaceRelease() Q_DECL_OVERRIDE; virtual bool HasAcceleratedSurface(const gfx::Size&) Q_DECL_OVERRIDE; virtual void OnSwapCompositorFrame(uint32 output_surface_id, scoped_ptr<cc::CompositorFrame> frame) Q_DECL_OVERRIDE; virtual void GetScreenInfo(blink::WebScreenInfo* results) Q_DECL_OVERRIDE; @@ -175,7 +173,6 @@ public: void handleInputMethodEvent(QInputMethodEvent*); #if defined(OS_MACOSX) - virtual void SetTakesFocusOnlyOnMouseDown(bool flag) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } virtual void SetActive(bool active) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } virtual bool IsSpeaking() const Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED; return false; } virtual void SpeakSelection() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } @@ -187,12 +184,6 @@ public: virtual void WindowFrameChanged() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } #endif // defined(OS_MACOSX) -#if defined(OS_ANDROID) - virtual void ShowDisambiguationPopup(const gfx::Rect&, const SkBitmap&) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } - virtual void LockCompositingSurface() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } - virtual void UnlockCompositingSurface() Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } -#endif // defined(OS_ANDROID) - #if defined(OS_WIN) #if defined(USE_AURA) virtual void SetParentNativeViewAccessible(gfx::NativeViewAccessible accessible_parent) Q_DECL_OVERRIDE { QT_NOT_YET_IMPLEMENTED } @@ -204,23 +195,10 @@ public: #endif // defined(OS_WIN) // Overridden from content::BrowserAccessibilityDelegate - virtual void AccessibilitySetFocus(int acc_obj_id) Q_DECL_OVERRIDE; - virtual void AccessibilityDoDefaultAction(int acc_obj_id) Q_DECL_OVERRIDE; - virtual void AccessibilityShowMenu(int acc_obj_id) Q_DECL_OVERRIDE { } - virtual void AccessibilityScrollToMakeVisible(int acc_obj_id, gfx::Rect subfocus) Q_DECL_OVERRIDE; - virtual void AccessibilityScrollToPoint(int acc_obj_id, gfx::Point point) Q_DECL_OVERRIDE; - virtual void AccessibilitySetTextSelection(int acc_obj_id, int start_offset, int end_offset) Q_DECL_OVERRIDE; - virtual bool AccessibilityViewHasFocus() const Q_DECL_OVERRIDE; - virtual gfx::Rect AccessibilityGetViewBounds() const Q_DECL_OVERRIDE { return GetViewBounds(); } - virtual gfx::Point AccessibilityOriginInScreen(const gfx::Rect& bounds) const Q_DECL_OVERRIDE { return gfx::Point(); } - virtual void AccessibilityHitTest(const gfx::Point& point) Q_DECL_OVERRIDE { } - virtual void AccessibilityFatalError() Q_DECL_OVERRIDE; + virtual content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate) Q_DECL_OVERRIDE; #ifndef QT_NO_ACCESSIBILITY virtual void accessibilityActiveChanged(bool active) Q_DECL_OVERRIDE; - - QAccessibleInterface *GetQtAccessible(); #endif // QT_NO_ACCESSIBILITY - void didFirstVisuallyNonEmptyLayout(); private: @@ -230,7 +208,6 @@ private: float dpiScale() const; bool IsPopup() const; - void CreateBrowserAccessibilityManagerIfNeeded(); content::RenderWidgetHostImpl *m_host; ui::FilteredGestureProvider m_gestureProvider; @@ -239,7 +216,7 @@ private: QMap<int, int> m_touchIdMapping; scoped_ptr<RenderWidgetHostViewQtDelegate> m_delegate; - QExplicitlySharedDataPointer<DelegatedFrameNodeData> m_frameNodeData; + QExplicitlySharedDataPointer<ChromiumCompositorData> m_chromiumCompositorData; cc::ReturnedResourceArray m_resourcesToRelease; bool m_needsDelegatedFrameAck; bool m_didFirstVisuallyNonEmptyLayout; @@ -252,8 +229,13 @@ private: QRect m_cursorRect; size_t m_anchorPositionWithinSelection; size_t m_cursorPositionWithinSelection; + QPoint m_lockedMousePosition; bool m_initPending; + + gfx::Vector2dF m_lastScrollOffset; }; +} // namespace QtWebEngineCore + #endif // RENDER_WIDGET_HOST_VIEW_QT_H |