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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/render_widget_host_view_guest.h" 5 #include "content/browser/frame_host/render_widget_host_view_guest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 guest_->GetScreenCoordinates(character_bounds[i].origin()), 404 guest_->GetScreenCoordinates(character_bounds[i].origin()),
405 character_bounds[i].size())); 405 character_bounds[i].size()));
406 } 406 }
407 // Forward the information to embedding RWHV. 407 // Forward the information to embedding RWHV.
408 rwhv->ImeCompositionRangeChanged(range, guest_character_bounds); 408 rwhv->ImeCompositionRangeChanged(range, guest_character_bounds);
409 } 409 }
410 #endif 410 #endif
411 411
412 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text, 412 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text,
413 size_t offset, 413 size_t offset,
414 const gfx::Range& range) { 414 const gfx::Range& range,
415 bool user_initiated) {
415 RenderWidgetHostViewBase* view = should_forward_text_selection_ 416 RenderWidgetHostViewBase* view = should_forward_text_selection_
416 ? GetOwnerRenderWidgetHostView() 417 ? GetOwnerRenderWidgetHostView()
417 : platform_view_.get(); 418 : platform_view_.get();
418 if (view) 419 if (view)
419 view->SelectionChanged(text, offset, range); 420 view->SelectionChanged(text, offset, range, user_initiated);
420 } 421 }
421 422
422 void RenderWidgetHostViewGuest::SelectionBoundsChanged( 423 void RenderWidgetHostViewGuest::SelectionBoundsChanged(
423 const ViewHostMsg_SelectionBounds_Params& params) { 424 const ViewHostMsg_SelectionBounds_Params& params) {
424 if (!guest_) 425 if (!guest_)
425 return; 426 return;
426 427
427 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 428 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
428 if (!rwhv) 429 if (!rwhv)
429 return; 430 return;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 host_->ForwardGestureEvent(gesture_event); 654 host_->ForwardGestureEvent(gesture_event);
654 return; 655 return;
655 } 656 }
656 } 657 }
657 658
658 bool RenderWidgetHostViewGuest::HasEmbedderChanged() { 659 bool RenderWidgetHostViewGuest::HasEmbedderChanged() {
659 return guest_ && guest_->has_attached_since_surface_set(); 660 return guest_ && guest_->has_attached_since_surface_set();
660 } 661 }
661 662
662 } // namespace content 663 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698