Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2903833002: Reland: Update TextSelection for non-user initiated events
Patch Set: Add test for JS cursor movement Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 Send(new ViewMsg_ForceRedraw(GetRoutingID(), latency_info)); 1527 Send(new ViewMsg_ForceRedraw(GetRoutingID(), latency_info));
1528 } 1528 }
1529 1529
1530 const NativeWebKeyboardEvent* 1530 const NativeWebKeyboardEvent*
1531 RenderWidgetHostImpl::GetLastKeyboardEvent() const { 1531 RenderWidgetHostImpl::GetLastKeyboardEvent() const {
1532 return input_router_->GetLastKeyboardEvent(); 1532 return input_router_->GetLastKeyboardEvent();
1533 } 1533 }
1534 1534
1535 void RenderWidgetHostImpl::SelectionChanged(const base::string16& text, 1535 void RenderWidgetHostImpl::SelectionChanged(const base::string16& text,
1536 uint32_t offset, 1536 uint32_t offset,
1537 const gfx::Range& range) { 1537 const gfx::Range& range,
1538 if (view_) 1538 bool user_initiated) {
1539 view_->SelectionChanged(text, static_cast<size_t>(offset), range); 1539 if (view_) {
1540 view_->SelectionChanged(text, static_cast<size_t>(offset), range,
1541 user_initiated);
1542 }
1540 } 1543 }
1541 1544
1542 void RenderWidgetHostImpl::OnSelectionBoundsChanged( 1545 void RenderWidgetHostImpl::OnSelectionBoundsChanged(
1543 const ViewHostMsg_SelectionBounds_Params& params) { 1546 const ViewHostMsg_SelectionBounds_Params& params) {
1544 if (view_) 1547 if (view_)
1545 view_->SelectionBoundsChanged(params); 1548 view_->SelectionBoundsChanged(params);
1546 } 1549 }
1547 1550
1548 void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) { 1551 void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) {
1549 if (needs_begin_frames_ == needs_begin_frames) 1552 if (needs_begin_frames_ == needs_begin_frames)
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 sequence_number >= saved_frame_.max_shared_bitmap_sequence_number) { 2719 sequence_number >= saved_frame_.max_shared_bitmap_sequence_number) {
2717 SubmitCompositorFrame(saved_frame_.local_surface_id, 2720 SubmitCompositorFrame(saved_frame_.local_surface_id,
2718 std::move(saved_frame_.frame)); 2721 std::move(saved_frame_.frame));
2719 saved_frame_.local_surface_id = viz::LocalSurfaceId(); 2722 saved_frame_.local_surface_id = viz::LocalSurfaceId();
2720 compositor_frame_sink_binding_.ResumeIncomingMethodCallProcessing(); 2723 compositor_frame_sink_binding_.ResumeIncomingMethodCallProcessing();
2721 TRACE_EVENT_ASYNC_END0("renderer_host", "PauseCompositorFrameSink", this); 2724 TRACE_EVENT_ASYNC_END0("renderer_host", "PauseCompositorFrameSink", this);
2722 } 2725 }
2723 } 2726 }
2724 2727
2725 } // namespace content 2728 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698