  void InsertText(v8::Isolate* isolate, const std::string& text) {
    content::RenderFrame* render_frame;
    if (!MaybeGetRenderFrame(isolate, "insertText", &render_frame))
      return;

    blink::WebFrame* web_frame = render_frame->GetWebFrame();
    if (web_frame->IsWebLocalFrame()) {
      web_frame->ToWebLocalFrame()
          ->FrameWidget()
          ->GetActiveWebInputMethodController()
          ->CommitText(blink::WebString::FromUTF8(text),
                       blink::WebVector<ui::ImeTextSpan>(), blink::WebRange(),
                       0);
    }
  }
  void InsertText(v8::Isolate* isolate, const std::string& text) {
    content::RenderFrame* render_frame;
    if (!MaybeGetRenderFrame(isolate, "insertText", &render_frame))
      return;

    blink::WebFrame* web_frame = render_frame->GetWebFrame();
    if (web_frame->IsWebLocalFrame()) {
      web_frame->ToWebLocalFrame()
          ->FrameWidget()
          ->GetActiveWebInputMethodController()
          ->CommitText(blink::WebString::FromUTF8(text),
                       blink::WebVector<ui::ImeTextSpan>(), blink::WebRange(),
                       0);
    }
  }