| Index: content/renderer/render_view_impl.cc
|
| diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
| index 866943a399e41244d27c7bdf378ad140c968c069..bdcdac732a9e147bb4943f06b39a012d679c7a9b 100644
|
| --- a/content/renderer/render_view_impl.cc
|
| +++ b/content/renderer/render_view_impl.cc
|
| @@ -2723,62 +2723,6 @@ void RenderViewImpl::SetFocus(bool enable) {
|
| BrowserPluginManager::Get()->UpdateFocusState();
|
| }
|
|
|
| -void RenderViewImpl::OnImeSetComposition(
|
| - const base::string16& text,
|
| - const std::vector<blink::WebCompositionUnderline>& underlines,
|
| - const gfx::Range& replacement_range,
|
| - int selection_start,
|
| - int selection_end) {
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin) {
|
| - focused_pepper_plugin->render_frame()->OnImeSetComposition(
|
| - text, underlines, selection_start, selection_end);
|
| - return;
|
| - }
|
| -#endif // ENABLE_PLUGINS
|
| - if (replacement_range.IsValid() && webview()) {
|
| - // Select the text in |replacement_range|, it will then be replaced by
|
| - // text added by the call to RenderWidget::OnImeSetComposition().
|
| - WebLocalFrame* frame = webview()->focusedFrame();
|
| - WebRange webrange = WebRange::fromDocumentRange(
|
| - frame, replacement_range.start(), replacement_range.length());
|
| - if (!webrange.isNull())
|
| - frame->selectRange(webrange);
|
| - }
|
| - RenderWidget::OnImeSetComposition(text,
|
| - underlines,
|
| - replacement_range,
|
| - selection_start,
|
| - selection_end);
|
| -}
|
| -
|
| -void RenderViewImpl::OnImeConfirmComposition(
|
| - const base::string16& text,
|
| - const gfx::Range& replacement_range,
|
| - bool keep_selection) {
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin) {
|
| - focused_pepper_plugin->render_frame()->OnImeConfirmComposition(
|
| - text, replacement_range, keep_selection);
|
| - return;
|
| - }
|
| -#endif // ENABLE_PLUGINS
|
| - if (replacement_range.IsValid() && webview()) {
|
| - // Select the text in |replacement_range|, it will then be replaced by
|
| - // text added by the call to RenderWidget::OnImeConfirmComposition().
|
| - WebLocalFrame* frame = webview()->focusedFrame();
|
| - WebRange webrange = WebRange::fromDocumentRange(
|
| - frame, replacement_range.start(), replacement_range.length());
|
| - if (!webrange.isNull())
|
| - frame->selectRange(webrange);
|
| - }
|
| - RenderWidget::OnImeConfirmComposition(text,
|
| - replacement_range,
|
| - keep_selection);
|
| -}
|
| -
|
| void RenderViewImpl::RenderWidgetDidSetColorProfile(
|
| const std::vector<char>& profile) {
|
| if (webview()) {
|
| @@ -2793,86 +2737,6 @@ void RenderViewImpl::RenderWidgetDidSetColorProfile(
|
| }
|
| }
|
|
|
| -ui::TextInputType RenderViewImpl::GetTextInputType() {
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin)
|
| - return focused_pepper_plugin->text_input_type();
|
| -#endif
|
| - return RenderWidget::GetTextInputType();
|
| -}
|
| -
|
| -void RenderViewImpl::GetSelectionBounds(gfx::Rect* start, gfx::Rect* end) {
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin) {
|
| - // TODO(kinaba) http://crbug.com/101101
|
| - // Current Pepper IME API does not handle selection bounds. So we simply
|
| - // use the caret position as an empty range for now. It will be updated
|
| - // after Pepper API equips features related to surrounding text retrieval.
|
| - blink::WebRect caret(focused_pepper_plugin->GetCaretBounds());
|
| - ConvertViewportToWindowViaWidget(&caret);
|
| - *start = caret;
|
| - *end = caret;
|
| - return;
|
| - }
|
| -#endif
|
| - RenderWidget::GetSelectionBounds(start, end);
|
| -}
|
| -
|
| -void RenderViewImpl::GetCompositionCharacterBounds(
|
| - std::vector<gfx::Rect>* bounds_in_window) {
|
| - DCHECK(bounds_in_window);
|
| - bounds_in_window->clear();
|
| -
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin)
|
| - return;
|
| -#endif
|
| -
|
| - if (!webview())
|
| - return;
|
| - size_t start_offset = 0;
|
| - size_t character_count = 0;
|
| - if (!webview()->compositionRange(&start_offset, &character_count))
|
| - return;
|
| - if (character_count == 0)
|
| - return;
|
| -
|
| - blink::WebLocalFrame* frame = webview()->focusedFrame();
|
| -
|
| - bounds_in_window->reserve(character_count);
|
| - blink::WebRect webrect;
|
| - for (size_t i = 0; i < character_count; ++i) {
|
| - if (!frame->firstRectForCharacterRange(start_offset + i, 1, webrect)) {
|
| - DLOG(ERROR) << "Could not retrieve character rectangle at " << i;
|
| - bounds_in_window->clear();
|
| - return;
|
| - }
|
| - ConvertViewportToWindowViaWidget(&webrect);
|
| - bounds_in_window->push_back(webrect);
|
| - }
|
| -}
|
| -
|
| -void RenderViewImpl::GetCompositionRange(gfx::Range* range) {
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin)
|
| - return;
|
| -#endif
|
| - RenderWidget::GetCompositionRange(range);
|
| -}
|
| -
|
| -bool RenderViewImpl::CanComposeInline() {
|
| -#if defined(ENABLE_PLUGINS)
|
| - PepperPluginInstanceImpl* focused_pepper_plugin = GetFocusedPepperPlugin();
|
| - if (focused_pepper_plugin)
|
| - return focused_pepper_plugin->IsPluginAcceptingCompositionEvents();
|
| -#endif
|
| - return true;
|
| -}
|
| -
|
| void RenderViewImpl::DidCompletePageScaleAnimation() {
|
| GetWidget()->FocusChangeComplete();
|
| }
|
|
|