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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_guest.cc

Issue 2901093003: Revert of 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 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) {
415 RenderWidgetHostViewBase* view = should_forward_text_selection_ 414 RenderWidgetHostViewBase* view = should_forward_text_selection_
416 ? GetOwnerRenderWidgetHostView() 415 ? GetOwnerRenderWidgetHostView()
417 : platform_view_.get(); 416 : platform_view_.get();
418 if (view) 417 if (view)
419 view->SelectionChanged(text, offset, range, user_initiated); 418 view->SelectionChanged(text, offset, range);
420 } 419 }
421 420
422 void RenderWidgetHostViewGuest::SelectionBoundsChanged( 421 void RenderWidgetHostViewGuest::SelectionBoundsChanged(
423 const ViewHostMsg_SelectionBounds_Params& params) { 422 const ViewHostMsg_SelectionBounds_Params& params) {
424 if (!guest_) 423 if (!guest_)
425 return; 424 return;
426 425
427 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView(); 426 RenderWidgetHostViewBase* rwhv = GetOwnerRenderWidgetHostView();
428 if (!rwhv) 427 if (!rwhv)
429 return; 428 return;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 host_->ForwardGestureEvent(gesture_event); 652 host_->ForwardGestureEvent(gesture_event);
654 return; 653 return;
655 } 654 }
656 } 655 }
657 656
658 bool RenderWidgetHostViewGuest::HasEmbedderChanged() { 657 bool RenderWidgetHostViewGuest::HasEmbedderChanged() {
659 return guest_ && guest_->has_attached_since_surface_set(); 658 return guest_ && guest_->has_attached_since_surface_set();
660 } 659 }
661 660
662 } // namespace content 661 } // 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