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

Unified Diff: chrome/browser/extensions/api/input_ime/input_ime_api.cc

Issue 739323002: Requests for tabs permission for VirtualKeyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: chrome/browser/extensions/api/input_ime/input_ime_api.cc
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
index 9cfa87800accbe3b8a1f285b67e25aebee527586..f2ea47f84be373104ed36e281cb5a2b7f79685d3 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
@@ -265,7 +265,8 @@ class ImeObserver : public InputMethodEngineInterface::Observer {
void OnSurroundingTextChanged(const std::string& component_id,
const std::string& text,
int cursor_pos,
- int anchor_pos) override {
+ int anchor_pos,
+ int offset_pos) override {
if (extension_id_.empty() ||
!HasListener(input_ime::OnSurroundingTextChanged::kEventName))
return;
@@ -274,9 +275,9 @@ class ImeObserver : public InputMethodEngineInterface::Observer {
info.text = text;
info.focus = cursor_pos;
info.anchor = anchor_pos;
+ info.offset = offset_pos;
scoped_ptr<base::ListValue> args(
input_ime::OnSurroundingTextChanged::Create(component_id, info));
-
DispatchEventToExtension(
extensions::events::INPUT_IME_ON_SURROUNDING_TEXT_CHANGED,
input_ime::OnSurroundingTextChanged::kEventName, args.Pass());
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_engine_unittest.cc ('k') | chrome/common/extensions/api/input_ime.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698