insertText is deprecated

This commit is contained in:
Cheng Zhao 2017-01-24 16:45:26 +09:00 committed by Kevin Sawicki
parent 5e43ea227e
commit 6d5339b74e
3 changed files with 7 additions and 1 deletions

View file

@ -7,6 +7,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "v8/include/v8.h"
#include "vendor/node/deps/uv/include/uv.h"

View file

@ -17,6 +17,8 @@
#include "native_mate/object_template_builder.h"
#include "third_party/WebKit/public/web/WebCache.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrameWidget.h"
#include "third_party/WebKit/public/web/WebInputMethodController.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
#include "third_party/WebKit/public/web/WebScriptExecutionCallback.h"
#include "third_party/WebKit/public/web/WebScriptSource.h"
@ -187,7 +189,9 @@ void WebFrame::RegisterURLSchemeAsPrivileged(const std::string& scheme,
}
void WebFrame::InsertText(const std::string& text) {
web_frame_->insertText(blink::WebString::fromUTF8(text));
web_frame_->frameWidget()
->getActiveWebInputMethodController()
->commitText(blink::WebString::fromUTF8(text), 0);
}
void WebFrame::InsertCSS(const std::string& css) {

View file

@ -7,6 +7,7 @@
#include "base/callback.h"
#include "content/public/renderer/browser_plugin_delegate.h"
#include "content/public/renderer/render_frame.h"
namespace gfx {
class Size;