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

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

Issue 2856093003: Update TextSelection for non-user initiated events (Closed)
Patch Set: Created 3 years, 7 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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 Send(new ViewMsg_ForceRedraw(GetRoutingID(), latency_info)); 1514 Send(new ViewMsg_ForceRedraw(GetRoutingID(), latency_info));
1515 } 1515 }
1516 1516
1517 const NativeWebKeyboardEvent* 1517 const NativeWebKeyboardEvent*
1518 RenderWidgetHostImpl::GetLastKeyboardEvent() const { 1518 RenderWidgetHostImpl::GetLastKeyboardEvent() const {
1519 return input_router_->GetLastKeyboardEvent(); 1519 return input_router_->GetLastKeyboardEvent();
1520 } 1520 }
1521 1521
1522 void RenderWidgetHostImpl::SelectionChanged(const base::string16& text, 1522 void RenderWidgetHostImpl::SelectionChanged(const base::string16& text,
1523 uint32_t offset, 1523 uint32_t offset,
1524 const gfx::Range& range) { 1524 const gfx::Range& range,
1525 bool user_initiated) {
1525 if (view_) 1526 if (view_)
1526 view_->SelectionChanged(text, static_cast<size_t>(offset), range); 1527 view_->SelectionChanged(text, static_cast<size_t>(offset), range,
1528 user_initiated);
nasko 2017/05/04 16:10:24 Add {} to the if statement, as its body now spans
Peter Varga 2017/05/04 16:33:45 Acknowledged.
1527 } 1529 }
1528 1530
1529 void RenderWidgetHostImpl::OnSelectionBoundsChanged( 1531 void RenderWidgetHostImpl::OnSelectionBoundsChanged(
1530 const ViewHostMsg_SelectionBounds_Params& params) { 1532 const ViewHostMsg_SelectionBounds_Params& params) {
1531 if (view_) { 1533 if (view_) {
1532 view_->SelectionBoundsChanged(params); 1534 view_->SelectionBoundsChanged(params);
1533 } 1535 }
1534 } 1536 }
1535 1537
1536 void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) { 1538 void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) {
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 RenderProcessHost* rph = GetProcess(); 2637 RenderProcessHost* rph = GetProcess();
2636 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); 2638 for (std::vector<IPC::Message>::const_iterator i = messages.begin();
2637 i != messages.end(); ++i) { 2639 i != messages.end(); ++i) {
2638 rph->OnMessageReceived(*i); 2640 rph->OnMessageReceived(*i);
2639 if (i->dispatch_error()) 2641 if (i->dispatch_error())
2640 rph->OnBadMessageReceived(*i); 2642 rph->OnBadMessageReceived(*i);
2641 } 2643 }
2642 } 2644 }
2643 2645
2644 } // namespace content 2646 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698