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

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: Update TextSelection for non-user initiated events 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 guest_->GetScreenCoordinates(character_bounds[i].origin()), 403 guest_->GetScreenCoordinates(character_bounds[i].origin()),
404 character_bounds[i].size())); 404 character_bounds[i].size()));
405 } 405 }
406 // Forward the information to embedding RWHV. 406 // Forward the information to embedding RWHV.
407 rwhv->ImeCompositionRangeChanged(range, guest_character_bounds); 407 rwhv->ImeCompositionRangeChanged(range, guest_character_bounds);
408 } 408 }
409 #endif 409 #endif
410 410
411 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text, 411 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text,
412 size_t offset, 412 size_t offset,
413 const gfx::Range& range) { 413 const gfx::Range& range,
414 bool user_initiated) {
414 RenderWidgetHostViewBase* view = should_forward_text_selection_ 415 RenderWidgetHostViewBase* view = should_forward_text_selection_
415 ? GetOwnerRenderWidgetHostView() 416 ? GetOwnerRenderWidgetHostView()
416 : platform_view_.get(); 417 : platform_view_.get();
417 if (view) 418 if (view)
418 view->SelectionChanged(text, offset, range); 419 view->SelectionChanged(text, offset, range, user_initiated);
419 } 420 }
420 421
421 void RenderWidgetHostViewGuest::SelectionBoundsChanged( 422 void RenderWidgetHostViewGuest::SelectionBoundsChanged(
422 const ViewHostMsg_SelectionBounds_Params& params) { 423 const ViewHostMsg_SelectionBounds_Params& params) {
423 if (!guest_) 424 if (!guest_)
424 return; 425 return;
425 426
426 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 427 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
427 if (!rwhv) 428 if (!rwhv)
428 return; 429 return;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 host_->ForwardGestureEvent(gesture_event); 653 host_->ForwardGestureEvent(gesture_event);
653 return; 654 return;
654 } 655 }
655 } 656 }
656 657
657 bool RenderWidgetHostViewGuest::HasEmbedderChanged() { 658 bool RenderWidgetHostViewGuest::HasEmbedderChanged() {
658 return guest_ && guest_->has_attached_since_surface_set(); 659 return guest_ && guest_->has_attached_since_surface_set();
659 } 660 }
660 661
661 } // namespace content 662 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698