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

Unified Diff: ui/base/ime/input_method.h

Issue 2077783002: Make limitations for input.ime.sendKeyEvents API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check lastError of sendKeyEvents. Created 4 years, 6 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: ui/base/ime/input_method.h
diff --git a/ui/base/ime/input_method.h b/ui/base/ime/input_method.h
index 598fd4f76f9824db98e3b0d60631a3e1da85c930..fc93b00a4bddf2fdb0837db57acd1f8a90f6f99d 100644
--- a/ui/base/ime/input_method.h
+++ b/ui/base/ime/input_method.h
@@ -8,12 +8,17 @@
#include <stdint.h>
#include <string>
+#include <vector>
#include "base/event_types.h"
#include "build/build_config.h"
#include "ui/base/ime/text_input_mode.h"
#include "ui/base/ime/text_input_type.h"
+namespace extensions {
+class InputImeApiTest;
+} // namespace extensions
+
namespace ui {
namespace internal {
@@ -48,6 +53,7 @@ class TextInputClient;
// ui::InputMethod and owns it.
class InputMethod {
public:
+ InputMethod() : track_key_events_for_testing_(false) {}
#if defined(OS_WIN)
typedef LRESULT NativeEventResult;
@@ -152,6 +158,15 @@ class InputMethod {
// Management of the observer list.
virtual void AddObserver(InputMethodObserver* observer) = 0;
virtual void RemoveObserver(InputMethodObserver* observer) = 0;
+
+ protected:
+ friend class extensions::InputImeApiTest;
+
+ // Gets the tracked key events of using input.ime.sendKeyEvents API.
+ virtual std::vector<ui::KeyEvent*> GetKeyEventsForTesting() = 0;
+
+ // Whether the key events will be tracked. Only used for testing.
+ bool track_key_events_for_testing_;
};
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698