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

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

Issue 1587913002: Use common generated file for inputMethodPrivate APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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_chromeos.cc
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
index 49ab864a1509d17d1086cdbeca4194b4f7bce9d8..50dc965962d3951f2142b1374531053d2842daf5 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/extensions/api/input_ime.h"
+#include "chrome/common/extensions/api/input_method_private.h"
#include "extensions/browser/extension_system.h"
#include "extensions/common/manifest_handlers/background_info.h"
#include "ui/base/ime/chromeos/component_extension_ime_manager.h"
@@ -37,14 +38,14 @@ namespace SetCandidateWindowProperties =
namespace CommitText = extensions::api::input_ime::CommitText;
namespace ClearComposition = extensions::api::input_ime::ClearComposition;
namespace SetComposition = extensions::api::input_ime::SetComposition;
+namespace OnCompositionBoundsChanged =
+ extensions::api::input_method_private::OnCompositionBoundsChanged;
using ui::IMEEngineHandlerInterface;
namespace {
const char kErrorEngineNotAvailable[] = "Engine is not available";
const char kErrorSetMenuItemsFail[] = "Could not create menu Items";
const char kErrorUpdateMenuItemsFail[] = "Could not update menu Items";
-const char kOnCompositionBoundsChangedEventName[] =
- "inputMethodPrivate.onCompositionBoundsChanged";
void SetMenuItemToMenu(const input_ime::MenuItem& input,
IMEEngineHandlerInterface::MenuItem* out) {
@@ -151,7 +152,7 @@ class ImeObserverChromeOS : public ui::ImeObserver {
void OnCompositionBoundsChanged(
const std::vector<gfx::Rect>& bounds) override {
if (extension_id_.empty() ||
- !HasListener(kOnCompositionBoundsChangedEventName))
+ !HasListener(OnCompositionBoundsChanged::kEventName))
return;
// Note: this is a private API event.
@@ -178,7 +179,7 @@ class ImeObserverChromeOS : public ui::ImeObserver {
DispatchEventToExtension(
extensions::events::INPUT_METHOD_PRIVATE_ON_COMPOSITION_BOUNDS_CHANGED,
- kOnCompositionBoundsChangedEventName, std::move(args));
+ OnCompositionBoundsChanged::kEventName, std::move(args));
}
private:

Powered by Google App Engine
This is Rietveld 408576698