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

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

Issue 2903833002: Reland: Update TextSelection for non-user initiated events
Patch Set: Suppress superfluous non-user initiated text selection events 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_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/accessibility/browser_accessibility_manager.h" 9 #include "content/browser/accessibility/browser_accessibility_manager.h"
10 #include "content/browser/gpu/gpu_data_manager_impl.h" 10 #include "content/browser/gpu/gpu_data_manager_impl.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 NOTREACHED() << "Selection bounds should be routed through the compositor."; 113 NOTREACHED() << "Selection bounds should be routed through the compositor.";
114 #endif 114 #endif
115 } 115 }
116 116
117 float RenderWidgetHostViewBase::GetBottomControlsHeight() const { 117 float RenderWidgetHostViewBase::GetBottomControlsHeight() const {
118 return 0.f; 118 return 0.f;
119 } 119 }
120 120
121 void RenderWidgetHostViewBase::SelectionChanged(const base::string16& text, 121 void RenderWidgetHostViewBase::SelectionChanged(const base::string16& text,
122 size_t offset, 122 size_t offset,
123 const gfx::Range& range) { 123 const gfx::Range& range,
124 if (GetTextInputManager()) 124 bool user_initiated) {
125 GetTextInputManager()->SelectionChanged(this, text, offset, range); 125 if (GetTextInputManager()) {
126 GetTextInputManager()->SelectionChanged(this, text, offset, range,
127 user_initiated);
128 }
126 } 129 }
127 130
128 gfx::Size RenderWidgetHostViewBase::GetRequestedRendererSize() const { 131 gfx::Size RenderWidgetHostViewBase::GetRequestedRendererSize() const {
129 return GetViewBounds().size(); 132 return GetViewBounds().size();
130 } 133 }
131 134
132 ui::TextInputClient* RenderWidgetHostViewBase::GetTextInputClient() { 135 ui::TextInputClient* RenderWidgetHostViewBase::GetTextInputClient() {
133 NOTREACHED(); 136 NOTREACHED();
134 return NULL; 137 return NULL;
135 } 138 }
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 489
487 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const { 490 bool RenderWidgetHostViewBase::IsChildFrameForTesting() const {
488 return false; 491 return false;
489 } 492 }
490 493
491 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const { 494 cc::SurfaceId RenderWidgetHostViewBase::SurfaceIdForTesting() const {
492 return cc::SurfaceId(); 495 return cc::SurfaceId();
493 } 496 }
494 497
495 } // namespace content 498 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698