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

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

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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
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 93db24a7f47820c88b566648213aa4c158720f0c..65a5fb4aa8113b24261f45143f3f2144ffe36e2d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1052,7 +1052,7 @@ void RenderWidgetHostViewAura::ImeCancelComposition() {
}
void RenderWidgetHostViewAura::ImeCompositionRangeChanged(
- const ui::Range& range,
+ const gfx::Range& range,
const std::vector<gfx::Rect>& character_bounds) {
composition_character_bounds_ = character_bounds;
}
@@ -1137,7 +1137,7 @@ void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) {
void RenderWidgetHostViewAura::SelectionChanged(const string16& text,
size_t offset,
- const ui::Range& range) {
+ const gfx::Range& range) {
RenderWidgetHostViewBase::SelectionChanged(text, offset, range);
#if defined(USE_X11) && !defined(OS_CHROMEOS)
@@ -2143,7 +2143,7 @@ void RenderWidgetHostViewAura::SetCompositionText(
void RenderWidgetHostViewAura::ConfirmCompositionText() {
if (host_ && has_composition_text_)
- host_->ImeConfirmComposition(string16(), ui::Range::InvalidRange(), false);
+ host_->ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), false);
has_composition_text_ = false;
}
@@ -2156,7 +2156,7 @@ void RenderWidgetHostViewAura::ClearCompositionText() {
void RenderWidgetHostViewAura::InsertText(const string16& text) {
DCHECK(text_input_type_ != ui::TEXT_INPUT_TYPE_NONE);
if (host_)
- host_->ImeConfirmComposition(text, ui::Range::InvalidRange(), false);
+ host_->ImeConfirmComposition(text, gfx::Range::InvalidRange(), false);
has_composition_text_ = false;
}
@@ -2252,40 +2252,40 @@ bool RenderWidgetHostViewAura::HasCompositionText() {
return has_composition_text_;
}
-bool RenderWidgetHostViewAura::GetTextRange(ui::Range* range) {
+bool RenderWidgetHostViewAura::GetTextRange(gfx::Range* range) {
range->set_start(selection_text_offset_);
range->set_end(selection_text_offset_ + selection_text_.length());
return true;
}
-bool RenderWidgetHostViewAura::GetCompositionTextRange(ui::Range* range) {
+bool RenderWidgetHostViewAura::GetCompositionTextRange(gfx::Range* range) {
// TODO(suzhe): implement this method when fixing http://crbug.com/55130.
NOTIMPLEMENTED();
return false;
}
-bool RenderWidgetHostViewAura::GetSelectionRange(ui::Range* range) {
+bool RenderWidgetHostViewAura::GetSelectionRange(gfx::Range* range) {
range->set_start(selection_range_.start());
range->set_end(selection_range_.end());
return true;
}
-bool RenderWidgetHostViewAura::SetSelectionRange(const ui::Range& range) {
+bool RenderWidgetHostViewAura::SetSelectionRange(const gfx::Range& range) {
// TODO(suzhe): implement this method when fixing http://crbug.com/55130.
NOTIMPLEMENTED();
return false;
}
-bool RenderWidgetHostViewAura::DeleteRange(const ui::Range& range) {
+bool RenderWidgetHostViewAura::DeleteRange(const gfx::Range& range) {
// TODO(suzhe): implement this method when fixing http://crbug.com/55130.
NOTIMPLEMENTED();
return false;
}
bool RenderWidgetHostViewAura::GetTextFromRange(
- const ui::Range& range,
+ const gfx::Range& range,
string16* text) {
- ui::Range selection_text_range(selection_text_offset_,
+ gfx::Range selection_text_range(selection_text_offset_,
selection_text_offset_ + selection_text_.length());
if (!selection_text_range.Contains(range)) {
@@ -3118,7 +3118,7 @@ void RenderWidgetHostViewAura::FinishImeCompositionSession() {
if (!has_composition_text_)
return;
if (host_)
- host_->ImeConfirmComposition(string16(), ui::Range::InvalidRange(), false);
+ host_->ImeConfirmComposition(string16(), gfx::Range::InvalidRange(), false);
ImeCancelComposition();
}

Powered by Google App Engine
This is Rietveld 408576698