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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2034863002: Move SelectionBound from ui/base/touch to ui/gfx to be used by cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated views_unittests Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index f978056c130659c4d8c3fa595dd391c8dea1960b..a191f84ca9b415b90ff28d120429fe476581e0dd 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1067,15 +1067,15 @@ gfx::Size RenderWidgetHostViewAura::GetRequestedRendererSize() const {
void RenderWidgetHostViewAura::SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params) {
- ui::SelectionBound anchor_bound, focus_bound;
+ gfx::SelectionBound anchor_bound, focus_bound;
anchor_bound.SetEdge(gfx::PointF(params.anchor_rect.origin()),
gfx::PointF(params.anchor_rect.bottom_left()));
focus_bound.SetEdge(gfx::PointF(params.focus_rect.origin()),
gfx::PointF(params.focus_rect.bottom_left()));
if (params.anchor_rect == params.focus_rect) {
- anchor_bound.set_type(ui::SelectionBound::CENTER);
- focus_bound.set_type(ui::SelectionBound::CENTER);
+ anchor_bound.set_type(gfx::SelectionBound::CENTER);
+ focus_bound.set_type(gfx::SelectionBound::CENTER);
} else {
// Whether text is LTR at the anchor handle.
bool anchor_LTR = params.anchor_dir == blink::WebTextDirectionLeftToRight;
@@ -1084,15 +1084,15 @@ void RenderWidgetHostViewAura::SelectionBoundsChanged(
if ((params.is_anchor_first && anchor_LTR) ||
(!params.is_anchor_first && !anchor_LTR)) {
- anchor_bound.set_type(ui::SelectionBound::LEFT);
+ anchor_bound.set_type(gfx::SelectionBound::LEFT);
} else {
- anchor_bound.set_type(ui::SelectionBound::RIGHT);
+ anchor_bound.set_type(gfx::SelectionBound::RIGHT);
}
if ((params.is_anchor_first && focus_LTR) ||
(!params.is_anchor_first && !focus_LTR)) {
- focus_bound.set_type(ui::SelectionBound::RIGHT);
+ focus_bound.set_type(gfx::SelectionBound::RIGHT);
} else {
- focus_bound.set_type(ui::SelectionBound::LEFT);
+ focus_bound.set_type(gfx::SelectionBound::LEFT);
}
}
@@ -1576,7 +1576,7 @@ gfx::Rect RenderWidgetHostViewAura::ConvertRectFromScreen(
gfx::Rect RenderWidgetHostViewAura::GetCaretBounds() const {
return ConvertRectToScreen(
- ui::RectBetweenSelectionBounds(selection_anchor_, selection_focus_));
+ gfx::RectBetweenSelectionBounds(selection_anchor_, selection_focus_));
}
bool RenderWidgetHostViewAura::GetCompositionCharacterBounds(
@@ -2761,10 +2761,11 @@ void RenderWidgetHostViewAura::ForwardKeyboardEvent(
target_host->ForwardKeyboardEvent(event);
}
-void RenderWidgetHostViewAura::SelectionUpdated(bool is_editable,
- bool is_empty_text_form_control,
- const ui::SelectionBound& start,
- const ui::SelectionBound& end) {
+void RenderWidgetHostViewAura::SelectionUpdated(
+ bool is_editable,
+ bool is_empty_text_form_control,
+ const gfx::SelectionBound& start,
+ const gfx::SelectionBound& end) {
selection_controller_->OnSelectionEditable(is_editable);
selection_controller_->OnSelectionEmpty(is_empty_text_form_control);
selection_controller_->OnSelectionBoundsChanged(start, end);
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | ui/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698