summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp62
1 files changed, 25 insertions, 37 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index f45db6bf4..77fd55aab 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -343,18 +343,14 @@ gfx::NativeView RenderWidgetHostViewQt::GetNativeView() const
return gfx::NativeView();
}
-gfx::NativeViewId RenderWidgetHostViewQt::GetNativeViewId() const
-{
- return 0;
-}
-
gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible()
{
return 0;
}
-content::BrowserAccessibilityManager* RenderWidgetHostViewQt::CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate)
+content::BrowserAccessibilityManager* RenderWidgetHostViewQt::CreateBrowserAccessibilityManager(content::BrowserAccessibilityDelegate* delegate, bool for_root_frame)
{
+ Q_UNUSED(for_root_frame); // FIXME
#ifndef QT_NO_ACCESSIBILITY
return new content::BrowserAccessibilityManagerQt(
m_adapterClient->accessibilityParentObject(),
@@ -435,11 +431,6 @@ void RenderWidgetHostViewQt::UnlockMouse()
m_host->LostMouseLock();
}
-void RenderWidgetHostViewQt::MovePluginWindows(const std::vector<content::WebPluginGeometry>&)
-{
- // QT_NOT_YET_IMPLEMENTED
-}
-
void RenderWidgetHostViewQt::UpdateCursor(const content::WebCursor &webCursor)
{
content::WebCursor::CursorInfo cursorInfo;
@@ -580,7 +571,7 @@ void RenderWidgetHostViewQt::SetIsLoading(bool)
// We use WebContentsDelegateQt::LoadingStateChanged to notify about loading state.
}
-void RenderWidgetHostViewQt::TextInputStateChanged(const ViewHostMsg_TextInputState_Params &params)
+void RenderWidgetHostViewQt::TextInputStateChanged(const content::TextInputState &params)
{
m_currentInputType = params.type;
m_delegate->inputMethodStateChanged(params.type != ui::TEXT_INPUT_TYPE_NONE);
@@ -612,7 +603,7 @@ void RenderWidgetHostViewQt::Destroy()
void RenderWidgetHostViewQt::SetTooltipText(const base::string16 &tooltip_text)
{
- m_delegate->setTooltip(toQt(tooltip_text));
+ m_adapterClient->setToolTip(toQt(tooltip_text));
}
void RenderWidgetHostViewQt::SelectionBoundsChanged(const ViewHostMsg_SelectionBounds_Params &params)
@@ -664,19 +655,19 @@ void RenderWidgetHostViewQt::UnlockCompositingSurface()
{
}
-void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, scoped_ptr<cc::CompositorFrame> frame)
+void RenderWidgetHostViewQt::OnSwapCompositorFrame(uint32_t output_surface_id, cc::CompositorFrame frame)
{
- bool scrollOffsetChanged = (m_lastScrollOffset != frame->metadata.root_scroll_offset);
- bool contentsSizeChanged = (m_lastContentsSize != frame->metadata.root_layer_size);
- m_lastScrollOffset = frame->metadata.root_scroll_offset;
- m_lastContentsSize = frame->metadata.root_layer_size;
+ bool scrollOffsetChanged = (m_lastScrollOffset != frame.metadata.root_scroll_offset);
+ bool contentsSizeChanged = (m_lastContentsSize != frame.metadata.root_layer_size);
+ m_lastScrollOffset = frame.metadata.root_scroll_offset;
+ m_lastContentsSize = frame.metadata.root_layer_size;
Q_ASSERT(!m_needsDelegatedFrameAck);
m_needsDelegatedFrameAck = true;
m_pendingOutputSurfaceId = output_surface_id;
- Q_ASSERT(frame->delegated_frame_data);
+ Q_ASSERT(frame.delegated_frame_data);
Q_ASSERT(!m_chromiumCompositorData->frameData || m_chromiumCompositorData->frameData->resource_list.empty());
- m_chromiumCompositorData->frameData = std::move(frame->delegated_frame_data);
- m_chromiumCompositorData->frameDevicePixelRatio = frame->metadata.device_scale_factor;
+ m_chromiumCompositorData->frameData = std::move(frame.delegated_frame_data);
+ m_chromiumCompositorData->frameDevicePixelRatio = frame.metadata.device_scale_factor;
// Support experimental.viewport.devicePixelRatio, see GetScreenInfo implementation below.
float dpiScale = this->dpiScale();
@@ -720,11 +711,6 @@ void RenderWidgetHostViewQt::ClearCompositorFrame()
{
}
-bool RenderWidgetHostViewQt::GetScreenColorProfile(std::vector<char>*)
-{
- return false;
-}
-
void RenderWidgetHostViewQt::SelectionChanged(const base::string16 &text, size_t offset, const gfx::Range &range)
{
content::RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
@@ -882,7 +868,7 @@ void RenderWidgetHostViewQt::processMotionEvent(const ui::MotionEvent &motionEve
return;
blink::WebTouchEvent touchEvent = ui::CreateWebTouchEventFromMotionEvent(motionEvent,
- result.did_generate_scroll);
+ result.moved_beyond_slop_region);
m_host->ForwardTouchEventWithLatencyInfo(touchEvent, CreateLatencyInfo(touchEvent));
}
@@ -1032,14 +1018,6 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
};
- auto setCompositionForPreEditString = [&](){
- ensureValidSelectionRange();
- m_host->ImeSetComposition(toString16(preeditString),
- underlines,
- selectionRange.start(),
- selectionRange.end());
- };
-
Q_FOREACH (const QInputMethodEvent::Attribute &attribute, attributes) {
switch (attribute.type) {
case QInputMethodEvent::TextFormat: {
@@ -1067,9 +1045,19 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev)
}
}
+ gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
+ : gfx::Range::InvalidRange();
+
+ auto setCompositionForPreEditString = [&](){
+ ensureValidSelectionRange();
+ m_host->ImeSetComposition(toString16(preeditString),
+ underlines,
+ replacementRange,
+ selectionRange.start(),
+ selectionRange.end());
+ };
+
if (!commitString.isEmpty()) {
- gfx::Range replacementRange = (replacementLength > 0) ? gfx::Range(replacementStart, replacementStart + replacementLength)
- : gfx::Range::InvalidRange();
m_host->ImeConfirmComposition(toString16(commitString), replacementRange, false);
// We might get a commit string and a pre-edit string in a single event, which means